Aske Simon Christensen
accddd1d97
Use error message templates for error tokens
...
Also fixes unicode U+ notation in error messages to use uppercase
letters for the hex code, as per the Unicode Standard conventions.
Closes https://github.com/dart-lang/sdk/issues/29985
Change-Id: I6397e03cb3e0d5eca156621bb4b19dfa643d9437
Reviewed-on: https://dart-review.googlesource.com/9320
Commit-Queue: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-10-02 14:23:26 +00:00
Johnni Winther
079022200d
Handle while loop in inferrer
...
Change-Id: I203094e10442bc6ab9fb38d401643ab7c6f0c4b3
Reviewed-on: https://dart-review.googlesource.com/9280
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-02 09:20:49 +00:00
Johnni Winther
3bf733fe37
Handle simple local functions in inferrer
...
Change-Id: I02a264a1ddfa36442cdff30d1ab3be15dc95c2e9
Reviewed-on: https://dart-review.googlesource.com/9760
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-02 08:50:25 +00:00
Johnni Winther
3da55c7a88
Handle conditional expression in inferrer
...
Change-Id: Id23c2f2844c34074b187298ed0bb682e3782c53b
Reviewed-on: https://dart-review.googlesource.com/9261
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-02 08:16:36 +00:00
Johnni Winther
6b1068bbd1
Handle unary- and foreign calls
...
Change-Id: I88cf1e133d5c0b10815755e65ba6350f7b9cf03a
Reviewed-on: https://dart-review.googlesource.com/9200
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-02 07:57:15 +00:00
Dan Rubel
5a67a64957
Refactor parseClass
...
Refactored the parseClass method in preparation for
adding recovery, updating error messages, and analyzer integration.
* Added several new parser events
- handleClassExtends
- handleClassImplements
- handleClassHeader
* Revised the endClassDeclaration event
Change-Id: Ib58893097650eefb45051b462e9df7260b7776b2
Reviewed-on: https://dart-review.googlesource.com/9580
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-29 19:34:15 +00:00
Johnni Winther
4b94004d4b
Add tests for jsinterop errors
...
Change-Id: Icfa6b5a34ed56e43abb3a55eb8d48bc80eeac59f
Reviewed-on: https://dart-review.googlesource.com/9240
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-29 19:16:05 +00:00
Emily Fortuna
088989920a
Fix boxing of variables in for-in and while loops.
...
Bug:
Change-Id: I8355f1b46a9dda03440fb8cadf1dbaf48572b41a
Reviewed-on: https://dart-review.googlesource.com/9430
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-29 19:11:53 +00:00
Johnni Winther
d72adaf8ca
Handle ordering of function types in constants.
...
Change-Id: If45607ff420ead098fb99e65293f517b7d003615
Reviewed-on: https://dart-review.googlesource.com/9640
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2017-09-29 15:35:34 +00:00
Dan Rubel
9527f37146
refactor parse import
...
* `as` clause and `deferred as` clause processing pushed
into a new processImportPrefixOpt method.
* New handleImportPrefix event for communicating
`as` clause and `deferred as` clause to the listeners.
* Several new more detailed error messages for out of order
clauses and keywords in the import directive.
Change-Id: I133842c7225403fa000ca1cf0e49af9f8a011386
Reviewed-on: https://dart-review.googlesource.com/8580
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-29 14:39:01 +00:00
Emily Fortuna
b364883108
More changes to get angular app compiling.
...
The html status updates are unrelated, but the result of running our status update script.
Bug:
Change-Id: Ibeafda58f0bf750ebc7434c85bcf8fb08b14f590
Reviewed-on: https://dart-review.googlesource.com/8736
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-28 19:37:25 +00:00
Johnni Winther
fd247b1539
Add ErroneousConstructorConstant
...
+ use source locations for fasta messages
Change-Id: I1abba76f4f5653f8d7278cb2b368ae25ce33160b
Reviewed-on: https://dart-review.googlesource.com/8840
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-28 08:06:42 +00:00
Stephen Adams
56db0e80f5
Generate closure class names more like the AST version
...
Bug:
Change-Id: I95be2384fd67c17bc713732d902ec414e439d7af
Reviewed-on: https://dart-review.googlesource.com/9122
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-28 00:58:49 +00:00
Emily Fortuna
8bd22ffd28
Fix log parsing script to handle group names with spaces in them.
...
Bug:
Change-Id: If538d7e18af850e973ce0236e6949b7dbe36ba09
Reviewed-on: https://dart-review.googlesource.com/8733
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-27 18:13:54 +00:00
William Hesse
0cfcea3b78
Revert "Use function.name, instead of copying it into a new property."
...
This reverts commit 174c37b9ed .
Reason for revert: This is failing on all the dart2js --fast-startup bots, as far as I can see. For example, https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-jsshell-2-4-be/8417
Original change's description:
> Use function.name, instead of copying it into a new property.
>
> Change-Id: I8004d31f65a36873f97ab607b4a81d8cc8b6a717
> Reviewed-on: https://dart-review.googlesource.com/8221
> Reviewed-by: Stephen Adams <sra@google.com >
TBR=floitsch@google.com ,sra@google.com
Change-Id: Ie6d52919b6789aec9f394167256f6642c09ab275
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/8980
Reviewed-by: William Hesse <whesse@google.com >
2017-09-27 15:51:31 +00:00
Florian Loitsch
174c37b9ed
Use function.name, instead of copying it into a new property.
...
Change-Id: I8004d31f65a36873f97ab607b4a81d8cc8b6a717
Reviewed-on: https://dart-review.googlesource.com/8221
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-27 15:09:33 +00:00
Dan Rubel
f0caee1b24
Improve import directive recovery and report analyzer errors
...
- New handleRecoverImport event
for clauses in import directive that are out of order
- New error codes for
Duplicate prefix
Prefix after combinator
Change-Id: I0fea7ad4b4014a0b8578d3982e0515fe85044854
Reviewed-on: https://dart-review.googlesource.com/7980
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-27 12:56:46 +00:00
Johnni Winther
01ca690a67
Add test for break to labeled statements.
...
Change-Id: Ia1d7e5f93426d2781c7b3b583af10d88af142f28
Reviewed-on: https://dart-review.googlesource.com/8044
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-27 09:38:53 +00:00
Johnni Winther
7818726c3d
Handle strings and maps in inferrer
...
Change-Id: Ic89f1f3b72dc243d239371886ff7d944153909c9
Reviewed-on: https://dart-review.googlesource.com/8040
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-27 09:07:15 +00:00
Sigmund Cherem
920d44c3d4
Include dart.io in dart2js platform
...
Change-Id: I7bd4356556023ff4a56d876684ea63bad1917b07
Reviewed-on: https://dart-review.googlesource.com/8341
Reviewed-by: Emily Fortuna <efortuna@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-09-27 02:06:10 +00:00
Stephen Adams
2ea83486e1
dart2js kernel: generate constants for default arguments in Function.apply
...
Change-Id: I5bd0a8deaf16069749a574eb2ed132738e2e0747
Reviewed-on: https://dart-review.googlesource.com/8280
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-27 00:35:53 +00:00
Emily Fortuna
614e4cc53f
Add some fixes to getting JS-Interop compiling with angular apps.
...
Bug:
Change-Id: I9c5b068f33ee9cca75d95b9fb01ce19557267958
Reviewed-on: https://dart-review.googlesource.com/8400
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-27 00:10:04 +00:00
Emily Fortuna
fe9d02855b
Add html tests for dart2js kernel testing.
...
Bug:
Change-Id: I4d28af58a655f76ea639c8f048e86738afb2e108
Reviewed-on: https://dart-review.googlesource.com/8720
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-26 21:19:57 +00:00
Johnni Winther
c0c63bf16e
Fix handling of function type parameters
...
Closes #30826
Change-Id: I804bff2a204aa210ba59f691c5d680d8a53aadeb
Reviewed-on: https://dart-review.googlesource.com/7553
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-26 08:23:34 +00:00
Johnni Winther
9914532f05
Handle logical and/or in inferrer
...
Change-Id: Ia26df587b936b7b1e48018d102adb95a293c68d6
Reviewed-on: https://dart-review.googlesource.com/7860
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-26 07:27:01 +00:00
Johnni Winther
772a0aff33
Handle and report erroneous compile time constants
...
Change-Id: I2ee86dbd714227e8e0894539ca64258fd11badfc
Reviewed-on: https://dart-review.googlesource.com/7820
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-22 18:57:37 +00:00
Dan Rubel
2140b878a7
cleanup parser event param
...
This removes the rightParen from parser events
and uses leftParen?.endGroup when needed
Change-Id: Ibc919edff4fffddc35d100453ac652eb5c5ac6e5
Reviewed-on: https://dart-review.googlesource.com/7560
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-09-22 15:50:37 +00:00
Stephen Adams
aa0d5a428e
Hack to fix incorrect getMightBePassedToApply under --disable-type-inference
...
R=sigmund@google.com
Bug:
Change-Id: Ie0378a923473e2b5ff7eaabdff499ddb01050f3e
Reviewed-on: https://dart-review.googlesource.com/7489
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-22 02:47:23 +00:00
Stephen Adams
f065e8a4ee
Add corelib to update_all.sh suites
...
TBR=sigmund@google.com
Bug:
Change-Id: I49293d88f1828cb5b661295d538ab67e327787ce
Reviewed-on: https://dart-review.googlesource.com/7638
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-21 21:47:06 +00:00
Harry Terkelsen
d7af5c8768
don't add invalid type expression to the stack
...
Change-Id: Ieb15cb79b6e319cba77ad94b5274c5b97bcea7c7
Reviewed-on: https://dart-review.googlesource.com/7585
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2017-09-21 18:12:36 +00:00
Emily Fortuna
1bf53724bb
Use in correct version of CommonElements (J vs K entities) for backend.
...
Bug:
Change-Id: I8731624f7453d47019fbf24be4d9d6db4d5a0318
Reviewed-on: https://dart-review.googlesource.com/7488
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-21 17:57:26 +00:00
Johnni Winther
fae35af7d6
Remove this local from factory constructors
...
Change-Id: I54a02e519066336aacc9e1729994225c49f856fd
Reviewed-on: https://dart-review.googlesource.com/7263
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-21 14:42:54 +00:00
Johnni Winther
cffa7bc2b7
Handle if statements, is-tests and null-tests
...
Change-Id: Ia4fa866318b650f41ec75ff674ad233427640a4f
Reviewed-on: https://dart-review.googlesource.com/7269
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-21 11:17:26 +00:00
Johnni Winther
81a81c93eb
Handle instance field initialization in inferrer
...
This normalizes `var field = null;` and `var field;` to `var field;` for
both the AST- and IR-based inferences.
Change-Id: I753637c130a9f44ed01d18946c234353048f8971
Reviewed-on: https://dart-review.googlesource.com/6480
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-21 08:46:22 +00:00
Emily Fortuna
ac98f741d5
Make JRecordFields not instance members (they were falsely categorized as such because the boxes were "classes").
...
Bug:
Change-Id: I5ea7ab26e5bb7c52a59b4f81b1489190b2d00fd0
Reviewed-on: https://dart-review.googlesource.com/7220
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-20 19:26:08 +00:00
Florian Loitsch
38bf70d7ac
Use generic functions in zones.
...
Migrated from https://chromiumcodereview.appspot.com/2893893002/
Change-Id: I0bd6dc1438eb1e6762e7760a08b5a760b07d4b10
Reviewed-on: https://dart-review.googlesource.com/4942
Reviewed-by: Florian Loitsch <floitsch@google.com >
Commit-Queue: Florian Loitsch <floitsch@google.com >
2017-09-20 15:46:06 +00:00
Stephen Adams
617f6ac197
Weaken constructor initializer assertion
...
Accept a missing super-constructor call if one of the constructor
initializers always throws. This matches dynamic error code generated
for various warnings, including duplicate final initializers.
Change-Id: If188c9d8d6d02bf9667123fbf679f1c103b5ef5a
Reviewed-on: https://dart-review.googlesource.com/7240
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-20 02:18:21 +00:00
Emily Fortuna
9a531f9b50
Get async/await working with the entity model.
...
Bug:
Change-Id: I803cb8f8a681563d76d6eed56116267f64a9ba8a
Reviewed-on: https://dart-review.googlesource.com/7106
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-19 22:29:34 +00:00
Emily Fortuna
5402179bd4
Properly pass on this as a free variable when inside closures.
...
Bug:
Change-Id: Iba32dbc40e9361030a885b50a9e816c0ac123884
Reviewed-on: https://dart-review.googlesource.com/7102
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-19 20:16:45 +00:00
Stephen Adams
899e2eab15
update rank_stacks comment
...
TBR=sigmund@google.com
Bug:
Change-Id: I5acdcdc7573106c0eea51447862bce3a0f381c6f
Reviewed-on: https://dart-review.googlesource.com/7020
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-19 16:36:12 +00:00
Brian Wilkerson
bd33fb43bd
Pass the left brace in an enum declaration to the listeners (rather than the right brace)
...
Change-Id: I3bec6cbde6beb1233c48e7ed8926f0e98fd8e3a5
Reviewed-on: https://dart-review.googlesource.com/6741
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-19 15:35:33 +00:00
Johnni Winther
639ddd3067
Pass rti info for local functions to the closure converter
...
Change-Id: I593ad134a16ee10b43b50213db9774e7c2671f22
Reviewed-on: https://dart-review.googlesource.com/6600
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-19 12:00:03 +00:00
Johnni Winther
f9a490128e
Compute closure classes before creating JsClosedWorld.
...
Change-Id: I28f0188d2f6b669c1bbc77c3050c0d90230ccdf1
Reviewed-on: https://dart-review.googlesource.com/5768
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-19 09:03:54 +00:00
Johnni Winther
5cad3ee498
Avoid continue in switch
...
Change-Id: Ibe6a89916efc133ef8234d0c73bbf091a103d6b4
Reviewed-on: https://dart-review.googlesource.com/6440
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-19 06:30:46 +00:00
Stephen Adams
eab4615f74
Add missing abstract method to interface
...
Fixes analyzer warning.
Bug:
Change-Id: I404855f42190be10a11658cf8f144c2627b73117
Reviewed-on: https://dart-review.googlesource.com/6820
Reviewed-by: Stephen Adams <sra@google.com >
2017-09-19 03:35:59 +00:00
Stephen Adams
f115e1926f
Make DirectPropertyGet a compile time crash rather than a runtime crash
...
These are infrequent, so can be better tracked as a compile-time issue.
Change-Id: I79a25c3cad1e7b003244cc5baa1a8a788586a0af
Reviewed-on: https://dart-review.googlesource.com/6761
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-09-19 00:25:12 +00:00
Emily Fortuna
942963fa2e
Add TypeVariable analysis in closure conversion.
...
Bug:
Change-Id: I4155ceb042295934cc3c9125d275dc5f034675dd
Reviewed-on: https://dart-review.googlesource.com/6025
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-09-18 20:26:33 +00:00
Harry Terkelsen
b49dd9fe98
register SUPER_NO_SUCH_METHOD feature when appropriate
...
Change-Id: If620aa0bb051d8bd014070e0a2c3e4c525dc6729
Reviewed-on: https://dart-review.googlesource.com/6643
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2017-09-18 19:54:12 +00:00
Brian Wilkerson
0995bbd6ef
Pass the left paren in to listeners
...
Change-Id: I7de73b11c001f56fd45f60f58623c905b5a29f31
Reviewed-on: https://dart-review.googlesource.com/5325
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-09-18 16:34:26 +00:00
Stephen Adams
69b50ed990
dart2js-kernel: Fix bug with finding optional parameter default values
...
Change-Id: Iefa443318124838aeafa9998e08d1143c1976dc4
Reviewed-on: https://dart-review.googlesource.com/6346
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-09-15 23:54:22 +00:00