Skip to content

Dev compiler merge #27213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1,140 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1140 commits
Select commit Hold shift + click to select a range
eef7f81
Land fix to StackTrace.current performance already landed in dart2js.
jacob314 Apr 28, 2016
acc4d68
Stop concatenating all tests
vsmenon Apr 28, 2016
efa2303
Add all dart:html tests from the sdk to test/codegen. All tests are a…
jacob314 Apr 28, 2016
9d49469
Reenable typed_data and html tests
vsmenon Apr 28, 2016
9f764bf
Make parts hermetic, fixes #531
Apr 28, 2016
8c745c6
Fix modulo and bitwise operators.
rakudrama Apr 28, 2016
d109467
Use lazy static fields when overriding static getters or setters.
harryterkelsen Apr 28, 2016
7db49e6
Fixed 3 final missing casts in dart:js
jacob314 Apr 29, 2016
6598fa0
implement generic method runtime behavior, fixes #301
Apr 29, 2016
a9837e0
Fix for messed-up short-circuit operators.
rakudrama Apr 29, 2016
a750446
Improve code for shifts and bitwise operations.
rakudrama Apr 29, 2016
b2c0a74
Workaround #537
vsmenon Apr 29, 2016
428cb00
include type parameters on generic sync/async functions
harryterkelsen Apr 29, 2016
7337734
instantiate generic tear-offs, fixes #525
Apr 29, 2016
1aa00bc
List.unmodifiable
rakudrama May 3, 2016
6d8dc11
Suppress extra cast
vsmenon May 3, 2016
dc8e00b
Revert "Workaround #537"
vsmenon May 3, 2016
6485751
Implement Map.unmodifiable
rakudrama May 3, 2016
44db042
Redo how Type objects are exposed from DDC.
munificent May 3, 2016
2b20f3d
fix #543, export of properties should now work
May 3, 2016
75d6cde
Split status by lib
rakudrama May 3, 2016
642d08f
Add global compile tool
vsmenon May 4, 2016
3bb9e0a
Don't wrap type literals that are referenced by prefixes.
munificent May 4, 2016
990c7db
Write .err file alongside .txt if no .js
rakudrama May 4, 2016
f6e0383
Update core/errors.dart
rakudrama May 4, 2016
be0d779
Add corelib tests
rakudrama May 4, 2016
2f00ebd
Better is/as check handling. With this CL, the subtype function in
leafpetersen May 4, 2016
e227cae
Update core/{bool,errors,exceptions}
rakudrama May 4, 2016
8acf870
update gitignore and fix build
May 4, 2016
2a6643a
skip test that timed out in build
May 4, 2016
c840252
fix for #520, ListMixin should work again
May 4, 2016
56b9d09
fix #549 export of properties
May 4, 2016
a6d1fbf
Fix accessing private members on extension classes.
munificent May 4, 2016
a703b28
Merge in JSNumber changes.
rakudrama May 4, 2016
a860134
Fix subtyping for generic typedefs. Generic typedefs were being
leafpetersen May 5, 2016
b016f03
Update String methods.
rakudrama May 5, 2016
f6fc1e3
Upgrade Iterable and Iterator.
rakudrama May 5, 2016
aa2baf1
Updates for js_array.
rakudrama May 5, 2016
6ef3c88
Updates for core/{pattern,regexp,stopwatch,duration}.dart
rakudrama May 5, 2016
a191ce0
Update dart:async to match the Dart repo.
munificent May 5, 2016
daddc0d
Update number parsing.
rakudrama May 5, 2016
155597e
Update object.dart and some comments.
rakudrama May 5, 2016
7d32105
Pickup latest analyzer fixes
vsmenon May 5, 2016
d9e0533
allow 'super' in async and finally blocks
harryterkelsen May 6, 2016
5c41457
Update CodeUnits.
rakudrama May 6, 2016
4b6e3fe
Support module root
vsmenon May 6, 2016
bf4e10e
Update String.fromCharCodes from sdk
rakudrama May 6, 2016
7bd37f0
Upgrade StringBuffer, identical
rakudrama May 6, 2016
1222de2
Fix for Windows path separators.
May 6, 2016
c3b43ac
Merge branch 'master' of github.com:TheBosZ/dev_compiler
May 6, 2016
9520e96
Switch to actual unittest, stack trace, and path packages. Tag tests …
jacob314 May 6, 2016
2cc3233
Remove unittest.js from codegen/expect directory.
jacob314 May 6, 2016
7c63403
Fix void subtype checks.
leafpetersen May 6, 2016
65e8266
Update collection (list / map / iterable) printing.
rakudrama May 6, 2016
090110f
Update native_typed_data
rakudrama May 7, 2016
a5d1626
Update date_time.
rakudrama May 7, 2016
86c4dc0
Only use white list on indefinite checks
leafpetersen May 7, 2016
8da8c3e
Update dart:typed_data
rakudrama May 9, 2016
c2e170f
Update mirrors.dart
rakudrama May 9, 2016
35f35ff
Merge pull request #555 from TheBosZ/master
vsmenon May 9, 2016
6a1d61f
optimize self-references in generic type definitions
harryterkelsen May 9, 2016
783a1f4
Update linked_list, queue, splay_tree
rakudrama May 9, 2016
97d91f6
Faster ignore.
leafpetersen May 10, 2016
3cbf0e4
Delete logging code
leafpetersen May 10, 2016
e535970
Update dart:convert and dart:core Uri.
munificent May 10, 2016
90a34d4
Remove generated files.
munificent May 10, 2016
a7f812b
fix #552, Object members on native types
May 10, 2016
0f0de2f
Merge branch 'master' into delete-multi
munificent May 10, 2016
32fd2f8
update Map
harryterkelsen May 10, 2016
a2ebf2a
Speed up String.fromCharCodes a bit
rakudrama May 11, 2016
098508c
Update _charCodeApply, makeFixedStringUnmodifiable
rakudrama May 11, 2016
9cf428a
Delete work-in-progress script.
munificent May 11, 2016
2031f66
Canonicalize function types. Brings sample app load time
leafpetersen May 11, 2016
c38e417
copy TypeName.type when we clone the AST
May 11, 2016
85d3071
remove canonicalType
May 11, 2016
97ec1f7
always emit lazy field if overriding static
harryterkelsen May 11, 2016
825737d
fuse some null checks with type checks, introduce a special bool variant
May 11, 2016
dc955ff
avoid spread args
May 11, 2016
4869a06
Modify global compile tool to compile by package
vsmenon May 11, 2016
d616dc3
Miscellaneous runtime fixes.
leafpetersen May 12, 2016
d237906
increase mocha timeout
May 12, 2016
382996f
update dart:math
harryterkelsen May 12, 2016
548f139
Work around is check issue causing zone error handlers to never fire.…
jacob314 May 12, 2016
c325cec
Mark some tests that could be fail instead of skip_fail as fail. Mark…
jacob314 May 12, 2016
9b8f582
Double timeout for slow tests to reduce flakiness seen on travis.
jacob314 May 12, 2016
2883b19
Upgrade StackTrace to the latest SDK version.
munificent May 12, 2016
bfa432e
A few more tests pass
rakudrama May 12, 2016
6a01f95
polyfill prototypes on window for important dart:html types where rec…
jacob314 May 12, 2016
abb2428
TBR: fix polyfill code to work on browsers that do not support webgl.
jacob314 May 12, 2016
f59bf19
html_escape_test does not fail with the dart sdk the build bot uses.
jacob314 May 13, 2016
2136fdc
implement @JS classes
harryterkelsen May 13, 2016
4a51a18
Upgrade to the latest dart:convert.
munificent May 13, 2016
851cbb0
Delete stale .js or .err files when generating codegen output.
munificent May 13, 2016
88870d0
Migrate dart2js stubs for dart:io
vsmenon May 16, 2016
9458bdf
enable top-level @JS() getters
harryterkelsen May 16, 2016
3b9d8f2
Remove unsupported libraries from `libraries.dart`.
stereotype441 May 16, 2016
6852dba
Dont install methods if implementation superclass corresponds to an i…
rakudrama May 16, 2016
d15a603
Allow the SDK to be set via a summary file
vsmenon May 17, 2016
26ee0cf
Remove polyfill for WebGLVertexArrayObjectOES that adds 200ms to star…
jacob314 May 17, 2016
d22a01b
Extend polyfill to support SourceBufferList
jacob314 May 17, 2016
69337e1
Minimal patch to collections to use correct LinkedHashMap for map lit…
rakudrama May 17, 2016
70306e1
Don't check in summary
vsmenon May 17, 2016
eef9bb5
Speed up global tool
vsmenon May 17, 2016
3c44af0
Named constants are (usually) not null.
rakudrama May 17, 2016
1265dc4
fix #569, cache constants defined in methods
May 17, 2016
5901249
Eliminate unnecessary covariance checks.
leafpetersen May 17, 2016
0cedeb4
simplify constructors, fixes #564
May 17, 2016
d95a368
Update dart:collection.
munificent May 17, 2016
7a9da00
Provide option to suppress mirrors metadata
vsmenon May 17, 2016
9e816ff
Wrap and unwrap types in dart:mirrors
vsmenon May 17, 2016
d2b6f53
fix #470, string interpolation now respects Dart toString
May 18, 2016
69d11e8
Misc updates (mostly doc)
rakudrama May 18, 2016
5ed8b5e
Misc doc-only updatee, rerun build_sdk.
rakudrama May 18, 2016
e18b291
fix worker mode memory leak (#575)
jakemac53 May 18, 2016
4cf7ee3
Use _extensionType for detecting prototype inheritance.
rakudrama May 18, 2016
1e5b3af
Move generated files to gen/.
munificent May 18, 2016
0235eba
Updates to collection_patch.dart
rakudrama May 18, 2016
220553b
Future flattening at runtime.
leafpetersen May 18, 2016
f7ffb1a
Check in a lockfile.
munificent May 18, 2016
73a7eb7
Support @JS with path expressions.
sigmundch May 19, 2016
e105544
implement top-level JS annotated getters
harryterkelsen May 19, 2016
ed77841
Better boolean conversion tests.
rakudrama May 19, 2016
f950e42
fix #577 - correctly toString ES Symbols
May 19, 2016
2e5e9fe
Flatten _Future at runtime as well
leafpetersen May 19, 2016
41bac63
Fix debugger
jacob314 May 20, 2016
31e9d99
Simplify ordering of top-level declarations.
May 20, 2016
1e0295d
fix performance of setType
May 21, 2016
e6e5635
Optimize const construction
leafpetersen May 21, 2016
e383690
Make DateTime use in the SDK typed
May 23, 2016
17298f3
upgrade to Analyzer with speed improvements
May 23, 2016
10dc45d
Disable mirrors metadata gen by default
vsmenon May 23, 2016
c74d092
Name loader functions.
rakudrama May 24, 2016
fb36371
Add a type on lazyAsJsDate
alan-knight May 25, 2016
d4dd53e
Add generic types to Sort and Comparable. Fix crasher bug in codegen.
jacob314 May 25, 2016
3e9ed11
Name and hoist types
leafpetersen May 25, 2016
451478b
Add types for valueFromDecomposedDate
alan-knight May 25, 2016
cb1cafc
More consistent order of type caches
rakudrama May 26, 2016
d094888
Use factory constructor for list literals
rakudrama May 26, 2016
a7174ce
Tweak _checkPrimitiveType
rakudrama May 26, 2016
70698ba
Short circuit for 'as dynamic'
leafpetersen May 26, 2016
834c1bf
Angular template workarounds
leafpetersen May 26, 2016
f0517c4
Enable strong mode in DDC, fix all warnings/errors
May 26, 2016
562f01e
_visitTest should look through parentheses
rakudrama May 31, 2016
73479a6
Throw TypeError instead of CastError for type coercions.
rakudrama Jun 1, 2016
ae4341c
Make whitelist check per element
leafpetersen Jun 1, 2016
40c7ac9
Wire up class hierarchy for recursive inheritance
leafpetersen Jun 2, 2016
de24eea
Check for extension methods when using whitelist
leafpetersen Jun 2, 2016
59abfdb
Fix bot, law of the excluded middle still holds
leafpetersen Jun 2, 2016
314bd18
Profile dynamic calls.
jacob314 Jun 2, 2016
61a1d8c
Fix a few cases were obj and name were used instead of $obj and $name…
jacob314 Jun 2, 2016
fb20c9d
Switch how we track whether trackDdcProfile is set to reduce the perf…
jacob314 Jun 2, 2016
6ab35de
Further bitop optimizations
rakudrama Jun 3, 2016
5fd9235
Faster type tests
rakudrama Jun 3, 2016
aea2fa1
Update Symbol.hashCode
rakudrama Jun 6, 2016
0ec17d1
Fixes #586 - enums should now work in SDK libs
Jun 6, 2016
ec945ee
enable compatiblity with 1.18 SDKs
Jun 7, 2016
e68cee4
Handle more boolean conversion cases.
rakudrama Jun 7, 2016
68f90ac
Refactoring assignment
rakudrama Jun 8, 2016
5016cbc
Fixed type error in MapEntry and added keyToStringConfig to display t…
priscilla-lee Jun 8, 2016
1c0759a
DDC changes for Analyzer src/task/strong/info.dart refactor
Jun 10, 2016
5c67ae3
Use trackCacheDependencies for performance speedup
Jun 13, 2016
3e5d1d8
Fix function subtyping crash
leafpetersen Jun 14, 2016
caff16a
merged
Jun 14, 2016
d41215c
upgrade analyzer version
Jun 14, 2016
6f85eb0
Merge pull request #589 from dart-lang/rm_strong_info
Jun 14, 2016
fe360a9
make "compile" command optional to address #505
Jun 14, 2016
477182e
fix worker_test
Jun 14, 2016
76d94c0
Merge pull request #590 from dart-lang/505_compile_cmd
Jun 14, 2016
5a0353b
Allow constant static fields to overwrite defaults
smanilov Jun 15, 2016
715c845
Add a regression test for bug #587
smanilov Jun 15, 2016
430e8f1
Partial fix for call methods #542
Jun 16, 2016
e8e19b4
Verify status of statically failing tests
vsmenon Jun 22, 2016
d27eda4
implement user-defined nSM, Object members on functions
Jun 23, 2016
87bcbf9
Move type tagging logic out of setSignature
andrewkrieger Jun 27, 2016
5c9e124
Improve message in tool/test.sh
andrewkrieger Jun 28, 2016
d55b213
Array formatting customized to look like JS
Jun 28, 2016
844cfdb
maxspanlength setter
Jun 28, 2016
f0cde88
Change allowInterop to a generic method.
jacob314 Jun 29, 2016
72664da
Print usage when no source files are passed
smanilov Jul 1, 2016
86d9eb1
don't use JS_CONST in dart:html
Jul 1, 2016
1c5f78b
Update USAGE.md
Jul 1, 2016
1ae094d
Debugger library import with name
Jul 6, 2016
fceb82f
Fix null aware generic invocation.
leafpetersen Jul 7, 2016
0315595
Check in codegen test expectations.
leafpetersen Jul 7, 2016
fc696b0
Copy browser test output to file
leafpetersen Jul 8, 2016
e7d49dd
Copy browser test output to file
leafpetersen Jul 8, 2016
409fbcf
Custom formatter popup booleans
Jul 11, 2016
8e97111
Docs for no-implicit-casts and no-implicit-dynamic
Jul 13, 2016
a210c63
add a note about experiments and a feedback link
Jul 13, 2016
0d7101d
Update STATIC_SAFETY.md
Jul 13, 2016
3986e84
Merge pull request #601 from dart-lang/doc-optional-features
Jul 13, 2016
7150377
Remove the experimental tag from the flag header
Jul 13, 2016
dd1f2ac
Update patch_sdk.sh
Jul 13, 2016
aed91a1
Merge pull request #602 from dart-lang/patch-sdk-change
Jul 13, 2016
144d3db
Catch file-not-found exception
smanilov Jul 18, 2016
c1e97b4
fix #603, support mock objects
Jul 19, 2016
c3ee6dc
fix #606, allow specifying the summary file extension
Jul 22, 2016
3d03bee
Library custom formatters
Jul 22, 2016
d7c7c19
Library children object fix
Jul 26, 2016
18769af
restore code_generator file from b770039, the nSM mock fix
Jul 27, 2016
0f29ee9
Remove DDC custom error list now that strong mode analyzer handles it
Jul 27, 2016
d18ab46
Addition of StackTrace formatters
Jul 27, 2016
d2ec49d
Working compiler in browser.
priscilla-lee Jul 29, 2016
b2353d7
Fix analyzer error
vsmenon Jul 29, 2016
437cca2
Rename build-root to library-root
vsmenon Aug 1, 2016
344124e
fix optional params to mock methods, allow all signatures
Aug 1, 2016
e51f9de
fixes #616, statics on callable functions
Aug 2, 2016
a7dc32f
Deprecation of ClassMetadata wrapper for Class formatters so a stand-…
Aug 2, 2016
bd789e9
Remove source file check
vsmenon Aug 2, 2016
803b0e3
Test against dev version of analyzer on travis
vsmenon Aug 2, 2016
0fd3e88
Fix wrt analyzer tip
vsmenon Aug 2, 2016
8b0b578
Get rid of library proto information for debugger libraries
Aug 3, 2016
3b7e5ee
Updated sdk
Aug 3, 2016
411de08
Added list of imports to library modules (needed in order to discover…
priscilla-lee Aug 3, 2016
b324b14
Regen with latest analyzer
vsmenon Aug 4, 2016
144cca4
Roll DDC to latest dart:html
vsmenon Aug 4, 2016
c2cb395
Enforce green on travis with dev analyzer
vsmenon Aug 4, 2016
3ddb76b
Reify type params on map literals
vsmenon Aug 5, 2016
a8a6107
Run travis on trusty
vsmenon Aug 5, 2016
8fec051
Mark recursive_inheritance_test as passing
vsmenon Aug 5, 2016
1233b35
Restructured the set up for the compiling function. Also added room f…
priscilla-lee Aug 9, 2016
94085a6
a few cleanups to get IDE message clean
Aug 9, 2016
386ad0a
Removed copy of dart sdk summaries. No longer needed to run the dev c…
priscilla-lee Aug 10, 2016
fc3aa40
Dart SDK works on precise again
kevmoo Aug 11, 2016
3d43b1d
Merge pull request #625 from dart-lang/dart_sdk_better
vsmenon Aug 11, 2016
0aa5cbd
fix #620, infer the input files from sources
Aug 11, 2016
3627356
fixes #610, incorrect help output
Aug 12, 2016
830dd54
Update USAGE.md
vsmenon Aug 14, 2016
280b100
Update USAGE.md
vsmenon Aug 15, 2016
43fe94a
remove unused test expectation files
Aug 16, 2016
90a8667
remove unused test baseline files
Aug 16, 2016
9b421eb
fixes #627, update DDC Future.then signature
Aug 17, 2016
a076eda
roll analyzer
Aug 18, 2016
d90d172
Remove deprecated DirectoryBasedDartSdk
vsmenon Aug 18, 2016
8442efa
Support call methods on functions
vsmenon Aug 18, 2016
0516f9f
Regression test dart:mirrors
vsmenon Aug 19, 2016
124e714
Add mirrors tests
vsmenon Aug 19, 2016
822f653
simplify build sdk
Aug 22, 2016
9d8ae16
Revert "simplify build sdk"
Aug 22, 2016
87577db
Add dart:js_util library and tests to ddc. This library is already ad…
jacob314 Aug 24, 2016
c113993
fix #626, add AMD module format and make it default
Aug 25, 2016
bc50963
fix writing summaries
Aug 25, 2016
8081afc
fix travis bots
Aug 25, 2016
4b321d0
Import "NoInline" into core so StackTrace's use of it resolves.
munificent Aug 26, 2016
6a1a03a
Make source map paths relative
vsmenon Aug 26, 2016
feb77b4
Bind this in ng2 hack code
vsmenon Aug 29, 2016
2bc19ea
Remove deprecated code
vsmenon Aug 30, 2016
367b362
Mark test flaky
vsmenon Aug 31, 2016
98683ab
Merge dev_compiler into SDK repository.
Aug 31, 2016
a1e6079
use pkg/dev_compiler in the build
Aug 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart -text
tests/lib/mirrors/method_mirror_source_line_ending_lf.dart -text
tests/lib/mirrors/method_mirror_source_test.dart -text
tests/lib/mirrors/method_mirror_source_other.dart -text
pkg/dev_compiler/test/codegen/language/multiline_newline_crlf.dart -text
pkg/dev_compiler/test/codegen/lib/mirrors/method_mirror_source_line_ending_cr.dart -text
pkg/dev_compiler/test/codegen/lib/mirrors/method_mirror_source_line_ending_crlf.dart -text

# Files to leave alone and not diff.
*.png binary
Expand Down
3 changes: 0 additions & 3 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ vars = {
"dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
"dart_style_tag": "@0.2.9+1",
"dartdoc_tag" : "@v0.9.7+2",
"dev_compiler_rev": "@01d4907cff61ecf934940e7243f79ef68e4bb12b",
"fixnum_tag": "@0.10.5",
"func_rev": "@8d4aea75c21be2179cb00dc2b94a71414653094e",
"glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
Expand Down Expand Up @@ -201,8 +200,6 @@ deps = {
(Var("github_mirror") % "dart2js_info") + Var("dart2js_info_rev"),
Var("dart_root") + "/third_party/pkg/dartdoc":
(Var("github_mirror") % "dartdoc") + Var("dartdoc_tag"),
Var("dart_root") + "/third_party/pkg/dev_compiler":
(Var("github_mirror") % "dev_compiler") + Var("dev_compiler_rev"),
Var("dart_root") + "/third_party/pkg/func":
(Var("github_dartlang") % "func") + Var("func_rev"),
Var("dart_root") + "/third_party/pkg/fixnum":
Expand Down
10 changes: 10 additions & 0 deletions pkg/dev_compiler/.analysis_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
analyzer:
strong-mode: true
exclude:
- doc/api/**
- gen/**
- node_modules/**
- tool/input_sdk/**
- test/codegen/**
- test/samples/**
- test/transformer/hello_app/**
24 changes: 24 additions & 0 deletions pkg/dev_compiler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Don’t commit the following files and directories created by pub.
.pub
build/
packages
.packages

# Ignore files created by tools.
*.dart.precompiled.js
*.js_
*.js.deps
*.sw?
.idea/
.pub/
node_modules
doc/api/

# Generated files go here.
gen/

# Ignore generated SDK summary.
lib/js/*/*.sum

# Created by ./tool/dependency_overrides.sh.
dependency_overrides/
33 changes: 33 additions & 0 deletions pkg/dev_compiler/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
language: dart
sudo: false
dart:
- dev
cache:
directories:
- $HOME/.npm
- $HOME/.nvm
- $HOME/.pub-cache/hosted
- node_modules
before_install:
- test "$ANALYZER" != master -a "$ANALYZER" != dev || ./tool/override_analyzer_dependency.sh $ANALYZER
- pub global activate dart_coveralls
- export CHROME_CANARY_BIN=`./tool/get_chrome_canary.sh`
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- nvm install 5.5.0
- npm install
script:
- if [[ -z "$TEST" ]]; then ./tool/presubmit.sh ; fi
- if [[ "$TEST" == coverage ]]; then ./tool/build_sdk.sh && ./tool/coverage.sh ; fi
- if [[ "$TEST" == node ]]; then ./tool/node_test.sh ; fi
env:
- ANALYZER=stable
- ANALYZER=master
- ANALYZER=dev
- TEST=coverage
- TEST=node
matrix:
allow_failures:
- env: ANALYZER=master
- env: TEST=node
71 changes: 71 additions & 0 deletions pkg/dev_compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# dev_compiler changelog

## next release
- add support for AMD modules and make it the default.
- precompile the SDK in AMD, CommonJS, and ES6 flavors.
- legacy module format is deprecated.

## 0.1.24
- workaround breaking change on requestAnimationFrame

## 0.1.23
- updates for the latest analyzer
- removal of deprecated functionality (server mode) in prep for refactoring

## 0.1.22
- fixes to support the latest analyzer
- improvements in compile speed
- bug fixes on function / closure handling

## 0.1.21
- bug fix for dart:js constructor invocation

## 0.1.20
- support new StackTrace.current method

## 0.1.19
- support for dom libraries (dart:html, etc)

## 0.1.18
- dart:typed_data support
- preliminary TS / Closure output support
- various runtime typing fixes

## 0.1.17
- preliminary node module support
- support for compiling / serving multiple html files

## 0.1.16
- rolled analyzer to 0.27.2-alpha.1
- fixes for static fields

## 0.1.15
- codegen fixes for dart:convert (json decode) and dart:math (max, min)

## 0.1.14
- updates to unpin analyzer and move forward to ^0.27.1+2

## 0.1.13
- various fixes in js codegen
- pinned to analyzer 0.26.2+1 to avoid breaking upstream changes

## 0.1.12
- fixes for babel
- fixes toward new js interop

## 0.1.11
- moved js runtime files to lib/runtime/dart (`dart_runtime.js` -> `dart/_runtime.js`)
- bug fix to source maps
- initial support for f-bound quantification patterns

## 0.1.10
- added an `--html-report` option to create a file summarizing compilation
issues
- added a `-f` alias to the `--force-compile` command line option
- removed many info level messages that were informational to the DDC team

## 0.1.9

## 0.1.8
- added a `--version` command-line option
- added a new entry-point - `dev_compiler` - that aliases to `dartdevc`
35 changes: 35 additions & 0 deletions pkg/dev_compiler/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
This license applies to all files contained here with the following
exceptions:

- All code in test/js_test_tools is externally maintained with
corresponding licenses in those individual files and directories.

---

Copyright 2015, the Dart project authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 changes: 31 additions & 0 deletions pkg/dev_compiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
dev_compiler
============

[![Build Status](https://travis-ci.org/dart-lang/dev_compiler.svg?branch=master)](https://travis-ci.org/dart-lang/dev_compiler)
[![Coverage Status](https://coveralls.io/repos/dart-lang/dev_compiler/badge.svg?branch=master)](https://coveralls.io/r/dart-lang/dev_compiler)

The Dart Dev Compiler (DDC) is an **experimental** development tool and transpiler. It is at a very early stage today. Its aims include the following:

- A static checker based on stricter-than-standard-Dart type rules.
- A modular Dart-to-ES6 transpiler for Dart programs that statically check.

DDC attempts to map to idiomatic EcmaScript 6 (ES6) as cleanly as possible. To do this while cohering to Dart semantics, DDC relies heavily on static type information, static checking, and runtime assertions.

DDC is intended to support a very [large subset](https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md) of Dart. If a program does not statically check, DDC will not result in valid generated code. Our goal is that a program execution (of a valid program) that runs without triggering runtime assertions should run the same on other Dart platforms under checked mode or production mode.

DDC does support untyped Dart code, but it will typically result in less readable and less efficient ES6 output.

DDC has the following project goals:

- Effective static checking and error detection.
- A debugging solution for all modern browsers.
- Readable output.
- Fast, modular compilation of Dart code.
- Easy use of generated code from JavaScript.

DDC is still in a very early stage as highlighted by our choice of ES6. ES6 itself is in active development across all modern browsers, but at various stages of support:
[kangax.github.io/compat-table/es6](https://kangax.github.io/compat-table/es6/).

We are targeting the subset of ES6 supported in Chrome.

To try out DDC and/or give feedback, please read our [usage](https://github.com/dart-lang/dev_compiler/blob/master/USAGE.md) page.
58 changes: 58 additions & 0 deletions pkg/dev_compiler/STRONG_MODE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Strong Mode

Strong mode applies a more restrictive type system to Dart to address its unsound, surprising behavior in certain cases.

Strong mode helps with:

- [Stronger static checking](doc/STATIC_SAFETY.md) to find more errors during static analysis or compilation.
- This includes a [prototype of generic methods](doc/GENERIC_METHODS.md) for better expressiveness and checking.
- [Stronger runtime checking](doc/RUNTIME_SAFETY.md) in the Dart Dev Compiler (DDC) to find errors at runtime.
- [Idiomatic JavaScript code generation](doc/JS_CODEGEN.md) via DDC for more readable output and better interoperability.

## Motivation

Strong mode aims to ensure that static type annotations are actually correct at runtime. For this to work, strong mode provides a stricter type system than standard Dart. Consider the following example:

```dart
// util.dart

void info(List<int> list) {
var length = list.length;
if (length != 0) print(length + list[0]);
}
```

A developer might reasonably expect the `info` function to print either nothing (empty list) or a single integer (non-empty list), and that Dart’s static tooling and checked mode would enforce this.

However, in the following context, the info method prints “helloworld” in checked mode, without any static errors or warnings:

```dart
import ‘dart:collection’;
import ‘util.dart’;

class MyList extends ListBase<int> implements List {
Object length;

MyList(this.length);

operator[](index) => "world";
operator[]=(index, value) {}
}

void main() {
List<int> list = new MyList("hello");
info(list);
}
```

The lack of static or runtime errors in the Dart specification's type rules is not an oversight; it is by design. It provides developers a mechanism to circumvent or ignore types when convenient, but it comes at cost. While the above example is contrived, it demonstrates that developers cannot easily reason about a program modularly: the static type annotations in the `util` library are of limited use, even in checked mode.

For the same reason, a compiler cannot easily exploit type annotations if they are unsound. A Dart compiler cannot simply assume that a `List<int>` contains `int` values or even that its `length` is an integer. Instead, it must either rely on expensive (and often brittle) whole program analysis or on additional runtime checking. That [additional checking](doc/JS_CODEGEN.md) may lead to larger, slower code and harder-to-read output when Dart is transpiled to a high level language like JavaScript.

The fundamental issue above is that static annotations may not match runtime types, even in checked mode: this is a direct consequence of the unsoundness of the Dart type system. This can make it difficult for both programmers and compilers to rely on static types to reason about programs.

Strong mode solves that by enforcing the correctness of static type annotations. It disallows examples such as the above. In this example, standard Dart rules (checked or otherwise) allow `MyList` to masquerade as a `List<int>`. Strong mode statically rejects the declaration of `MyList`.

DDC augments strong mode static checking with a minimal set of runtime checks required to enforce soundness, similar to how Java and C# handle potentially unsafe casts. This allows both the developer and the compiler to better reason about the info method. For statically checked code, both may assume that the argument is a proper `List<int>`, with integer-valued length and elements.

DDC execution is stricter than checked mode. A Dart program execution where (a) the program passes DDC’s static checking and (b) the execution does not trigger DDC’s runtime assertions, will also run in checked mode on any Dart platform.
81 changes: 81 additions & 0 deletions pkg/dev_compiler/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Usage

The [Dart Dev Compiler](README.md) (DDC) is an **experimental**
development compiler from Dart to EcmaScript 6. It is
still incomplete, under heavy development, and not yet ready for
production use.

With those caveats, we welcome feedback for those experimenting.

The easiest way to compile and run DDC generated code for now is via NodeJS. The following instructions are in a state of flux - please expect them to change. If you find issues, please let us know.

(1) Clone the [DDC repository](https://github.com/dart-lang/dev_compiler) and set the environment variable DDC_PATH to your checkout.

(2) Install nodejs v6.0 or later and add it to your path. It can be installed from:

https://nodejs.org/

Note, v6 or later is required for harmony / ES6 support.

(3) Create a node compatible version of the dart_sdk:

```
dart $DDC_PATH/tool/build_sdk.dart --dart-sdk $DDC_PATH/gen/patched_sdk/ --modules node -o dart_sdk.js
```

You can ignore any errors or warnings for now.

(4) Define a node path (you can add other directories if you want to separate things out):

```
export NODE_PATH=.
```

(5) Compile a test file with a `main` entry point:

```
dart $DDC_PATH/bin/dartdevc.dart --modules node -o hello.js hello.dart
```

Note, the `hello.js` built here is not fully linked. It loads the SDK via a `require` call.

(6) Run it via your node built in step 1:

```
node -e 'require("hello").hello.main()'
```

(7) Compile multiple libraries using summaries. E.g., write a `world.dart` that imports `hello.dart` with it's own `main`. Step 5 above generated a summary (`hello.sum`) for `hello.dart`. Build world:

```
dart $DDC_PATH/bin/dartdevc.dart --modules node -s hello.sum -o world.js world.dart
```

Run world just like hello above:

```
node -e 'require("world").world.main()'
```

(8) Node modules do not run directly on the browser or v8. You can use a tool like `browserify` to build a linked javascript file that can:

Install:
```
sudo npm install -g browserify
```

and run, e.g.,:
```
echo 'require("world").world.main()' | browserify -d - > world.dart.js
```

The produced `world.dart.js` fully links all dependencies (`dart_sdk`, `hello`, and `world`) and executes `world.main`. It can be loaded via script tag and run in Chrome (stable or later).

## Feedback

Please file issues in our [GitHub issue tracker](https://github.com/dart-lang/dev_compiler/issues).

You can also view or join our [mailing list](https://groups.google.com/a/dartlang.org/forum/#!forum/dev-compiler).



Loading