Stephen Adams
dccce129e4
dart2js-kernel: Don't crash on non-constant constants
...
Change-Id: I7919ccdcd72f6653d2baa3c25c5d18df982ccda4
Reviewed-on: https://dart-review.googlesource.com/5941
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-15 21:44:24 +00:00
Harry Terkelsen
3a25ead178
Generate super.noSuchMethod if super call is malformed
...
This doesn't fix all of the errors with
'Error: ".function" called on null' stacktraces.
Change-Id: I7ddc0405db7e2f028eb27028c854dab29a0adf16
Reviewed-on: https://dart-review.googlesource.com/5522
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2017-09-15 20:03:51 +00:00
Johnni Winther
bc1f9f4d45
Handle factory constructor calls in inferrer
...
Change-Id: I04f0cbd760a1ba6bc93ca23a826946a547d9d543
Reviewed-on: https://dart-review.googlesource.com/5763
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2017-09-15 18:14:39 +00:00
Brian Wilkerson
b30fab9320
Pass the of keyword in part-of directives to listeners
...
Change-Id: I0774f6ee806aff52981bc2f049ef402f4f52c102
Reviewed-on: https://dart-review.googlesource.com/5340
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-15 15:54:43 +00:00
Dan Rubel
db7129d8a4
cleanup endMetadataStar event
...
Change-Id: I9fcd69219858cdb063d3e37f2788750f72132d65
Reviewed-on: https://dart-review.googlesource.com/6140
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-15 12:37:37 +00:00
Johnni Winther
a7f3d53e7e
Use --use-kernel in closed_world2_test
...
Change-Id: I5b94b7b208c993afcd325d69c9a19a83e8960364
Reviewed-on: https://dart-review.googlesource.com/5440
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-15 09:53:36 +00:00
Johnni Winther
30fb709226
Update impact_test to use --use-kernel
...
Second attempt
Change-Id: Iec21e5c875e56d972fdea2e15b310ee7dc2eea38
Reviewed-on: https://dart-review.googlesource.com/5400
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-15 08:52:07 +00:00
Johnni Winther
5c057e7ca4
Refactor handling of type variable access.
...
Change-Id: I41a796346979fb060f717ab38f7ca1a47f6b2d80
Reviewed-on: https://dart-review.googlesource.com/5740
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-15 08:27:26 +00:00
Johnni Winther
5fc6698b8a
Handle parameters in inferrer.
...
Change-Id: Icec402d7f226e3a39fd64671b86623d7d9d35ffe
Reviewed-on: https://dart-review.googlesource.com/5800
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-15 07:53:25 +00:00
Emily Fortuna
83f5b64ea1
When accessing "super" properties, capture "this".
...
Bug:
Change-Id: I770aed67e2e4d078feba7d04662029e9a0a454fc
Reviewed-on: https://dart-review.googlesource.com/5601
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-14 17:37:07 +00:00
Dan Rubel
d69a0aa3d5
revise parser to use handleNativeClause
...
modify the fasta parser to use handleNativeClause
when parsing methods with a native clause.
Change-Id: Ia631c471f9f8ea7a9e261d112a8ccd96f9eafa46
Reviewed-on: https://dart-review.googlesource.com/3786
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-14 13:25:48 +00:00
Johnni Winther
5aa3259698
Handle break to labeled statement
...
No tests yet. Kernel doesn't support file-offsets on labeled statement.
Change-Id: I5dcfcc21433aec5ad0be26bfef5bbca0b609ba35
Reviewed-on: https://dart-review.googlesource.com/5161
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-14 08:59:11 +00:00
Johnni Winther
2acf735159
Remove Local.memberContext and Local.executableContext
...
Change-Id: Icd1ff9ac06fb218731c618c5fc87e4d69bb47e77
Reviewed-on: https://dart-review.googlesource.com/5240
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-14 08:14:15 +00:00
Stephen Adams
45d6ed8a01
Allow 'lookup' of native classes declared in dart2js_native and dart2js_extra tests'
...
R=johnniwinther@google.com
Change-Id: I510fd1f76c5369fdf37b833ccce10dc788810099
Reviewed-on: https://dart-review.googlesource.com/5640
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-14 03:59:00 +00:00
Stephen Adams
26d220445c
dart2js-kernel: Handle type variables with names like '#U0'
...
R=sigmund@google.com
Bug:
Change-Id: I91972d7b0324e0ba7f4969529e203da40923ad55
Reviewed-on: https://dart-review.googlesource.com/5580
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-13 23:18:21 +00:00
Harry Terkelsen
c0edd4ee0e
ensure type arguments for instantiations are in the class hierarchy
...
Change-Id: Ife2da89018278fa5e5a9b940f7052006f2f7f841
Reviewed-on: https://dart-review.googlesource.com/5485
Commit-Queue: Harry Terkelsen <het@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-13 18:55:48 +00:00
Stephen Adams
5ab592a3b5
Compute field initializers in correct order with respect to type parameters and other initializers
...
Change-Id: I253515188d4428de88bcca4799dac6204d3e7329
Reviewed-on: https://dart-review.googlesource.com/5299
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-13 02:16:32 +00:00
Harry Terkelsen
b7666dd327
dart2js: Remove lookup map support
...
Change-Id: Id435dc0f54165285c0d291d2e1c984da92bfd22a
Reviewed-on: https://dart-review.googlesource.com/5284
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2017-09-12 20:16:12 +00:00
Brian Wilkerson
bb915a394c
Pass the comma in a catch clause to listeners
...
Change-Id: I33173614c22a9132f850750a441f443b539ed666
Reviewed-on: https://dart-review.googlesource.com/4980
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-12 18:46:20 +00:00
Emily Fortuna
50d35a9e23
Provide access to the context in which this closure originally existed.
...
Bug:
Change-Id: Iebed156ffdcc54968397c230b41a8b12f828e1ec
Reviewed-on: https://dart-review.googlesource.com/5100
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2017-09-12 18:27:21 +00:00
Brian Wilkerson
8f6f4d9d24
Pass the parens in conditional uris to listeners
...
Change-Id: I1cf41c32ae60ba1c0e8389a583d9188ad4f9ba89
Reviewed-on: https://dart-review.googlesource.com/5003
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-12 16:49:38 +00:00
Johnni Winther
abd20df0f8
Revert "Update impact_test to use --use-kernel"
...
This reverts commit 7222ff6136 .
Change-Id: I2c419961230f1d7e240fc6dbb892fa8e43cb6896
Reviewed-on: https://dart-review.googlesource.com/5201
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-12 12:13:10 +00:00
Johnni Winther
7222ff6136
Update impact_test to use --use-kernel
...
Change-Id: Ib4e40783602a1ec821584aa7f4724a92387c6b0b
Reviewed-on: https://dart-review.googlesource.com/3940
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-12 11:20:06 +00:00
Johnni Winther
31fc92f886
Remove LocalsHandler.contextClass
...
Change-Id: I006a9a442e9871c2b60b72a8453333046cd84578
Reviewed-on: https://dart-review.googlesource.com/4742
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-12 10:24:02 +00:00
Johnni Winther
80e795fe0c
Handle for-in in inferrer
...
- includes static calls and simple new expressions.
Change-Id: I5c26cc1a3fa311c5f11f6e84c4e6ff5f748ca64d
Reviewed-on: https://dart-review.googlesource.com/4780
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-12 07:32:48 +00:00
Emily Fortuna
553e4a0967
Don't make field entities for variables in boxes.
...
Bug:
Change-Id: Ie31e88438da93a1d54c8c688a5ccd212bb81bb28
Reviewed-on: https://dart-review.googlesource.com/4241
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2017-09-11 23:32:51 +00:00
Johnni Winther
54b57079a3
Handle used postfix and (used) prefix in inferrer
...
Change-Id: Ia8befd70a937aeb4a8f0f32f98b28f0e6ec39f73
Reviewed-on: https://dart-review.googlesource.com/3886
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-11 07:57:15 +00:00
Harry Terkelsen
d1a34a2c7f
add type variables for all classes in the hierarchy for a constructor
...
Change-Id: I4c8df08e5893297c0d662bec469c8e06992369cf
Reviewed-on: https://dart-review.googlesource.com/4605
Commit-Queue: Harry Terkelsen <het@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-08 23:19:20 +00:00
Paul Berry
16d505327b
Rename handleBinary{Operator,Expression} to {begin,end}BinaryExpression.
...
This makes the names more consistent with the other parser listener
methods.
Change-Id: Ic9f636a520bcc40e0ed281963ff079d4ce0202db
Reviewed-on: https://dart-review.googlesource.com/4120
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-08 18:03:51 +00:00
Johnni Winther
35733a265f
Split cached SourceFileProvider input into utf8 and binary
...
This (re-)enables the [autoReadFromFile] functionality when using
--use-kernel by allowing to read source files when these have already
been read as binary.
The fasta front-end pulls input as binary meaning that the diagnostics
handler doesn't know how to print source locations. Splitting the cache
allows us to fetch the source as string when needed for diagnostics.
Change-Id: Ib3bea2fb999be10f86e82ea623ee24a5c1ad9bf4
Reviewed-on: https://dart-review.googlesource.com/3880
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-08 08:41:32 +00:00
Harry Terkelsen
607e3ecd69
Fixed the test by checking if typedefs are malformed.
...
This prevents the getFunctionTypeOfTypedef call from failing in
checked mode by returning a MalformedType.
Revert "Revert "Add types referenced in is-checks to the class hierarchy""
This reverts commit e0a4839c3e .
Change-Id: I1e94ba5ba345c36e04e54da6e8c0580a21836838
Reviewed-on: https://dart-review.googlesource.com/3422
Reviewed-by: Harry Terkelsen <het@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-07 19:56:26 +00:00
Emily Fortuna
4e9524b516
Fix Dart analyzer error with change in https://github.com/dart-lang/sdk/commit/d7e28e386d7a05e092f75da42b1ab9eb4c7ee9e9
...
Bug:
Change-Id: Ia584d16b4c760d1b17b2a08dd54b6ff8b97f020e
Reviewed-on: https://dart-review.googlesource.com/4101
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-07 18:30:04 +00:00
Emily Fortuna
d7e28e386d
Make constructor entities and constructor body entities share the same locals map lookup.
...
Bug:
Change-Id: Icdd1bfe64aaa0e2362d71f005a1037d1ab947402
Reviewed-on: https://dart-review.googlesource.com/3425
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-07 18:10:35 +00:00
Dan Rubel
6cfee12257
remove duplicate dart2js external method check
...
This removes an error generated by the front-end that is already
reported by dart2js and fixes a failing test.
Change-Id: I8082cab9546b962a0b3d4011044fe224867e7613
Reviewed-on: https://dart-review.googlesource.com/3960
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-09-07 13:24:45 +00:00
Dan Rubel
ec606a7874
report ExternalMethodWithBody error for native method with body
...
Change-Id: Ibca0cd1223ee61cafd2427d26448a1890a04aae8
Reviewed-on: https://dart-review.googlesource.com/3560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-09-07 11:03:45 +00:00
Johnni Winther
68b3e9b494
Handle local invoke in inferrer
...
Reviewed in https://codereview.chromium.org/3008133002/
Change-Id: I65595edf34bf4774a9cadc4cb0dc9bf0572dd4df
Reviewed-on: https://dart-review.googlesource.com/3883
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com >
2017-09-07 08:28:20 +00:00
Johnni Winther
c776ff8fce
Handle variable set in inferrer
...
Reviewed in https://codereview.chromium.org/3008083002/
Change-Id: I5e597a248667bea084d75bb9f8dcb2afa40f4904
Reviewed-on: https://dart-review.googlesource.com/3443
Reviewed-by: Erik Ernst <eernst@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2017-09-06 13:11:20 +00:00
Johnni Winther
9a9d963634
Handle variable declarations in inferrer
...
Reviewed in https://codereview.chromium.org/3009043002/
Change-Id: I16454302f1899c68f8e816cfc26ccd3851f07ad3
Reviewed-on: https://dart-review.googlesource.com/3441
Reviewed-by: Erik Ernst <eernst@google.com >
2017-09-06 09:35:20 +00:00
Johnni Winther
c48f9c171b
Remove unneeded check.
...
Change-Id: I0de18032ee0f3ade9eb165673bae9a94f383d13b
Reviewed-on: https://dart-review.googlesource.com/3120
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2017-09-06 08:09:21 +00:00
Harry Terkelsen
e0a4839c3e
Revert "Add types referenced in is-checks to the class hierarchy"
...
This reverts commit a577b303f0 .
Bug:
Change-Id: I8a02bf3ef559de8af62aef9d4b7e840975bb5b47
Reviewed-on: https://dart-review.googlesource.com/3343
Reviewed-by: Harry Terkelsen <het@google.com >
2017-09-05 23:13:29 +00:00
Harry Terkelsen
a577b303f0
Add types referenced in is-checks to the class hierarchy
...
Change-Id: Ia250501052efc051779f75f9d582c1ceaa2c78f4
Reviewed-on: https://dart-review.googlesource.com/3384
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-05 21:53:35 +00:00
Stephen Adams
080169c51a
dart2js kernel: sort constants
...
reviewed: https://codereview.chromium.org/3011803002
TBR=sigmund@google.com
Change-Id: Ic444964c3d5995d12e4e00f0af44c175533b7291
Reviewed-on: https://dart-review.googlesource.com/3340
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-05 20:30:43 +00:00
Emily Fortuna
3aa574d95d
Add ability to look up type parameters that are associated with ClassEntities with the element environment.
...
This is the reapplication of this already approved CL: https://codereview.chromium.org/3010943002/ but now with Gerrit.
Bug:
Change-Id: I4c2204d1f76bdec4bcad993c8a11b5f003d38d77
Reviewed-on: https://dart-review.googlesource.com/3341
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-05 19:36:55 +00:00
Harry Terkelsen
bb312921ac
Revert "Add types referenced in is-checks to the class hierarchy"
...
This reverts commit c8d2478747 .
BUG=
Review-Url: https://codereview.chromium.org/3012733002 .
2017-09-01 15:27:28 -07:00
Harry Terkelsen
c8d2478747
Add types referenced in is-checks to the class hierarchy
...
R=johnniwinther@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/3011793002 .
2017-09-01 15:02:59 -07:00
Johnni Winther
49439c1412
Align synthetic mixin names with fasta.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/3007043002 .
2017-09-01 20:42:11 +02:00
Johnni Winther
5d96c36a4a
Encapsulate the index based maps for entities.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/3004433002 .
2017-09-01 20:15:54 +02:00
Stephen Adams
dbcc7835a7
rank_stacks tweaks
...
- Cluster stacks on printed prefix instead of entire stack.
- Print records with a stack that is a prefix of another stack (this happens for d8 errors where there is no dart2js stack)
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/3007023002 .
2017-09-01 10:26:10 -07:00
Emily Fortuna
b1dd578da7
Don't try to add abstract methods to the codegen work queue to generate bodies
...
BUG=
R=johnniwinther@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/3012683002 .
2017-09-01 10:21:03 -07:00
Johnni Winther
374df045e7
Handle forwarding constructors to unnamed mixin applications
...
+ handle instance fields from mixins
+ change class sorting to put unnamed mixin applications last
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/3005823002 .
2017-09-01 19:07:02 +02:00