Commit Graph

32 Commits

Author SHA1 Message Date
Johnni Winther f889bd7067 Delete JavaScriptBackend
* move names to Identifiers
* move resolution parts to front end strategy
* move codegen parts to backend strategy
* remove now unneeded methods from FrontendStrategy and BackendStrategy

Change-Id: I0675d56045dd212ad195177ecd23b27b0d849a80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105742
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-13 10:09:46 +00:00
Johnni Winther a1dd732ec6 Extract WorldBuilder results into an immutable BuiltWorld object
For resolution this is the KClosedWorld and for codegen this is the new
CodegenWorld object. This change removes the use of the world builders
after the world building has ended. It prepares for computing more of the
result data from the collected member usages.

Change-Id: I80032e3fc0e29179137b8c0380f09f68ab6fa03b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-26 07:52:58 +00:00
Johnni Winther ea6e83004b Use @pragma instead of package:meta/dart2js in tests
Change-Id: I16c0ed6f391a417d8faa55e68cde902d91e3db32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-06 08:32:05 +00:00
Johnni Winther d062a41404 Make resolution/codegen_world_builder into libraries
Change-Id: Ic8c00b2b3cf13a21e165486c1c825df75edd7d7b
Reviewed-on: https://dart-review.googlesource.com/c/84021
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-09 23:05:58 +00:00
Johnni Winther 6616ddeb88 Move dart2js unittests to subfolders
* All helpers in /helpers/
* Tests of user-facing behavior in /end_to_end/
* Tests of internal models and unittests of internal classes in /model/

Change-Id: Ic7a7e58aa01f92f8572514ae81230804f36af67e
Reviewed-on: https://dart-review.googlesource.com/72644
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 08:22:53 +00:00
Johnni Winther 75943282e5 Delete Flags.strongMode and references to it
Change-Id: Ia1af10f04224f172afb7dac1e88338d20467364b
Reviewed-on: https://dart-review.googlesource.com/70646
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-08-22 07:03:24 +00:00
Sigmund Cherem 35b08dec12 Add minified names to sourcemaps
This change:

* introduces a sourcemap extension to store minified names from the global and
instance namespaces.

* adds a test suite to test that this information is accurate

This is just an initial step: at this time names come from proposed names, which
include extra stuff we don't want. On a later CL I plan to change this to be
able to get the original name instead.

For example, I want to add a test for translating an instance method, right now
we would get "@method@0@" or "method$0" instead of "method".

Change-Id: I411c3bea96446e29e80581750250349799332b9a
Reviewed-on: https://dart-review.googlesource.com/65660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-07-19 18:50:27 +00:00
Johnni Winther ec733c3b3c Support more type arguments in generic instantiation
The real solution requires more work, so this is to buy us some time.

Change-Id: I033a77d05c0ca7658475d1fe59760ce4e5919f7e
Reviewed-on: https://dart-review.googlesource.com/65541
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-19 08:10:15 +00:00
Johnni Winther 4f1d6a33fc Remove --analyze-* flags
Change-Id: I72f7834ba754bd5affec1a72d1d7be203031aa42
Reviewed-on: https://dart-review.googlesource.com/64041
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-10 08:40:59 +00:00
Johnni Winther da9705b356 Split compileLoadedLibraries
- into computeClosedWorld, performGlobalTypeInference and generateJavaScriptCode
+ pass closed world and inference results directly
+ this prepares for (de)serialization after global inference

Change-Id: I1180de35eea78a107c9e95fc6e904084b63ba0f2
Reviewed-on: https://dart-review.googlesource.com/63943
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-06 22:02:57 +00:00
Johnni Winther 7321f938d5 Use default type for type variable bounds.
Change-Id: I5d21a16a76eb6cd898e8e11104d0be0f7e669426
Reviewed-on: https://dart-review.googlesource.com/59420
Reviewed-by: Stephen Adams <sra@google.com>
2018-06-12 09:05:09 +00:00
Johnni Winther 82755aa303 Rename ClosedWorld to JClosedWorld and merge it with ClosedWorldRefiner
Change-Id: I858695194fe4b0dffb7c85a93e2d6bcc04dd6229
Reviewed-on: https://dart-review.googlesource.com/58022
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-04 09:22:41 +00:00
Johnni Winther b347839ee6 Remove impact_test
A replacement is in progress in another CL.

Change-Id: Ib1eda85caa10c5e5a00f4c9e1b5c1605a2a56da6
Reviewed-on: https://dart-review.googlesource.com/54227
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-09 07:55:08 +00:00
Johnni Winther 27ae11e4d8 Filter instantiation stubs
Closes #32992

Change-Id: Ib0521f24eb734b42a1a55663119204220f263265
Reviewed-on: https://dart-review.googlesource.com/53740
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-08 07:46:33 +00:00
Johnni Winther b74bb147ce Remove use of MockCompiler from type_test_helper
Change-Id: Ia3607574f0f01db833ecf5d72d6bc5087757c180
Reviewed-on: https://dart-review.googlesource.com/53800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-07 10:07:40 +00:00
Johnni Winther d13bf49870 Check type-variable bounds on generic methods
Closes #32711

Change-Id: I86c123f5a8b9eda393b276248cdd27d1b109354b
Reviewed-on: https://dart-review.googlesource.com/53201
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-03 09:36:58 +00:00
Johnni Winther 395c96153b Fix subtype/equals for function types with type variable return types.
Change-Id: I645f73cabc74c4a427eb100220b3ddcf7232b0a4
Reviewed-on: https://dart-review.googlesource.com/52101
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-20 19:21:59 +00:00
Johnni Winther fbb60b786f Add generic bounds test to function_type_variable_test
Change-Id: I7c4daa99fa6c9ec8b20b413023e75a5a6232235a
Reviewed-on: https://dart-review.googlesource.com/51123
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-13 18:20:59 +00:00
Sigmund Cherem c438f8b3f4 Dart2js defaults to the new common front-end
Change-Id: Id0f69d258b010a746b56e259335185bcca7dafec
Reviewed-on: https://dart-review.googlesource.com/45143
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-13 19:25:59 +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
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 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
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
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 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
Johnni Winther 107f611d4e Support --disable-rti-optimization for --use-kernel
Change-Id: I47e1301629f068c12bd5ef898323fc86804bf4a0
Reviewed-on: https://dart-review.googlesource.com/34160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-12 11:37:49 +00:00
Johnni Winther c7447281f7 Handle type argument to instance members.
Change-Id: I40404d2f6da74cbaed68e23bc2fab0ebfb3e2cc8
Reviewed-on: https://dart-review.googlesource.com/33724
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-11 08:13:28 +00:00
Johnni Winther 966168ba67 Pass type arguments to dynamic calls
This only works for inlining of dynamic methods. Stubs are not created yet.

Change-Id: Ia138117d503b69774984ce9070a3298b87fdbe78
Reviewed-on: https://dart-review.googlesource.com/32766
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-09 13:44:37 +00:00
Johnni Winther 534dcf6874 Register methods depending on the rti need of classes.
Change-Id: I634d78152fc56167b6f32819ffce5d2221da600a
Reviewed-on: https://dart-review.googlesource.com/32320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-05 10:28:00 +00:00
Johnni Winther ca31d3e341 Handle inlining of static generic method calls.
Change-Id: I8531fd72589da0b823e59087361e4ff31b7be8cf
Reviewed-on: https://dart-review.googlesource.com/31786
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-03 08:36:35 +00:00
Johnni Winther e9243a4d16 Pass type arguments in static calls.
+ support generic type variable type literals
+ support generic type variable is test

Change-Id: I2473c39c33940c631070b919c7dcfe712fd1fe3d
Reviewed-on: https://dart-review.googlesource.com/31783
Reviewed-by: Stephen Adams <sra@google.com>
2018-01-03 07:57:58 +00:00
Johnni Winther 220a91122a Add --strong-mode flag to dart2js
+ move generic methods tests into a subfolder.

Change-Id: I00cde6a7dc7d6ff1677a8ca60f3a243f065e3765
Reviewed-on: https://dart-review.googlesource.com/31782
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-02 08:42:21 +00:00