Johnni Winther
26e689de05
More work on signatures
...
Change-Id: Ifd8c20f1947149d60cca7c69e40ad85533519746
Reviewed-on: https://dart-review.googlesource.com/45700
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-09 08:30:28 +00:00
Emily Fortuna
feac6cfc20
Deal with Function type parameter contexts in closure conversion.
...
They don't have a context, so just set context as "null" for the TypeVaribleTypeWithContext.
Change-Id: I50944c787d4bd88dd55b402d137da1ca99a55566
Reviewed-on: https://dart-review.googlesource.com/45748
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2018-03-09 02:31:17 +00:00
Stephen Adams
b93c74092a
Make isInterceptedCall a field
...
Change-Id: I88a16189d8a6a30fa52be61bc3d015a703368baa
Reviewed-on: https://dart-review.googlesource.com/45583
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-08 23:50:57 +00:00
Johnni Winther
0fdbc331f6
Fix dynamic type dependencies in codegen
...
Change-Id: Id3d8e89d55cc4ad8cc23c4be4012b4798d5abe4e
Reviewed-on: https://dart-review.googlesource.com/45424
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-08 09:51:55 +00:00
Emily Fortuna
24507da9da
Fix stack overflow when analyzing type variables in generic methods.
...
Change-Id: Id182bb5f0511911662c1a758fce7792c686538c4
Reviewed-on: https://dart-review.googlesource.com/45560
Reviewed-by: Stephen Adams <sra@google.com >
2018-03-07 22:49:11 +00:00
Stephen Adams
23a7b62c42
Use type of receiver for setter target identification
...
This 'almost typo' was preventing any setters from being inlined.
Change-Id: Idca5ba35df34f2328e3f926790e093ce02ac8863
Reviewed-on: https://dart-review.googlesource.com/45367
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-07 20:48:52 +00:00
Emily Fortuna
7290c950d0
Change name of 'signature' to ':signature' to not conflict with a DOM member.
...
Change-Id: Iff924ac9ef47abdb79d21a5eb9a9f69cf7135d28
Reviewed-on: https://dart-review.googlesource.com/45541
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 20:09:27 +00:00
Johnni Winther
8f4db274f1
Compute which selectors that need type arguments
...
Change-Id: I0e48ff67353d676ea77d13008ae46f79bb69336e
Reviewed-on: https://dart-review.googlesource.com/45321
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 13:46:49 +00:00
Johnni Winther
8831dd1308
Remove failing assertion
...
Change-Id: Idfc2656460e2e6e63948172d63f90585be65d19d
Reviewed-on: https://dart-review.googlesource.com/45320
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-07 12:22:33 +00:00
Johnni Winther
6b91b4f2d2
Remove RuntimeTypesNeed.classUsesTypeVariableLiteral
...
Change-Id: Ibd9ccb5308b9170296f81ed18a35f212283b9afa
Reviewed-on: https://dart-review.googlesource.com/44783
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 12:02:31 +00:00
Johnni Winther
f69da8e36b
Move tests to /model/
...
Change-Id: I70fc06e51951eabbb123b4cf83a8e04ccb8f7eb6
Reviewed-on: https://dart-review.googlesource.com/44781
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 11:54:24 +00:00
Peter von der Ahé
18fe31ab11
Remove useOptimizedMixins from dart2js
...
Change-Id: I677e96cf0d27c6c9e1f1eede57e9c248d6514769
Reviewed-on: https://dart-review.googlesource.com/45280
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-06 15:15:57 +00:00
Johnni Winther
d3c3ac48a3
Remove implicit 'implements Function' for strong mode
...
Change-Id: Ie3e3e11a727f7fbe3c8d7af17c84dedfbdfcdf3a
Reviewed-on: https://dart-review.googlesource.com/44422
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-06 09:18:48 +00:00
Johnni Winther
6baae53a5b
Check functionTypeIndex in rti_emission_test
...
Change-Id: Icffa0174cc0cfeedca98b11fe9ea95ee9ac24626
Reviewed-on: https://dart-review.googlesource.com/44140
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-06 07:58:46 +00:00
Stephen Adams
f5e4f88c71
Skip assertions in InlineWeeder unless enabled
...
Change-Id: I889a7aee208b68cbadb8bda01d5c1176e7dfe581
Reviewed-on: https://dart-review.googlesource.com/44920
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-03-05 18:15:20 +00:00
Dan Rubel
e74e2b3c3e
Pass varFinalOrConst in beginVariablesDeclaration event
...
This CL refactors the fasta parse variable declaration functionality
to pass the modifier with the begin event rather than using the
handleModifer and handleModifiers events.
* Refactor modifier parsing as described above
* Update same modifier parsing to use ModifierRecoveryContext2
* Cleanup functionality of ModifierRecovery2
* Remove 2 unused fasta parser methods
Change-Id: Ib3a6b24428dcf6ad3cb462a979a05600fe7ee673
Reviewed-on: https://dart-review.googlesource.com/44860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-03 21:51:31 +00:00
Stephen Adams
8e8287f4e0
Add classes for instantiations
...
Change-Id: Iee9df3ad673012776cd1867448ff12ba692a863f
Reviewed-on: https://dart-review.googlesource.com/41564
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-03 00:50:59 +00:00
Sigmund Cherem
7fd5294bb3
Add rules to build dart2js platform in strong mode
...
This must land after we make the libraries strong clean.
Change-Id: I3a49a2be3b2bcb15842434266f55ce49e3800fc6
Reviewed-on: https://dart-review.googlesource.com/42140
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2018-03-02 22:19:19 +00:00
Sigmund Cherem
1ce131b317
fix section for update_from_log
...
TBR=sra@google.com
Change-Id: I60465498268cb7e8ffd5d824df70f794aa911613
Reviewed-on: https://dart-review.googlesource.com/44662
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-02 01:33:18 +00:00
Sigmund Cherem
9ed595b4b3
Use $fasta instead of $dart2js_with_kernel in our status files.
...
Note: $fasta is true when passing --dart2js-with-kernel. This change will make it
easier to flip the default: the plan is that $fasta will be true by default
later on, and passing --dart2js-old-frontend will make it false.
TBR=sra@google.com
Change-Id: Ib917d55b2d14db954c56513af057dd9a37b9c825
Reviewed-on: https://dart-review.googlesource.com/44601
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-01 21:02:18 +00:00
Emily Fortuna
e9b3ce9619
Make the actual signature function use our entity-based signature code.
...
Change-Id: I99b4dd4a7b9d549fcec60e4cc341512402c19ced
Reviewed-on: https://dart-review.googlesource.com/43264
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-02-27 18:53:58 +00:00
Johnni Winther
6931a7a288
Use [localFunctionNeedsSignature] to determine when to add JSignatureMethod
...
Closes #32078
Change-Id: Ib1c9c08b1fdf33e3d94c02595135cf430357fed6
Reviewed-on: https://dart-review.googlesource.com/43742
Reviewed-by: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-27 12:33:53 +00:00
Johnni Winther
85cf0961ee
Include type arguments passed through generic calls in rti emission
...
Change-Id: Id757caaebb0bd802e8afa978c9a4bc5b4d6273fe
Reviewed-on: https://dart-review.googlesource.com/43670
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-27 10:01:14 +00:00
Johnni Winther
9a0307043d
Test internal data in rti_emission_test.
...
Change-Id: I09e43bbe0470d0928478d15a629232d5ffef902f
Reviewed-on: https://dart-review.googlesource.com/43667
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-02-27 09:51:24 +00:00
Sigmund Cherem
e33f4f7c2e
Fail if mirrors are really used.
...
Some legacy libraries may import dart:mirrors, but not use it. This CL turns them
into a runtime error temporarily to give some time for the library
maintainers to remove the import to dart:mirrors in the future.
Change-Id: I876133908d2a61300256915aab54730bdff51649
Reviewed-on: https://dart-review.googlesource.com/43640
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-02-27 04:57:27 +00:00
Aske Simon Christensen
bb088347f0
Separate severity for context messages
...
Change-Id: I8c0f9f0eae141e38e1f57afce4a30b6f95e8e412
Reviewed-on: https://dart-review.googlesource.com/43721
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2018-02-26 16:24:13 +00:00
Johnni Winther
011cd01875
Handle local initializers in constant constructors
...
Change-Id: Ifcbaf4b19f4411cd499db35242523eea215c77c4
Reviewed-on: https://dart-review.googlesource.com/40820
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-26 10:04:58 +00:00
Johnni Winther
7c2d96490d
Support forwarding bounds in function type variables
...
Change-Id: Ifeab9ad06f512d9b6a5db02fc89d45250c25c054
Reviewed-on: https://dart-review.googlesource.com/40821
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-26 09:45:56 +00:00
Johnni Winther
216c0ae8c2
Don't override .constructor property
...
- on named mixin applications with --fast-startup.
Change-Id: Ia58e1b8e9a06d2c8d2ce14b3435b3c76aeef6fbc
Reviewed-on: https://dart-review.googlesource.com/40743
Reviewed-by: Florian Loitsch <floitsch@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-02-26 09:39:43 +00:00
Sigmund Cherem
5021d24e4b
Add an '--use-old-frontend' flag (noop right now)
...
Change-Id: I4a75f9a6742c87d86206c96cf667e6e81064b926
Reviewed-on: https://dart-review.googlesource.com/43498
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-02-24 01:03:17 +00:00
Emily Fortuna
99d2f1a1ac
Fix typecheck error for TypeVariableType contexts.
...
Change-Id: I53ac4e728ac440a2cea727016b3475a730c5b59d
Reviewed-on: https://dart-review.googlesource.com/43496
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2018-02-24 00:41:37 +00:00
Dan Rubel
a8bf40399f
Update fasta parser to report error on static constructor
...
This refactors how modifiers are passed to listener so that the
OutlineBuilder can report a static constructor error.
* Remove handleModifier/s calls from parseMethod
* Pass name and modifiers in beginMethod event
* Update listeners to process method modifiers in beginMethod event
* AstBuilder
* NodeListener
* OutlineBuilder
* Address comment in https://dart-review.googlesource.com/c/sdk/+/42800
Change-Id: Iabd4a18613c1814eb5a157df4acf60dd9060d5eb
Reviewed-on: https://dart-review.googlesource.com/43120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-02-23 13:18:46 +00:00
Stephen Adams
24b7429b02
Install JS-interop properties on JavaScriptObject
...
Fixes #26838
Change-Id: Id4a16431e94a50fd0e962301ef23eb4a31a8d5cf
Reviewed-on: https://dart-review.googlesource.com/42585
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-02-23 00:31:52 +00:00
Stephen Adams
9598a1d1fa
Add HAbs instruction
...
This change is to recover 6% lost on Intl.NumberFormat.format.reused
when JSNumber was make Dart2 clean.
Use invoke_dynamic_specializer to replace call with HAbs instruction.
Inject receiver check to condition receiver to a non-null number to
improve. This part makes x.abs() one of the operations 'trusted' by
'--trust-primitives'.
Add one-shot accelerators for abs and get:sign.
Change-Id: Ia423c4b398114abe1d4a784febbe664710f0a242
Reviewed-on: https://dart-review.googlesource.com/42890
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-02-22 22:21:41 +00:00
Sigmund Cherem
593e34c8f3
Extra fix: do not add output units for constants if deferred loading is disabled
...
R=efortuna@google.com
Change-Id: I76902f4a3672d90db68d81ea8f479fcb44630221
Reviewed-on: https://dart-review.googlesource.com/42887
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-02-22 00:49:57 +00:00
Sigmund Cherem
0866de94f4
Add flag to disable deferred loading
...
Change-Id: I9f095831f148240ea47d350c3e6d0c247c35a7c1
Reviewed-on: https://dart-review.googlesource.com/42880
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-02-21 22:31:31 +00:00
Dan Rubel
f008b41d6b
Parse invalid top level blocks during recovery
...
* New handleInvalidTopLevelBlock event for analyzer recovery
* Extract parseInvalidBlock and override in diet parsers
This addresses comments in https://dart-review.googlesource.com/c/sdk/+/41100
Change-Id: Ia7a7cc490231f5569906e4ad54c451c3b92c1e6b
Reviewed-on: https://dart-review.googlesource.com/42800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-02-21 19:06:19 +00:00
Sigmund Cherem
04095f7cee
Replace PrimitiveValue.primitiveValue by individual fields on the concrete
...
primitive classes (intValue, doubelValue, etc).
(This is step 1 of ?? to support int64, see https://github.com/dart-lang/sdk/issues/31788 )
Change-Id: I3fa3a69761d332640b03416e883d57fef0819e2f
Reviewed-on: https://dart-review.googlesource.com/41923
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-02-21 17:25:27 +00:00
Leaf Petersen
3d6ad7b3a2
Remove fuzzy arrows except on assignability
...
Change-Id: I00ffa8f6f85cede8badd4d7082da4603f998956c
Reviewed-on: https://dart-review.googlesource.com/40470
Reviewed-by: Jenny Messerly <jmesserly@google.com >
2018-02-17 00:30:56 +00:00
Sigmund Cherem
d0c3e48a5f
Add dart2js-with-kernel to the CQ
...
This is blocked on first landing the change to the dart2js_swarming recipe.
R=whesse@google.com ,athom@google.com
Change-Id: Id7c26499cbb3d5337d6c72c10a688dd22d60dd78
Reviewed-on: https://dart-review.googlesource.com/41580
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: William Hesse <whesse@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
2018-02-16 23:46:57 +00:00
Stephen Adams
df3c210cbb
dart2js: Local type information erasure
...
Change-Id: I28ed9e313159222982a4093cc898339a558c5fd9
Reviewed-on: https://dart-review.googlesource.com/35813
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-02-14 07:58:01 +00:00
Johnni Winther
f2b8cafb44
Handle assert in initializers of constant constructors.
...
Change-Id: Ibb4053af00392b3c43177c60c8551cc6ffe937eb
Reviewed-on: https://dart-review.googlesource.com/38320
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-13 14:00:01 +00:00
Johnni Winther
d30aaaa4b8
Ensure no type parameters on constructors.
...
Change-Id: I6a40e2f74b8a89e5873d94d406a56f82db0d0b48
Reviewed-on: https://dart-review.googlesource.com/40526
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-13 11:11:05 +00:00
Johnni Winther
41118c438e
Reimplement runtime type checks computation
...
Change-Id: Ic1baa96e60db30cf9afe3414e605f0200361583b
Reviewed-on: https://dart-review.googlesource.com/37560
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-12 13:29:30 +00:00
Sigmund Cherem
1f70b7ad37
Disable hints in dart2js-with-kernel
...
Change-Id: Id218b5116c134f7d1646f7d51ccef3faccd072f6
Reviewed-on: https://dart-review.googlesource.com/40469
Reviewed-by: Harry Terkelsen <het@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-02-09 22:53:59 +00:00
Emily Fortuna
06ef399354
Fix up locals map for signature function.
...
Change-Id: If2a569e0799c1f63f1ee728f183cb4f1e3badb56
Reviewed-on: https://dart-review.googlesource.com/40464
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-09 20:55:19 +00:00
Sigmund Cherem
521188f838
Fix deferred loading in the presence of type parameters too
...
(and get rid of a TODO(redemption) that I should have fixed eons ago...)
Change-Id: I218a7bddcc8256ff84b4ec03b54a858e8f5d8687
Reviewed-on: https://dart-review.googlesource.com/40180
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-02-09 00:25:26 +00:00
Dan Rubel
d4f2f9cef2
Update fasta parser to report constructor initializer errors
...
This CL updates the fasta parser to report three additional
errors in constructor initializers:
* ExpectedAnInitializer
* MissingAssignmentInInitializer
* RedirectingConstructorWithBody
I also added a comment from a discussion about
https://dart-review.googlesource.com/c/sdk/+/39320
Change-Id: Iecb6fe97e3612a11ccc89864a4fc9f353846504c
Reviewed-on: https://dart-review.googlesource.com/40040
Commit-Queue: Dan Rubel <danrubel@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-02-08 18:08:40 +00:00
Johnni Winther
b7ef215604
Ensure no function type variables on constructors
...
Closes #32069
Change-Id: I9e8e35aad7844863717d19d6335da87b9c823375
Reviewed-on: https://dart-review.googlesource.com/39700
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-02-08 09:09:09 +00:00
Stephen Adams
92af8a938a
Use length argument only for allocating Array
...
Change-Id: I051ec7bf3e34162e55212c6f734ceb0d531d04bb
Reviewed-on: https://dart-review.googlesource.com/39853
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-02-08 00:41:59 +00:00