John Messerly
85d3071fba
remove canonicalType
...
it is unused now since the extension type system replaced it.
there's a potentially interesting use case supported, e.g. ES6 subclasses of JS Array, but we can ignore that for now (IMO)
R=sra@google.com
Review URL: https://codereview.chromium.org/1967743005 .
2016-05-11 10:56:58 -07:00
John Messerly
c38e417c0b
copy TypeName.type when we clone the AST
...
workaround for https://github.com/dart-lang/sdk/issues/26368
R=vsm@google.com
Review URL: https://codereview.chromium.org/1969063002 .
2016-05-11 10:52:57 -07:00
Leaf Petersen
2031f66a95
Canonicalize function types. Brings sample app load time
...
down to the 6-7s range.
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/1969523002 .
2016-05-11 10:08:29 -07:00
Bob Nystrom
9cf428afdd
Delete work-in-progress script.
...
Oops, didn't mean to check this in.
R=sra@google.com
Review URL: https://codereview.chromium.org/1969663002 .
2016-05-11 09:54:52 -07:00
Stephen Adams
098508c533
Update _charCodeApply, makeFixedStringUnmodifiable
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1969683002 .
2016-05-10 18:44:33 -07:00
Stephen Adams
a2ebf2ada1
Speed up String.fromCharCodes a bit
...
About 4x speedup of convert/ascii_test.dart by removing dsend in inner loop.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1968783002 .
2016-05-10 17:30:19 -07:00
Harry Terkelsen
32fd2f8215
update Map
...
R=sra@google.com
Review URL: https://codereview.chromium.org/1963723003 .
2016-05-10 16:19:19 -07:00
John Messerly
a7f812b676
fix #552 , Object members on native types
...
We initially hard coded a few of these. That worked until native_typed_data and html were added. Those two libraries have a lot of native types.
This also fixes TypeRep to extend dart:core Object, and fixes the dart:_runtime so we can write Dart classes. Cleans up a few of the JS builtins as well.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1962823002 .
2016-05-10 11:35:38 -07:00
Bob Nystrom
e535970604
Update dart:convert and dart:core Uri.
...
I started trying to get the convert tests all cleaned up and passing
but realized I was going down a rathole. So, for now, all of the slow
or failing ones are just skipped.
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/1965563003 .
2016-05-10 10:25:38 -07:00
Leaf Petersen
3cbf0e4a92
Delete logging code
...
TBR=vsm@google.com
BUG=
Review URL: https://codereview.chromium.org/1961393003 .
2016-05-10 10:09:30 -07:00
Leaf Petersen
97d91f620c
Faster ignore.
...
Put a cache in front of the function which tests for failures to
ignore.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1963733003 .
2016-05-10 09:43:20 -07:00
Stephen Adams
783a1f45c2
Update linked_list, queue, splay_tree
...
Now identical to (pending) CL from main branch.
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1966473002 .
2016-05-09 14:14:29 -07:00
Harry Terkelsen
6a1d61fba7
optimize self-references in generic type definitions
...
fixes #556
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1958193002 .
2016-05-09 11:42:57 -07:00
vsmenon
35f35fff96
Merge pull request #555 from TheBosZ/master
...
Fix file separators on Windows
2016-05-09 09:23:22 -07:00
Stephen Adams
c2e170fb1f
Update mirrors.dart
...
This is a comments-only update.
Several APIs need to be visited to be made to work for DDC.
These are much clearer now.
TBR=vsm@google.com
BUG=
Review URL: https://codereview.chromium.org/1955293003 .
2016-05-08 18:31:18 -07:00
Stephen Adams
8da8c3efbf
Update dart:typed_data
...
This is all all-documentation change.
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1956263002 .
2016-05-08 18:12:50 -07:00
Leaf Petersen
86c4dc01a1
Only use white list on indefinite checks
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1953823005 .
2016-05-06 19:14:47 -07:00
Stephen Adams
a5d1626299
Update date_time.
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1952133007 .
2016-05-06 17:52:21 -07:00
Stephen Adams
090110fb65
Update native_typed_data
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1956993003 .
2016-05-06 17:26:25 -07:00
Stephen Adams
65e8266447
Update collection (list / map / iterable) printing.
...
Remove methods from IterableBase that are now on Iterable.
And random comments from other files.
Review URL: https://codereview.chromium.org/1956933002 .
2016-05-06 16:03:44 -07:00
Leaf Petersen
7c634031e5
Fix void subtype checks.
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1958683002 .
2016-05-06 14:04:03 -07:00
Jacob Richman
2cc3233c13
Remove unittest.js from codegen/expect directory.
...
BUG=
Review URL: https://codereview.chromium.org/1956053002 .
2016-05-06 13:48:33 -07:00
Jacob Richman
9520e96340
Switch to actual unittest, stack trace, and path packages. Tag tests as failing that were ignored due to the incomplete unittest library. Make running of unittests a bit more robust by wrapping them inside a mocha test to avoid unpredictable behavior due to interleaving async mocha and unittests.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1956513004 .
2016-05-06 12:28:44 -07:00
Nathan Kerr
c3b43ac87f
Merge branch 'master' of github.com:TheBosZ/dev_compiler
2016-05-06 11:01:14 -07:00
Nathan Kerr
1222de2623
Fix for Windows path separators.
2016-05-06 11:00:49 -07:00
Stephen Adams
7bd37f015f
Upgrade StringBuffer, identical
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1957633002 .
2016-05-05 21:11:09 -07:00
Stephen Adams
bf4e10e356
Update String.fromCharCodes from sdk
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1952223006 .
2016-05-05 20:52:27 -07:00
Vijay Menon
4b6e3feba1
Support module root
...
Fixes #553
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1960523002 .
2016-05-05 18:17:54 -07:00
Stephen Adams
5c41457500
Update CodeUnits.
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1956623002 .
2016-05-05 17:25:56 -07:00
Harry Terkelsen
d9e0533bf9
allow 'super' in async and finally blocks
...
Fixes #499
Fixes #528
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1948563002 .
2016-05-05 17:03:11 -07:00
Vijay Menon
7d32105a82
Pickup latest analyzer fixes
...
Note the new errors in sdk. Did we change something wrt overrides?
R=leafp@google.com
Review URL: https://codereview.chromium.org/1951263004 .
2016-05-05 16:30:39 -07:00
Stephen Adams
155597eebc
Update object.dart and some comments.
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1952903003 .
2016-05-05 16:29:06 -07:00
Stephen Adams
daddc0d4fa
Update number parsing.
...
Review URL: https://codereview.chromium.org/1950133008 .
2016-05-05 16:15:05 -07:00
Bob Nystrom
a191ce0384
Update dart:async to match the Dart repo.
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1953153002 .
2016-05-05 15:03:10 -07:00
Stephen Adams
6ef3c8821d
Updates for core/{pattern,regexp,stopwatch,duration}.dart
...
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1944413006 .
2016-05-05 11:43:32 -07:00
Stephen Adams
aa2baf19d3
Updates for js_array.
...
Copy over most js_array methods.
Remove IterableMixinWorkaround.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1943563002 .
2016-05-05 11:35:37 -07:00
Stephen Adams
f6fc1e380f
Upgrade Iterable and Iterator.
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1948113003 .
2016-05-04 20:22:42 -07:00
Stephen Adams
b016f035bd
Update String methods.
...
This will need a second pass after core.Iterable is updated
and JS type strings are better parsed.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1950133003 .
2016-05-04 19:40:51 -07:00
Leaf Petersen
a860134afc
Fix subtyping for generic typedefs. Generic typedefs were being
...
treated as classes.
Fixes https://github.com/dart-lang/dev_compiler/issues/550 .
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1948253002 .
2016-05-04 18:35:59 -07:00
Stephen Adams
a703b28667
Merge in JSNumber changes.
...
R=vsm@google.com
TBR=vsm@google.com
Review URL: https://codereview.chromium.org/1952043002 .
2016-05-04 16:41:13 -07:00
Bob Nystrom
a6d1fbfb9d
Fix accessing private members on extension classes.
...
Since the member was already a symbol, canonicalMember() was incorrectly
double wrapping it.
Fixes #508 .
R=vsm@google.com
Review URL: https://codereview.chromium.org/1944293003 .
2016-05-04 15:04:00 -07:00
John Messerly
56b9d090aa
fix #549 export of properties
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1949253002 .
2016-05-04 14:59:12 -07:00
John Messerly
c840252271
fix for #520 , ListMixin should work again
...
it regressed when dart:html was added and it became an "extension type"
R=vsm@google.com
Review URL: https://codereview.chromium.org/1949163003 .
2016-05-04 14:31:29 -07:00
John Messerly
2a6643a629
skip test that timed out in build
...
Review URL: https://codereview.chromium.org/1946233003 .
2016-05-04 14:02:30 -07:00
John Messerly
8acf8701d1
update gitignore and fix build
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1951993002 .
2016-05-04 13:48:32 -07:00
Stephen Adams
e227caef4d
Update core/{bool,errors,exceptions}
...
BUG=
Review URL: https://codereview.chromium.org/1952013002 .
2016-05-04 13:42:19 -07:00
Leaf Petersen
2f00ebd41c
Better is/as check handling. With this CL, the subtype function in
...
the DDC runtime returns null when a difference from the spec mode
result is possible.
Fixes https://github.com/dart-lang/dev_compiler/issues/524 .
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1945113003 .
2016-05-04 13:25:55 -07:00
Stephen Adams
be0d779177
Add corelib tests
...
99 have compile errors
265 generate code
94 fail
We will triage after updating the sdk.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1945153002 .
2016-05-04 11:09:28 -07:00
Stephen Adams
f6e0383b90
Update core/errors.dart
...
Also
- update some error helpers functions in the js runtime.
- add 'int' to stringFromCharCode to avoid dcalls.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1947723002 .
2016-05-04 10:41:14 -07:00
Stephen Adams
990c7dbb8f
Write .err file alongside .txt if no .js
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1949933002 .
2016-05-04 10:39:17 -07:00
Bob Nystrom
3bb9e0aa93
Don't wrap type literals that are referenced by prefixes.
...
Also, fix the language test for this to actually do something useful.
I accidentally removed the definition of testType() in the last patch,
so the test did nothing. :(
Fixes #547 .
R=vsm@google.com
Review URL: https://codereview.chromium.org/1945643005 .
2016-05-04 10:13:23 -07:00
Vijay Menon
642d08f400
Add global compile tool
...
This is for testing purposes and hence in tool. Gives a dart2js-ish
API to invoke DDC, but stuffs everything in one module.
Closed https://codereview.chromium.org/1900813002/ in favor of this.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1951433002 .
2016-05-04 08:57:31 -07:00
Stephen Adams
75d6cde61b
Split status by lib
...
Also
- allow failing tests to be run and checked for failure
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1946853002 .
2016-05-03 16:48:28 -07:00
John Messerly
2b20f3d1cc
fix #543 , export of properties should now work
...
top-level fields, getters, setters were all broken
R=vsm@google.com
Review URL: https://codereview.chromium.org/1949733002 .
2016-05-03 16:37:42 -07:00
Bob Nystrom
44db042cd8
Redo how Type objects are exposed from DDC.
...
- Instead of using the raw runtime type that DDC uses for its type
checks, use a WrappedType that correctly implements Type's interface.
- Compile class literals to wrap the type in a WrappedType.
- Make Object.runtimeType() do the same thing.
Fixes #488 . Fixes #511 .
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1944483002 .
2016-05-03 14:24:08 -07:00
Stephen Adams
6485751d8c
Implement Map.unmodifiable
...
This is a temporary solution.
When we have an implementation of const maps, we should switch to that.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1946663002 .
2016-05-03 12:02:20 -07:00
Vijay Menon
dc8e00b2da
Revert "Workaround #537 "
...
Undoing this. Paul fixed this in 1.17. We'll need to run with 1.17 builds going forward, but we need that for other reasons.
Fixes #537
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1936693002 .
2016-05-03 10:38:59 -07:00
Vijay Menon
6d8dc11397
Suppress extra cast
...
If I rebuild the SDK, I see a cast from List to List<E> on the next line without this. With the change, we just infer List<E> in the first place.
R=sra@google.com
Review URL: https://codereview.chromium.org/1945793002 .
2016-05-03 10:30:17 -07:00
Stephen Adams
1aa00bc447
List.unmodifiable
...
Most operations don't check, that will happen as more code is updated
to a more recent sdk.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1939093003 .
2016-05-03 09:34:44 -07:00
John Messerly
733773476d
instantiate generic tear-offs, fixes #525
...
R=het@google.com
Review URL: https://codereview.chromium.org/1930323004 .
2016-04-29 16:41:24 -07:00
Harry Terkelsen
428cb00f7d
include type parameters on generic sync/async functions
...
fixes #538
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1935823002 .
2016-04-29 15:25:56 -07:00
Vijay Menon
b2c0a7446e
Workaround #537
...
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1933383002 .
2016-04-29 12:47:16 -07:00
Stephen Adams
a7504464c3
Improve code for shifts and bitwise operations.
...
- JavaScript shifts can be used for operands in certain ranges.
- Coercion from signed-32 to unsigned-32 can be omitted if
- it is a no-op
- the context performs the coercion
- the context is insensitive to the most significant bit
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1920293005 .
2016-04-29 12:22:15 -07:00
Stephen Adams
a9837e0af6
Fix for messed-up short-circuit operators.
...
BUG= https://github.com/dart-lang/dev_compiler/issues/502
R=leafp@google.com
Review URL: https://codereview.chromium.org/1929283002 .
2016-04-29 11:57:23 -07:00
John Messerly
6598fa0f7d
implement generic method runtime behavior, fixes #301
...
R=leafp@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1926283002 .
2016-04-29 10:41:48 -07:00
Jacob Richman
7db49e6a44
Fixed 3 final missing casts in dart:js
...
BUG=
R=leafp@google.com
Review URL: https://codereview.chromium.org/1931373002 .
2016-04-29 08:50:14 -07:00
Harry Terkelsen
d109467369
Use lazy static fields when overriding static getters or setters.
...
Fixes #522
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1927353002 .
2016-04-28 15:42:01 -07:00
Stephen Adams
8c745c69d1
Fix modulo and bitwise operators.
...
Dart `%` is modulo, JS `%` is remainder, so call the runtime version.
Use dart2js interpretation of bit operations and shifts which always
produce a 32-bit unsigned result.
Optimization of the bit operations to follow.
BUG= https://github.com/dart-lang/dev_compiler/issues/518
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1924413002 .
2016-04-28 13:47:22 -07:00
John Messerly
9f764bf5b4
Make parts hermetic, fixes #531
...
R=paulberry@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/1930133002 .
2016-04-28 13:37:10 -07:00
Vijay Menon
9d49469af4
Reenable typed_data and html tests
...
TBR=jacobr@google.com
Review URL: https://codereview.chromium.org/1924423002 .
2016-04-28 13:00:07 -07:00
Jacob Richman
efa2303c64
Add all dart:html tests from the sdk to test/codegen. All tests are added except for js_array_test.dart and js_dart_to_string_test.dart which have to be stripped out for now due to failures.
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1930043002 .
2016-04-28 12:30:25 -07:00
Vijay Menon
acc4d6867d
Stop concatenating all tests
...
R=sra@google.com
Review URL: https://codereview.chromium.org/1928443006 .
2016-04-28 11:29:38 -07:00
Jacob Richman
eef7f81d0a
Land fix to StackTrace.current performance already landed in dart2js.
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1927813002 .
2016-04-28 09:28:25 -07:00
Sigmund Cherem
b163c86585
Make file-paths absolute before providing them to the CustomUrlResolver
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1931553003 .
2016-04-28 09:07:28 -07:00
Vijay Menon
3483e1974c
Qualify library names in packages
...
Partially addresses #504 . This is WIP, but wanted your thoughts.
Comment / questions:
- The current js_ast ImportDeclaration assumes a legal identifier I think.
E.g., this gets lowered:
import { src$interfaces } from "matcher"
- Should we thread package root through ModuleCompiler to let it packagify urls?
- How should we handle non-package urls? Pass in an explicit root dir
and go relative?
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1917863005 .
2016-04-27 21:03:58 -07:00
John Messerly
9de1e7426f
allow JS builtin to be typed as needed
...
this removes a lot of bogus casts. It also revealed one test that appeared to be passing, but was not actually passing.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1649583002 .
2016-04-27 13:04:26 -07:00
John Messerly
aa0b75f893
simplify emitting dart.bind for native types
...
R=het@google.com
Review URL: https://codereview.chromium.org/1921503007 .
2016-04-27 09:59:32 -07:00
John Messerly
45f57aab55
small cleanup in dart:_runtime
...
there was LazyTagged thing that was not necessary
R=vsm@google.com
Review URL: https://codereview.chromium.org/1920743003 .
2016-04-26 17:58:13 -07:00
Harry Terkelsen
bc0536a56a
Use static dispatch for dynamic on Object methods
...
Fixes #510
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1919173004 .
2016-04-26 17:54:02 -07:00
Harry Terkelsen
6a7e3ca102
Remove virtualField helper, just emit getters/setters in codegen.
...
Also fixes problems with final field overrides, which only override
the getter, not the setter.
BUG=https://github.com/dart-lang/dev_compiler/issues/486
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1918033002 .
2016-04-26 12:39:48 -07:00
Vijay Menon
936f059f48
Use correct annotation for JS names
...
Did we switch from "@JS" to "@JsName"?
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1920473003 .
2016-04-25 08:33:52 -07:00
Jacob Richman
afc18e6061
Update sdk removing explicit as checks.
...
BUG=
R=leafp@google.com
Review URL: https://codereview.chromium.org/1907353003 .
2016-04-25 08:25:03 -07:00
Vijay Menon
886616c3aa
Fixes #519
...
This is the Symbol bug which is breaking package:unittest.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1915533004 .
2016-04-22 11:26:57 -07:00
Jacob Richman
cb59a83138
Fix build break due to bug 522
...
BUG=
Review URL: https://codereview.chromium.org/1904373002 .
2016-04-21 17:18:44 -07:00
John Messerly
ea5016ccbe
fixes #516 , nested cascade code generation
...
our let* was not hygenic, due to incorrect use of named substitution
R=vsm@google.com
Review URL: https://codereview.chromium.org/1910233002 .
2016-04-21 15:19:15 -07:00
Jacob Richman
27ed87462b
Cleanup dart:indexed_db, dart:svg, and dart:js errrors. update dart:html with extra generic methods.
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1909193002 .
2016-04-21 14:51:18 -07:00
Harry Terkelsen
0d36e889e2
Emit forwarding getter/setter when overriding just a getter or setter.
...
Based on Vijay's change: 74dc4a6a80
BUG=https://github.com/dart-lang/dev_compiler/issues/497
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1899373002 .
2016-04-20 18:08:09 -07:00
Jacob Richman
a429090901
Fix undefined method errors adding no-op stubs for methods needed by dart2js but irrelevant in ddc. We could later optimize ddc by providing a custom dart:html that doesn't use these methods. Fixes https://github.com/dart-lang/dev_compiler/issues/506
...
BUG=
Review URL: https://codereview.chromium.org/1905803002 .
2016-04-20 18:03:29 -07:00
Jacob Richman
5dd5c364d6
Fix all dart:html strong mode errors except for spurious FINAL_NOT_INITIALIZED_CONSTRUCTOR warnings.
...
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1887233005 .
2016-04-20 15:31:41 -07:00
Jacob MacDonald
419f6e5382
add e2e tests for usage/compile errors
2016-04-20 14:29:38 -07:00
Jacob MacDonald
486d9f50cc
Move to AsyncWorkerLoop since CommandRunner.run returns a future.
2016-04-20 14:09:32 -07:00
John Messerly
261d7bf63a
a few small dart:_runtime cleanups
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1896343002 .
2016-04-20 12:52:32 -07:00
Vijay Menon
5cb361db25
Fix for node modules
...
We weren't emitting the actual program. :-)
Seems to work really well - using for easy command line testing.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1893293003 .
2016-04-19 14:28:43 -07:00
Harry Terkelsen
b53f682660
pipe filenames through sort for consistent ordering
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1895863003 .
2016-04-18 15:33:26 -07:00
Harry Terkelsen
7e32a93b26
emit 'this.x' when 'super.x' accesses a field
...
BUG=https://github.com/dart-lang/dev_compiler/issues/501
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1895903002 .
2016-04-18 14:44:23 -07:00
Jacob MacDonald
4e54ff0181
Move all args to per-request for the worker, and add a test
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1896613002 .
2016-04-18 11:17:08 -07:00
Harry Terkelsen
9f4ea0936c
don't crash when given no arguments
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1900693002 .
2016-04-18 09:26:10 -07:00
vsmenon
eb49d944cd
Update USAGE.md
2016-04-16 11:24:02 -07:00
John Messerly
4e958f5f54
Support reading summaries in DDC
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1893603003 .
2016-04-15 13:52:18 -07:00
Jacob MacDonald
cb358696e1
dont reuse the analysis context across worker requests
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1892553003 .
2016-04-15 10:54:06 -07:00
Jacob MacDonald
308fa5ccb4
Add bazel worker support to the dev compiler.
...
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1884073003 .
2016-04-15 06:51:40 -07:00
John Messerly
b8d55ce95d
add command test, fix relative paths
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1886393003 .
2016-04-14 12:35:05 -07:00
John Messerly
7950a0a88e
Fix DDC build
...
this was a last minute fix for relative paths, but it went wrong and broke the SDK build
Review URL: https://codereview.chromium.org/1887163002 .
2016-04-14 11:58:16 -07:00
John Messerly
0c148ecef4
Implement modular compilation
...
Highlights
* compile one module at a time
* use summaries to speed up compiles
* use command runner so we can add more commands later
* some long needed renames and file organization
* various other technical debt has been addressed
Lowlights
* lost node.js runner/tests (node output format still supported)
* possibly lost some closure support/workarounds (format still supported)
* needs more end-to-end tests of the new system
R=vsm@google.com
Review URL: https://codereview.chromium.org/1879373004 .
2016-04-14 11:28:12 -07:00
vsmenon
1cb3763ae8
Update CHANGELOG.md
2016-04-01 09:11:08 -07:00
vsmenon
fae421eb2b
Update devc.dart
2016-04-01 09:10:25 -07:00
vsmenon
9fd404001d
Update package.json
2016-04-01 09:10:14 -07:00
vsmenon
778c63755d
Update pubspec.yaml
2016-04-01 09:10:02 -07:00
Vijay Menon
d54ed38046
Work around dart:html inconsistency
...
We're hitting a runtime bug on requestAnimationFrame when we compile
against the latest dart:html in the analyzer (45) but run against the
DDC one (based on 39).
Adding the new type name by hand as a workaround until we roll, but
longer term we'll need to compile and run against the same sdk.
R=alanknight@google.com , leafp@google.com
Review URL: https://codereview.chromium.org/1849133003 .
2016-04-01 09:06:58 -07:00
vsmenon
196c8f33ea
Update CHANGELOG.md
2016-03-31 15:34:06 -07:00
vsmenon
8c336dbfff
Update devc.dart
2016-03-31 15:33:14 -07:00
vsmenon
d8349d6c77
Update package.json
2016-03-31 15:33:01 -07:00
vsmenon
4f17bacd8a
Update pubspec.yaml
2016-03-31 15:32:52 -07:00
Vijay Menon
14746d2501
Allow node tests to break on travis
...
Sorry for the spam. Browser tests are now working, but node cannot find the SDK:
https://travis-ci.org/dart-lang/dev_compiler/jobs/119936690
I suspect you're breaking this anyway?
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1845423003 .
2016-03-31 15:23:14 -07:00
Vijay Menon
ba92223ef9
Remove harmony flag for travis runs
...
This appears to trigger our generator breakage.
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1853433003 .
2016-03-31 15:10:11 -07:00
Vijay Menon
1d1438cec7
Regen against latest analyzer
...
A couple notes:
- regress_18535_test started failing at runtime. It's using unimplemented mirrors code, so perhaps a static failure before.
- typed_data_sublist_type_dart started failing at runtime. It was inferring Is<EfficientLength> with the type omitted. :-(
- my local chrome is newer than the one on travis failing on generators. not seeing that error.
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1847163002 .
2016-03-31 13:18:42 -07:00
John Messerly
e8bee43919
More analyzer updates, and handle negative_tests
...
Also fixes node_test to not overwrite main SDK log
R=vsm@google.com
Review URL: https://codereview.chromium.org/1840203002 .
2016-03-29 15:16:44 -07:00
John Messerly
63a119bd86
fix to run against latest analyzer
...
hard part was dealing with the new for-each changes
the good news is the new for-each logic simplifes our await-for checking
R=leafp@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org/1840713003 .
2016-03-28 14:22:36 -07:00
Leaf Petersen
569c4f9045
Tweaks to compile against latest analyzer. Also changes the travis
...
setup to only override analyzer dependencies when $ANALYZER is
explicitly set to master.
BUG=
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1808123006 .
2016-03-18 20:57:00 -07:00
Leaf Petersen
8a833f1e3a
Add generic types to Stream.transform in the DDC sdk.
...
https://github.com/dart-lang/sdk/issues/25860
Main SDK fix to follow.
BUG=
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1808393002 .
2016-03-17 17:49:15 -07:00
John Messerly
73159b6c1e
Remove code that requires whole-program compile
...
This change removes functionality that is not part of the core Dart Dev
Compiler, in particular those features that were not designed for
incremental/modular compilation.
For a while, the primary way to use DDC will be as a compiler invoked by
a build system, e.g. make or bazel or some node.js based-build system.
We'd love to see the user functionality provided by these return.
In particular, a well designed server+watcher system would be a huge
boost to productivity!
I'll see about moving over HTML reporting to Analyzer CLI. It has a lovely UI.
Thanks to everyone who contributed these features.
The following features were removed:
* DDC transformer. Transformers require whole world, in memory files.
* DDC server. The server has its own mini-build system.
* Various kinds of reporting. These should be moved to Analyzer CLI.
Note: batch compiler and the node runner are left for now.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1788973002 .
2016-03-15 11:30:50 -07:00
vsmenon
0641425db4
Update CHANGELOG.md
2016-03-15 10:36:42 -07:00
vsmenon
72c02ea2f9
Update devc.dart
2016-03-15 10:34:38 -07:00
vsmenon
fc35022f9a
Update package.json
2016-03-15 10:34:18 -07:00
vsmenon
2cb31f7219
Update pubspec.yaml
2016-03-15 10:33:58 -07:00
Leaf Petersen
2fae28ee43
Resolve obvious deprecation warnings on bleeding edge
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1797063002 .
2016-03-15 10:15:34 -07:00
Vijay Menon
5b4fdead8d
Fixes #479
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1803033002 .
2016-03-15 10:13:25 -07:00
Leaf Petersen
bf8c7cd07d
Filter warnings from dependency_overrides to make travis green on
...
bleeding edge analyzer.
Bleeding edge analyzer has some deprecation hints. We're using --package-warnings in our analyze.sh script and grepping for dev_compiler directory to limit us to dev_compiler errors. This CL adds
an additional filter to hide warnings from dependency_overrides.
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1781123004 .
2016-03-14 14:52:56 -07:00
John Messerly
8de2cf84bc
simplify function coercions -- DDC can generate function types in place
...
R=leafp@google.com
Review URL: https://codereview.chromium.org/1783603009 .
2016-03-14 10:37:57 -07:00
Vijay Menon
5007e1a562
Fix internal NSM helper to use a Dart Symbol
...
Not sure if this entirely handles #470 , but it does fix the breaking example.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1754773002 .
2016-03-11 09:05:56 -08:00
Vijay Menon
d530938a2b
Various cleanup
...
- Allow just analysis given html file
- Checked mode fix for html-report
- Clear pubspec.lock for transformer test
- Format run
R=jmesserly@google.com , ochafik@google.com
Review URL: https://codereview.chromium.org/1762283003 .
2016-03-09 12:58:22 -08:00
John Messerly
b8ae9f9b77
a few small refactorings to closure workarounds
...
* factor the class heritage workaround so it's out of the way & easier to remove later.
* always emit type parameters in the AST, and pass the flag to the printer to skip printing them.
* cleanup an unnecessary sync* method for closure field decls.
* also, reformats. I think I forgot to do that in previous CL.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1767803002 .
2016-03-08 15:56:18 -08:00
John Messerly
edec4a53e6
Reorganize tool/input_sdk/private
...
In particular, this moves DDC's magic runtime library into its own folder. The runtime library doesn't follow the same rules as other libraries, so it's easier to reason about in its own folder.
This is only file moves + changing libraries.dart to point at the new location.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1771713002 .
2016-03-08 15:52:12 -08:00
John Messerly
aad19229e2
DDC: remove dumpInfo flag
...
I was hoping to get rid of SummaryReporter altogether, but it looks like it's still used by server mode.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1778623002 .
2016-03-08 15:47:03 -08:00
Vijay Menon
f52a8c652f
Allow failure on transformer bot
...
This is experimental. We'll need to let this go red on occasion.
TBR=ochafik@google.com
Review URL: https://codereview.chromium.org/1772993004 .
2016-03-08 11:30:08 -08:00
John Messerly
4e29500150
remove checked mode from build_sdk. Saves ~25% from build SDK time
...
Review URL: https://codereview.chromium.org/1753453002 .
2016-03-08 11:03:33 -08:00
Vijay Menon
883972e37a
Fix deprecation message
...
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1775673002 .
2016-03-07 15:33:01 -08:00
vsmenon
4a108cc638
Update GENERIC_METHODS.md
2016-03-04 05:51:45 -08:00
John Messerly
93251ee241
upgrade to latest analyzer
...
fixes https://github.com/dart-lang/dev_compiler/issues/471
Changes here are:
* Analyzer now infers list/map literals
* Analyzer changed how isPotentiallyMutated* APIs work, so we need to track current function
* Another fix to arrow functions. We shouldn't skip generating covariant arg checks. If there were any, we use `=> { block }` form rather than `=> expr` form.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1757343002 .
2016-03-03 11:32:54 -08:00
John Messerly
d3932e1c50
Add a few more known non-null cases
...
Improves handling of identifiers and known elements, the `identical` function, and generative constructors.
R=ochafik@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1752193002 .
2016-03-02 13:32:27 -08:00
John Messerly
e1c5f6ddcd
use Source.isInSystemLibrary
...
Just a small cleanup to use the property instead of comparing the URI
R=vsm@google.com
Review URL: https://codereview.chromium.org/1749213006 .
2016-03-02 13:07:34 -08:00
John Messerly
5e36d5d0a0
Merge pull request #472 from dart-lang/allow-analyzer-master-failures
...
Allow analyzer master failures in Travis
2016-03-02 09:23:59 -08:00
vsmenon
d0374325ad
Update STRONG_MODE.md
2016-03-02 08:49:35 -08:00
Olivier Chafik
b28c202f0a
Allow failures with ANALYZER=master
2016-03-02 07:44:21 -08:00
Olivier Chafik
f20caad681
Split out transformer and node tests in their own env
2016-03-01 18:48:47 -08:00
Olivier Chafik
cc153484d3
Run a separate Travis env with analyzer#master
2016-03-01 18:48:47 -08:00
John Messerly
67b24939cd
refactor/simplify nullable inference code
...
Some of the high level changes are:
* visit catch body, fixes #463
* handle temps created by the compiler. These were in some cases treated incorrectly as non-null (see tests diff)
* compute nullable in the same pass as visiting assignments
* simplify visiting += and ++, fix ++ (it was dead code, #463 )
* simplify _isNullable
* if we fail to see a variable declaration, treat it as nullable
* stack trace in catch is treated as non-null
R=vsm@google.com
Review URL: https://codereview.chromium.org/1751963002 .
2016-03-01 16:44:05 -08:00
Vijay Menon
243a0377db
Search html extension types lazily
...
This speeds up compile of helloworld (non html) by 2x, and tools/test.sh by about 30%.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1752133002 .
2016-03-01 15:20:44 -08:00
Vijay Menon
316d1b6695
Fix #465
...
This preserves the type when cloning an AdjacentStrings node.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1756563002 .
2016-03-01 13:08:05 -08:00
Vijay Menon
3c049a8f3d
Fix #469
...
The real issue here is static type errors in dart:html code, which we need to cleanup. But it doesn't appear to ever make sense to use the static type here.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1754783002 .
2016-03-01 13:01:27 -08:00
John Messerly
ae404442ca
a little refactoring around identifiers/parameters
...
Main goal here is to isolate some code that was treating parameter declarations differently from other SimpleIdentifiers.
(We're going to need to emit generic method instantiations for SimpleIdentifiers in some cases, so it's going to be important to split out parameters from other expressions)
R=vsm@google.com
Review URL: https://codereview.chromium.org/1744453002 .
2016-02-26 10:00:15 -08:00
John Messerly
abf6065dc2
more function refactoring
...
Two more small bug caught/fixed in the process:
* Dart lambdas must generate as `=>` functions or we'll get the wrong `this`
* Another case where generators we using destructuring in a mismatched way
R=vsm@google.com
Review URL: https://codereview.chromium.org/1736723002 .
2016-02-24 16:54:07 -08:00
John Messerly
ca46b80811
simplify generation of functions
...
fixes incorrect destructuring codegen, and encapsulates type parameter comments better in _emitFunctionBody
R=vsm@google.com
Review URL: https://codereview.chromium.org/1729933002 .
2016-02-24 09:18:46 -08:00
John Messerly
d959316526
refactor: avoid parts
...
we try to avoid "parts" except in js_ast (because that will be split out into its own package)
R=vsm@google.com
Review URL: https://codereview.chromium.org/1724463003 .
2016-02-22 16:01:35 -08:00
vsmenon
2d0ad590a0
Update CHANGELOG.md
2016-02-22 15:08:55 -08:00
vsmenon
9586a5d217
Update devc.dart
2016-02-22 15:08:17 -08:00
vsmenon
d963f4f544
Update package.json
2016-02-22 15:08:03 -08:00
vsmenon
c54b468584
Update pubspec.yaml
2016-02-22 15:07:47 -08:00
Vijay Menon
c75d51d6bf
Fixes #460
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1718353002 .
2016-02-22 15:03:56 -08:00
Vijay Menon
c9c1c5233a
Disable transformer test to get travis green
...
See #458
TBR=ochafik@google.com
Review URL: https://codereview.chromium.org/1719983002 .
2016-02-22 08:43:12 -08:00
John Messerly
ab963d493b
fix analysis options to exclude an invalid test file
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1713273002 .
2016-02-19 15:41:28 -08:00
vsmenon
a0e81c9984
Update CHANGELOG.md
2016-02-19 15:05:03 -08:00
vsmenon
c222c45599
Update devc.dart
2016-02-19 15:04:31 -08:00
vsmenon
700e1d725f
Update package.json
2016-02-19 15:04:04 -08:00
vsmenon
a2841d780f
Update pubspec.yaml
2016-02-19 15:03:47 -08:00
Vijay Menon
ce985ef38d
Support StackTrace.current
...
This was recently added to the Dart SDK. Breaking Angular in DDC via stack_trace package.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1720473002 .
2016-02-19 14:25:21 -08:00
Bob Nystrom
472687101a
Update docs to suggest replacing dynamic with a type parameter.
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1716593002 .
2016-02-18 16:14:54 -08:00
vsmenon
64f6ccb819
Update CHANGELOG.md
2016-02-18 16:09:27 -08:00
vsmenon
de5b729e4a
Update devc.dart
2016-02-18 16:07:50 -08:00
vsmenon
c74bbb6c6d
Update package.json
2016-02-18 16:07:30 -08:00
vsmenon
381464a6a7
Update pubspec.yaml
2016-02-18 16:07:01 -08:00
vsmenon
4f37e97956
Update STATIC_SAFETY.md
2016-02-18 15:43:19 -08:00
Vijay Menon
93a627bf44
Wrapperless dart:html and friends
...
This reuses the dart2js code.
R=jacobr@google.com , jmesserly@google.com
Review URL: https://codereview.chromium.org/1700153002 .
2016-02-18 13:57:59 -08:00
Olivier Chafik
09845fbaf7
Use dart.global instead of window in debugger.dart
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1706973002 .
2016-02-18 16:38:00 +00:00
Vijay Menon
07155de9df
Fix additional hint
...
Missed this locally, but hitting travis. Probably need to update locally.
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1703263002 .
2016-02-17 13:31:21 -08:00
Vijay Menon
a9bcaf6c5b
Fix travis
...
This also regens based on the latest analyzer. Looks like most improvements on the code.
See #456
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1710583002 .
2016-02-17 13:12:52 -08:00
vsmenon
c2d42b14f8
Update STATIC_SAFETY.md
2016-02-17 11:19:08 -08:00
Olivier Chafik
8a28ce3c65
Introduce _emitParameterReferences to avoid mixing params with param references.
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1701583003 .
2016-02-16 14:39:15 +00:00
vsmenon
0e71ad70c6
Update CHANGELOG.md
2016-02-12 12:31:21 -08:00
vsmenon
07fe48f5b9
Update devc.dart
2016-02-12 12:29:24 -08:00
vsmenon
0c8ddd7795
Update package.json
2016-02-12 12:29:07 -08:00
vsmenon
8cc738f468
Update pubspec.yaml
2016-02-12 12:28:49 -08:00
Vijay Menon
fce423e295
Get travis back to green
...
Just commenting out the pub run test step.
TBR=ochafik@google.com
Review URL: https://codereview.chromium.org/1690393003 .
2016-02-12 12:18:51 -08:00
Olivier Chafik
7a373c1984
e2e test for transformer (webdriver + pub serve)
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1672563002 .
2016-02-12 14:53:17 +00:00
Olivier Chafik
037f9bfcb9
Make tool/get_chrome_canary.sh work on Mac
2016-02-12 14:23:18 +00:00
Vijay Menon
3f85417199
Support for dart:typed_data
...
Fixes #441
Fixes #444
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1680263002 .
2016-02-11 14:36:27 -08:00
Olivier Chafik
1851561638
Fix JS-intrinsic definition of SDK classes
...
`let Foo = class Foo {};` -> `class Foo {}`
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1681293005 .
2016-02-11 17:31:35 +00:00
Olivier Chafik
0e659e17c4
Use Uris for corelibOrder
...
(Seems to make some sdk imports not lazy anymore, without even burning the house)
Also, tiny module-related fixes to help with some es6 tools such as rollup:
- Avoid self-importing in eager corelibOrder hack
- Always export exports in es6 module builder
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1689013002 .
2016-02-11 17:28:06 +00:00
Olivier Chafik
4ad758998a
Emit TypeScript / Closure ES6_TYPED type annotations in --closure mode (instead of closure comments).
...
- Replaced ClosureType by a general JS.TypeRef, used in AST for identifier types, return types
- Convert DartType to JS.TypeRef (in mixin JsTypeRefCodegen), including type parameters (also added to AST in Fun & ClassExpression)
- Emit field declarations expected by TS
- Wrote a TypeScriptTypePrinter (mixed in by Printer) and a ClosureTypePrinter (might disappear soon)
- Simplified annotation code, called in more places (seems to gives more source info)
Example input:
List/*<T>*/ func/*<T>*/(List/*<T>*/ items, dynamic/*=T*/ seed) {}
class Foo<T> {
int i;
static var x;
Foo(this.i, o, {String v : "?"}) {}
}
Output:
function func<T>(items: core.List<T>, seed: T): core.List<T> {}
const Foo$ = dart.generic(function(T) {
class Foo<T> extends core.Object {
i: number;
static x;
Foo(i: number, o, {v = "?"}: {v?: string} = {}) {
this.i = i;
}
}
...
Foo.x = null;
return Foo;
});
Known remaining issues:
- typedefs expect a `type Callback = (...) => ...;` statement
- `exports` is a reserved keyword in TS (either we change the way we do exports, or we'll need a different temp + extra type annotations of the default-exported object).
- Generic type is currently locked inside the generic call. Might be able to solve by exporting signatures in .d.ts file, or changing the way we do generics.
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1676463002 .
2016-02-10 18:22:21 +00:00
Olivier Chafik
b4df401e51
Add ./tool/override_analyzer_dependency.sh to checkout latest analyzer + set is as override
...
Note that pub get is needed after this.
When DDC works with analyzer@master, we can setup a travis env by adding the following lines to .travis.yml:
before_install:
- test -z "$ANALYZER_BRANCH" || ./tool/override_analyzer_dependency.sh
env:
- ANALYZER_BRANCH=""
- ANALYZER_BRANCH="master"
Currently the latest analyzer provides null elements for CompilationUnit parts of dart._runtime (see failure: https://travis-ci.org/dart-lang/dev_compiler/jobs/107936636#L465 )
BUG=
R=leafp@google.com
Review URL: https://codereview.chromium.org/1682673002 .
2016-02-10 03:09:38 +00:00
Vijay Menon
817fbc5714
Fix checked mode break in server mode
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1679873004 .
2016-02-09 11:26:30 -08:00
Olivier Chafik
3f4667bc5d
Proper span/asset location for DDC errors in the transformer
...
BUG=
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1667173002 .
2016-02-09 17:06:09 +00:00
Olivier Chafik
0afdd61031
Improve --destructure-named-params:
...
- Destructure named params that clash with JS reserved names:
`f({arguments = 1}) {}` becomes `function f({['arguments']: arguments$ = 1} = {}) {}`
- Use ES6 default params for positional & optional parameters
- Added simple tests
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1677863002 .
2016-02-09 16:46:32 +00:00
Olivier Chafik
7cabe2b1df
Fix a couple of references in _runtime that should have been resolved as quasiquotes
...
(found when doing tree-shaking :-))
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1681593004 .
2016-02-09 16:35:09 +00:00
Vijay Menon
a4d4a8dd54
Infra for running lib tests
...
This is in prep for #441
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1673863002 .
2016-02-05 14:49:16 -08:00
Olivier Chafik
f2a26256e4
Simple transformer to run ddc in pub build/serve
...
- Added simple test that exercises relative and absolute imports
- Introduced FileSystem abstraction to collect compilation outputs /
seed runtime inputs
2016-02-04 19:08:50 +00:00
Olivier Chafik
98b21b030e
Revert "Use a symbol for static length/name (and other Function properties) for Closure, to avoid ES5->ES6 lowering bug ( https://github.com/google/closure-compiler/issues/1460 )."
...
This reverts commit a637e1b048487629d0d44620eb41e703531ce18d.
2016-02-03 20:35:59 +00:00
Olivier Chafik
84043ffd1e
Use a symbol for static length/name (and other Function properties) for Closure, to avoid ES5->ES6 lowering bug ( https://github.com/google/closure-compiler/issues/1460 ).
...
This is part of the overall "simple closure" effort (issue #312 )
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1630963003 .
2016-02-03 20:25:07 +00:00
Olivier Chafik
f7f21ca65e
Create local alias for super class in --closure mode (issue #312 )
...
Closure compiler chokes on super classes that aren't qualified paths.
(example: http://goo.gl/5mHC7S )
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1638533004 .
2016-02-03 20:21:12 +00:00
vsmenon
76326585b7
Update GENERIC_METHODS.md
2016-02-03 10:45:54 -08:00
vsmenon
1d0cf65b95
Update USAGE.md
2016-02-03 05:50:25 -08:00
Vijay Menon
a763c43486
Refactored this and uploaded here:
...
https://github.com/dart-lang/dev_compiler/blob/strong/STRONG_MODE.md
PTAL
R=jmesserly@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org/1541833002 .
2016-02-03 05:44:22 -08:00
John Messerly
dee054e23b
fixes #415 , correct type for map literals
...
Not sure why this wasn't implemented. Lists seem to be okay.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1611753002 .
2016-02-01 15:39:54 -08:00
John Messerly
f43b756b2f
fix #43 , remove => workaround
...
also fixes node.js test to use a temp directory, instead of creating "tmp" under dev_compiler checkout
R=vsm@google.com
Review URL: https://codereview.chromium.org/1643523008 .
2016-02-01 12:54:58 -08:00
vsmenon
c43cb167b2
Update CHANGELOG.md
2016-01-29 10:17:17 -08:00
vsmenon
980c580483
Update devc.dart
2016-01-29 10:16:19 -08:00
vsmenon
ff2eaeff82
Update package.json
2016-01-29 10:16:01 -08:00
vsmenon
f89b0931a0
Update pubspec.yaml
2016-01-29 10:15:46 -08:00
Vijay Menon
0fbd992505
Builds / serves multiple HTML files.
...
With this, I can build multiple Angular samples simultaneously:
[dist/dart/playground/build/web] dart ~/git/dev_compiler/bin/dartdevc.dart -o /tmp/ddc-out --force-compile src/*/index.html
Fixes #430
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1645343002 .
2016-01-29 10:13:28 -08:00
John Messerly
cf6bca8596
Remove library tags, they aren't needed
...
(with one exception: libs that have parts)
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1644823002 .
2016-01-29 09:25:34 -08:00
Olivier Chafik
edaf069dba
Add --modules=node support
...
- Force import order in all sdk files + simplify module builders
- Stub a node_test.sh with hello world + DeltaBlue (to be expanded to language tests in a followup change)
- Use global_ from dart:_runtime in html lib
- Better export for symbols that node chokes upon: throw, const, void, implements, export... (define as throw_ locally, with proper local resolution, then export as throw).
- Cleanup node module builder
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1633003002 .
2016-01-29 10:01:48 +00:00
Vijay Menon
b56617b947
Add CustomEvent
...
This just mechanically adds CustomEvent.
Fixes #423
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1616263005 .
2016-01-28 17:04:13 -08:00
vsmenon
82e0fc2cae
Update CHANGELOG.md
2016-01-28 15:46:16 -08:00
vsmenon
81625ea6b8
Update devc.dart
2016-01-28 15:45:19 -08:00
vsmenon
87db9db7a1
Update package.json
2016-01-28 15:45:02 -08:00
vsmenon
cd61e898bd
Update pubspec.yaml
2016-01-28 15:44:43 -08:00
Vijay Menon
a693930830
Roll analyzer to 0.27.2-alpha.1
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1641643004 .
2016-01-28 15:35:59 -08:00
Vijay Menon
c274b6f9e9
Regen tests
...
Forgot to do this after changing the flatten tests. pkg:collection also updated with some file moves.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1642903004 .
2016-01-28 14:39:15 -08:00
Vijay Menon
bd34d574be
Skip flatten tests
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1643003003 .
2016-01-28 14:24:05 -08:00
Olivier Chafik
04d4be0982
Less dart.notNull checks for local vars using flow-insensitive nullability inference.
...
Within some AST context (at library granularity, for convenience), we
collect all the assignments to local vars:
- Declaration with no initializer amounts to `null` assignment
- Assignment ops are expanded naively: `x++` yield an assigned value of
`x + 1`, etc
We detect "trivially nullable" variables (e.g. `var x;`, `x =
breaking.out;`) by spotting assigned values that are nullable under the
optimistic assumption that all known variables are non-nullable.
Then we build a nullability dependency graph in linear time: whenever
we see `x = y;`, we know that "y is nullable" implies "x is nullable".
Finally, we propagate "trivial nullabilities" through that graph: any
variable that wasn't reached is deemed not-nullable.
(this is similar to mark and sweep garbage collection, where the roots
are the "trivially nullable" variables; credits to leafpetersen@ for
linear solution)
2016-01-28 15:47:49 +00:00
John Messerly
33c186f49c
fix a typo in generic method docs
2016-01-27 15:56:26 -08:00
Vijay Menon
731dc0633b
Handle local files better in server mode
...
We're already serving sources from the original directory (for source
maps). This lets us serve other resources as well. Makes it simpler
to run angular todo and other apps with xhr'ed data.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1644673002 .
2016-01-27 14:03:52 -08:00
John Messerly
0b646eb520
fixes #427 , static fields emitted outside the scope of their class
...
mainly, this backs off of some readability optimizations around static and top-level fields that were too aggressive. On their own, they were okay, but they collide with the library-cycle issues. Once we can remove that issue, we could consider restoring some of this. In the meantime, simplicity is good.
The new operation in the declaration loader is to allow us to see if an initializer has all its dependencies satisfied, but without changing any ordering if they are not.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1636233002 .
2016-01-27 09:35:40 -08:00
Vijay Menon
d043d05544
Rebase on latest package:collection
...
pub get now pulls in a new one
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1645633002 .
2016-01-27 08:49:43 -08:00
John Messerly
de8e3a0cff
Merge pull request #429 from dart-lang/module-builder-followup
...
Import package:path with an alias in module_builder
2016-01-26 13:47:03 -08:00
Vijay Menon
a2ced17c9a
Run format
...
Looks like a recent commit missed a format / presubmit.
TBR=jmesserly@google.com ,ochafik@google.com
Review URL: https://codereview.chromium.org/1631303003 .
2016-01-26 09:54:26 -08:00
Olivier Chafik
c119af7d32
Import package:path with an alias in module_builder
...
(follow-up to hasty
https://github.com/dart-lang/dev_compiler/commit/b379f403d556a6eca9a7e07
74611999c623f03e6)
2016-01-26 17:44:58 +00:00
John Messerly
1aa4073a8f
Merge pull request #420 from dart-lang/fix_419_docs
...
fixes #419 , clarify docs around /*=T*/
2016-01-26 08:50:23 -08:00
Olivier Chafik
4eec9f5ff4
Resolve local paths in es6 modules (+ refactor ModuleBuilder)
2016-01-26 14:00:46 +00:00
Olivier Chafik
adf6842f6c
Initial --modules=es6 support
...
Known issues:
- Import syntax: using 'dart/core' right now, but should be
'./dart/core' or something else?
- _jsModuleValue not supported in es6 output yet (how is it meant to be
used?)
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1612083002 .
2016-01-24 18:09:59 +00:00
Jacob Richman
2dfc37b9ed
Use the great new Devtools API for custom formatters. Now Dart objects are now generally as easy to view in the debugger in Chrome using dev_compiler as they are using Dartium. There are still some edge cases that need to be polished but most of the general property display and type information is done.
...
Checkpoint in devtools debugger support.
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1625563002 .
2016-01-22 13:28:28 -08:00
John Messerly
8f83c969d2
rebase expectations
...
no changes here, just rebases against latest analyzer
R=ochafik@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1619483003 .
2016-01-22 13:16:09 -08:00
Olivier Chafik
fc81df2f43
Rehab test dropped by mistake in c9d909ced98dea2aefe20322a59d18fbab2d93b2
2016-01-22 14:51:33 +00:00
John Messerly
0d9b50eca2
fixes #419 , clarify docs around /*=T*/
...
Adds an example and some text to show an alternate usage of /*=T*/ form, where it provides another named type to use for non-strong mode tools.
2016-01-21 17:09:35 -08:00
Olivier Chafik
940cb14d16
Reapply 635620c97f0316cfadada3afb897eff3f2a9cdd5 after 6c1c9403788a85a98ee5d5a1f86ff2a3f6a61593
2016-01-21 00:58:19 +00:00
Olivier Chafik
3886194414
Generate _runtime.js from dart ( https://github.com/dart-lang/dev_compiler/issues/310 )
...
The following part files were ported from the original .js (lib/runtime/dart/_foo.js -> input_sdk/private/foo.dart):
- input_sdk/private/rtti.dart
- input_sdk/private/types.dart
- input_sdk/private/classes.dart
- input_sdk/private/errors.dart
- input_sdk/private/generators.dart
- input_sdk/private/operations.dart
- input_sdk/private/runtime.dart
Notes:
- Introduced genericTypeConstructor intrinsic: `JS('', '#(type)', genericTypeConstructor(List))` generates `core.List$(type)`
- Used new JS quasiquotes everywhere
- Depends on new internal `@JSExportName` annotation to alias symbols like dart.{as, is, const, assert, export, implements, throw, async, dynamic, void} (see https://codereview.chromium.org/1580413002/ )
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1530563003 .
2016-01-21 00:45:31 +00:00
John Messerly
cc2f706ded
partial fix for #414 , nSM message for dcall should show correct target
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/1601353002 .
2016-01-19 13:33:54 -08:00
Vijay Menon
077465ddc8
Fixes #412
...
Adds Screen, Navigator.language, and HTMLHtmlElement to dart:html
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1607073002 .
2016-01-19 13:31:12 -08:00
John Messerly
5b45c6ef87
partial fix for #414 , avoid dcall in _convertToDart
...
this doesn't fix the root call, but still, it's nice to clean up this dead code
R=vsm@google.com
Review URL: https://codereview.chromium.org/1609843002 .
2016-01-19 12:02:06 -08:00
Olivier Chafik
51c3bcbe14
Add a @JSExportName
annotation for internal use in the runtime (use it to export dart.assert instead of assert_)
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1580413002 .
2016-01-19 17:51:18 +00:00
Leaf Petersen
bccc3c2e62
Some phrasing fixes
...
BUG=
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/1585753003 .
2016-01-13 17:24:32 -08:00
Leaf Petersen
72bef943fb
Add file documenting generic method prototype syntax
...
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1586803002 .
2016-01-13 14:28:29 -08:00
Jacob Richman
2a1cbc829c
Fix for html_common
...
BUG=
R=leafp@google.com
Review URL: https://codereview.chromium.org/1583943002 .
2016-01-13 11:13:59 -08:00
Jacob Richman
daeadb187b
Avoid parsing and then generating HTML for documents without Dart scripts. This is a fragile workaround to avoid messing up Angular templates.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1587693002 .
2016-01-13 10:55:18 -08:00
vsmenon
0c1714ca4b
Update CHANGELOG.md
2016-01-13 08:22:38 -08:00
vsmenon
be2c89b28e
Update devc.dart
2016-01-13 08:20:37 -08:00
vsmenon
78f337f7e5
Update package.json
2016-01-13 08:19:54 -08:00
vsmenon
b5b6594319
Update pubspec.yaml
2016-01-13 08:19:29 -08:00
Vijay Menon
e907ebb106
Fixes #408
...
This is a bug on JSON.decode. This should match the hand fix in #404 .
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1579223002 .
2016-01-12 14:17:40 -08:00
Vijay Menon
6e8375ed0d
Added Comment to dart:html
...
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1577423002 .
2016-01-12 14:16:32 -08:00