Commit Graph

37 Commits

Author SHA1 Message Date
Andrew Krieger 87bcbf9147 Move type tagging logic out of setSignature
setSignature is only called for classes with constructors or static
members, so previously _runtimeType was only set explicitly on such
classes. Now _runtimeType is not set on any classes except for Object,
and all other types inherit _runtimeType from Object.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2076713002 .
2016-06-27 15:29:15 -07:00
John Messerly d27eda4ffc implement user-defined nSM, Object members on functions
fix #591 and fix #59

R=vsm@google.com

Review URL: https://codereview.chromium.org/2061373003 .
2016-06-22 17:18:52 -07:00
Stan Manilov 715c845d85 Add a regression test for bug #587
BUG= https://github.com/dart-lang/dev_compiler/issues/587
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2075493002 .
2016-06-15 16:58:57 -07:00
Leaf Petersen 3e5d1d80e6 Fix function subtyping crash
Fixes #588

BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/2069653003 .
2016-06-14 09:55:04 -07:00
Leaf Petersen 59abfdb121 Fix bot, law of the excluded middle still holds
TBR=jacobr@google.com

BUG=

Review URL: https://codereview.chromium.org/2037503002 .
2016-06-01 20:58:44 -07:00
Leaf Petersen 40c7ac9038 Wire up class hierarchy for recursive inheritance
BUG=
R=jacobr@google.com

Review URL: https://codereview.chromium.org/2033543002 .
2016-06-01 19:21:45 -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
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
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
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
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
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
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
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
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
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
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
Harry Terkelsen 0d36e889e2 Emit forwarding getter/setter when overriding just a getter or setter.
Based on Vijay's change: https://github.com/dart-lang/dev_compiler/commit/74dc4a6a808b271312aabe1bf463f1e7f4889a43

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
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
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
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
Leaf Petersen 1c119bebb2 Update to latest analyzer
Fixes https://github.com/dart-lang/dev_compiler/issues/393

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1554683002 .
2016-01-05 15:58:50 -08:00
John Messerly bea9ae786a add language tests & run them in karma 2015-09-16 16:00:46 -07:00
John Messerly ff1b78ca42 fix a few more codegen issues:
* don't generate script tag
* handle U+2028 and U+2029
* handle name conflict with constructor

R=vsm@google.com

Review URL: https://codereview.chromium.org/1347453002 .
2015-09-14 17:06:28 -07:00
John Messerly 637c2c83de fixes #314, super method tear offs
R=leafp@google.com

Review URL: https://codereview.chromium.org/1310513013 .
2015-09-10 17:18:21 -07:00
John Messerly 99bdee4f8d fix implicit_scope_test and builtin_identifier_test
these were generating invalid JS code

R=vsm@google.com

Review URL: https://codereview.chromium.org/1328303002 .
2015-09-08 16:56:50 -07:00
John Messerly 7263daed54 fix dynamic type literal
it doesn't have a library

R=leafp@google.com

Review URL: https://codereview.chromium.org/1310943005 .
2015-09-04 15:57:32 -07:00
John Messerly badedeaf16 fix cascade on ThisExpression
R=leafp@google.com

Review URL: https://codereview.chromium.org/1309383003 .
2015-09-04 15:28:38 -07:00
John Messerly 707b9cc09c triage remaining async tests
one fix, two rejected statically

R=leafp@google.com

Review URL: https://codereview.chromium.org/1319523007 .
2015-08-31 17:49:41 -07:00
John Messerly 74c760066b implement null aware ops, fixes #249
this also implements multitest support, which fixes #280

Fixes some other preexisting bugs:
* MetaLets did not simplify themselves correctly in some nested cases
* Library prefixed identifiers did not work as lvalues in opassign
* dsetindex/dput/[]= methods did not return a value
* checker did not correctly handle invalid constructor field initializers
* cascades did not correctly work with method invocations(?)
* postfix ++/-- did not correctly generate lvalues in some cases

The good news: because this reuses on our existing lvalue/metalet helpers, it managed to flush out a lot of bugs in other features that use them.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1316723003 .
2015-08-25 15:13:18 -07:00
John Messerly cbe23ee268 implement exports, fixes #141
R=vsm@google.com

Review URL: https://codereview.chromium.org/1263583005 .
2015-08-04 17:23:13 -07:00
John Messerly 8422d7ab48 fix language_tests.js to use strict mode
we weren't running a bunch of tests on the bots :|
amazingly, none were broken yet
this also fixes karma.conf log level, and disables some spammy prints from one of the tests

R=vsm@google.com

Review URL: https://codereview.chromium.org/1257233008 .
2015-08-03 14:08:28 -07:00
John Messerly 9137a4538c fixes #221, initial sync*, async, async* implementation
also fixes #270

R=vsm@google.com

Review URL: https://codereview.chromium.org/1243503007 .
2015-07-28 16:52:23 -07:00