dart-lang/reify

Name: reify

Owner: Dart

Description: Reified generics

Created: 2016-08-22 08:15:08.0

Updated: 2016-10-24 10:44:55.0

Pushed: 2017-09-13 17:02:04.0

Homepage: null

Size: 492

Language: Dart

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Reified Generic Types

Getting Started

Getting started involves four steps:

  1. Get the source

  2. Update modules

  3. Build the Dart VM

  4. Create environment.rc

After that, you're ready to run tests.

Getting the Source

You should clone [https://github.com/dart-lang/reify.git]:

git clone https://github.com/dart-lang/reify.git

When pushing changes to github, its more convenient to use SSH, so run this command to always use SSH to push to github:

git config --global --add url.git@github.com:.pushInsteadOf https://github.com
Updating Submodules

After cloning this repository, please run git submodule update --init to fetch dependencies.

Building the Dart VM

After updating the submodules, please build the Dart VM:

 third_party/kernel-sdk/sdk
ent sync
ols/build.py --mode=debug --arch=x64 runtime runtime_precompiled
Create environment.rc

In the reify directory, create a file named environment.rc with this content:

nux
rt KERNEL_SDK=<WORKSPACE>/reify/third_party/kernel-sdk/sdk
rt DART_AOT_VM=${KERNEL_SDK}/out/DebugX64/dart
rt DART_AOT_SDK=${KERNEL_SDK}/out/DebugX64/obj/gen/patched_sdk/
rt USE_DILL_CACHE=
ash
c OS X
rt KERNEL_SDK=<WORKSPACE>/reify/third_party/kernel-sdk/sdk
rt DART_AOT_VM=${KERNEL_SDK}/xcodebuild/DebugX64/dart
rt DART_AOT_SDK=${KERNEL_SDK}/xcodebuild/DerivedSources/DebugX64/patched_sdk
rt USE_DILL_CACHE=

Notice that KERNEL_SDK has to an absolute path, so replace <WORKSPACE> with the actual path.

Running tests

You can now run use the scripts bin/reified_dart and ./bin/test.sh. The former is a wrapper around dart that creates a dill file from source, applies the reification and closure conversion transformations and runs it on the Dart VM. The latter script wraps test.dart and pretends the former script is the Dart VM being tested. For example:

n/test.sh --mode=debug --arch=x64 -pcolor -j8 language 2>&1 | tee $(date '+log-%Y-%m-%dT%H:%M:%S.txt')
Experimenting with Types

You can use repl.dart to experiment with types, run it like so:

./bin/repl.dart

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.