Commit Graph

4835 Commits

Author SHA1 Message Date
Stephen Adams 6651f58674 dart2js kernel: Rewrite logical expression trees to short-circuit
The Ast builder does this, so it makes the comparison of generated
code easier.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2960303003 .
2017-06-29 11:26:00 -07:00
Johnni Winther 34290dca77 Split inference type-info accessors into members, parameters and local functions
This prepares for using LocalFunctionElement.callMethod as the key for local
functions instead of the local functions themselves - corresponding to the world
after closure conversion.

Main changes in
  elements/elements.dart
  inferrer/inferrer_engine.dart
  inferrer/type_graph_inferrer.dart
  inferrer/type_system.dart

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2955353002 .
2017-06-29 14:46:48 +02:00
Johnni Winther fc1ec82757 Move locals and closure classes from kernel/ to js_model/
- and rename K* to J*

R=efortuna@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2960153002 .
2017-06-29 11:08:24 +02:00
Emily Fortuna 7c89075a4f Entity-ify BoxLocal.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2956393002 .
2017-06-28 14:21:28 -07:00
Florian Loitsch 978213d427 Revert "Make Zone API strong mode clean."
This reverts commit 0b35711d48.

BUG=

Review-Url: https://codereview.chromium.org/2963743002 .
2017-06-28 13:31:32 +02:00
Florian Loitsch 0b35711d48 Make Zone API strong mode clean.
Review-Url: https://codereview.chromium.org/2959163002 .
2017-06-28 13:16:39 +02:00
Johnni Winther a6127e7361 Steps towards handling new Element.div()
- need to have a closure class for this.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2958013002 .
2017-06-28 10:30:09 +02:00
Peter von der Ahé 616da7ea04 Generate type variable events before parsing return type.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2963473004 .
2017-06-28 10:08:10 +02:00
Johnni Winther 4d26bc56b4 Handle super-method call
+ add BackendUsage.isMirrorUsed

(yes, these were related!)

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2960723004 .
2017-06-28 10:02:00 +02:00
Peter von der Ahé 90fb88710f Rename handleFunctionType to endFunctionType.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2961813002 .
2017-06-28 10:00:57 +02:00
Johnni Winther a9fca6fba9 Split KernelToElementMap mixins to match interfaces
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2955093002 .
2017-06-28 09:43:01 +02:00
Johnni Winther bba44b4f5a Conditionally add default argument to metadata
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2958753002 .
2017-06-27 11:17:14 +02:00
Johnni Winther 7d026b538e Handle continue and break in for-in and while loops
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2956883002 .
2017-06-27 11:07:18 +02:00
Johnni Winther e7ba4959ca Split KernelToElementMap into sub-interfaces
This prepares for a more direct implementation of J-elements by
splitting out the parts needed for world-impact vs ssa-building.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2960633002 .
2017-06-27 10:28:29 +02:00
Johnni Winther 07b0f45181 Add compile_from_dill_fast_startup_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2959683002 .
2017-06-27 09:59:23 +02:00
Emily Fortuna 6960d77fbc Hopefully the last bit of restructuring between closture classes and loop boxing, etc.
BUG=
R=johnniwinther@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2961563003 .
2017-06-26 15:49:27 -07:00
Johnni Winther aa345515fe Handle break as continue
Review-Url: https://codereview.chromium.org/2954663002 .
2017-06-26 13:28:18 +02:00
Johnni Winther ecb5767bba Remove special casing of == null
This avoid reversing the operands for `null == x`
- and make Hello World! fully equivalent.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2954123002 .
2017-06-26 12:47:17 +02:00
Johnni Winther 52f1f25d34 Sort type tests.
- and match sorting of injected members with patched_dart2js_sdk in test

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2958553002 .
2017-06-26 12:20:03 +02:00
Johnni Winther 1298af3bd3 Fix computation of default values for named parameters.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2957583003 .
2017-06-26 11:37:17 +02:00
Johnni Winther 2e6521678a Less inequivalence on Hello World!
- generate runtime types from kernel
- remove Compiler.types and add ClosedWorld.types
- start checking emitter equivalence including Program model equivalence

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2954493002 .
2017-06-26 11:30:11 +02:00
Johnni Winther 14dda16482 Handle for-loop with simple break in compile_from_dill_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2950303002 .
2017-06-26 11:10:30 +02:00
Johnni Winther f7f4d6133b Refactoring to prepare for kernel based jump targets
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2954463002 .
2017-06-26 10:35:13 +02:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Emily Fortuna b3812ffc8e Add ScopeInfo class for variable information that doesn't actually involve closures.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2949293002 .
2017-06-23 14:20:23 -07:00
Emily Fortuna a721f87f99 More rearranging the deck chairs on the titanic.
According to the comments, only closures proper have free variables. Running tests support this. So let's move it into that branch.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2951923002 .
2017-06-21 10:47:54 -07:00
Johnni Winther 0600f0ad9a Add closure_test for kernel based members
+ change id_equivalence_test to check kernel from .dill

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2951723002 .
2017-06-21 09:52:46 +02:00
Johnni Winther e41d0a63c2 Compute KernelClosureRepresentationInfo.variableIsUsedInTryOrSync
This handles one of the current inequivalences on hello world from dill.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2938203003 .
2017-06-20 12:45:51 +02:00
Johnni Winther 4a31a0be47 Add closure_test
- currently only for AST-based elements; IR-based to come

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2950493002 .
2017-06-20 12:27:19 +02:00
Emily Fortuna 8ba4f78dd3 Revert "Reapply "Minor adjustment to usage of the ClosureClassRepresentation interface.""
This reverts commit d9c6ae3438.

BUG=

Review-Url: https://codereview.chromium.org/2944163003 .
2017-06-19 17:49:21 -07:00
Emily Fortuna d9c6ae3438 Reapply "Minor adjustment to usage of the ClosureClassRepresentation interface."
This reverts commit 0ee0717cc3.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2944073003 .
2017-06-19 17:39:20 -07:00
Emily Fortuna 0ee0717cc3 Revert "Minor adjustment to usage of the ClosureClassRepresentation interface."
This reverts commit 85f37133f9.

BUG=

Review-Url: https://codereview.chromium.org/2946843002 .
2017-06-19 17:11:17 -07:00
Emily Fortuna 85f37133f9 Minor adjustment to usage of the ClosureClassRepresentation interface.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2947763002 .
2017-06-19 16:42:37 -07:00
Peter von der Ahé 69d6e8e55a All strong mode cleaning of dart2js.
Fixes https://github.com/dart-lang/sdk/issues/29886

Supersedes CLs 2939193003, 2950433002, and 2947583002.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2944843002 .
2017-06-19 14:06:38 +02:00
Johnni Winther 99ff7d2b77 Compile and run Hello World!
Committed: https://github.com/dart-lang/sdk/commit/1214e6fba636d76fca88357c358990c24b08c756

Reverted: https://github.com/dart-lang/sdk/commit/482502705ad05b6a14017f30b12909d97b322bdf
Review-Url: https://codereview.chromium.org/2942863002 .
2017-06-16 15:37:05 +02:00
Johnni Winther 208744eab7 Towards compiling Hello World!
R=efortuna@google.com, sigmund@google.com

Committed: https://github.com/dart-lang/sdk/commit/778feb0504759885271e166d76f0924c3bdfdb08

Reverted: https://github.com/dart-lang/sdk/commit/482502705ad05b6a14017f30b12909d97b322bdf
Review-Url: https://codereview.chromium.org/2939033002 .
2017-06-16 14:48:07 +02:00
Johnni Winther dff4772a01 Add J-elements
This adds object for a simple 1-to-1 J-element model to test that the codegen doesn't depend on the frontend model.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2937203002 .
2017-06-16 13:48:49 +02:00
Johnni Winther 1b580129bf Fix unittests
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2939943005 .
2017-06-16 13:00:59 +02:00
Johnni Winther 795e078f21 Remove Compiler.mainApp and Compiler.mainFunction
This prepares for switching between K and J elements between resolution and codegen.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2936233003 .
2017-06-16 13:00:21 +02:00
Peter von der Ahé e24970ef40 dart2js isn't strong mode clean yet.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2939313003 .
2017-06-16 12:21:54 +02:00
Johnni Winther 482502705a Revert "Towards compiling Hello World!" and "Compile and run Hello World!"
This reverts commit 778feb0504 and 1214e6fba6.

Review-Url: https://codereview.chromium.org/2938193003 .
2017-06-16 11:34:05 +02:00
Johnni Winther 1214e6fba6 Compile and run Hello World!
Review-Url: https://codereview.chromium.org/2942863002 .
2017-06-16 11:23:00 +02:00
Johnni Winther 778feb0504 Towards compiling Hello World!
R=efortuna@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2939033002 .
2017-06-16 10:45:23 +02:00
Peter von der Ahé 2e6e44a69b Strong mode cleaning of many dart2js tests.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2939063002 .
2017-06-16 09:31:29 +02:00
Emily Fortuna 0edf55ceab Change type of ClosureTask to ClosureConversionTask (new supertype) in one other file.
BUG=

Review-Url: https://codereview.chromium.org/2943023002 .
2017-06-15 17:24:07 -07:00
Sigmund Cherem dc329bdcf3 fix inferrer bug
BUG=https://github.com/dart-lang/sdk/issues/29885
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2940023004 .
2017-06-15 16:18:05 -07:00
Emily Fortuna 932dcd7145 Modify backend strategy and how we access the closure converter.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2939163002 .
2017-06-15 15:29:30 -07:00
Peter von der Ahé ba2cde4607 Switch the defaults: strong mode is now default, but we stil check tests in Dart mode.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2938943003 .
2017-06-15 14:16:39 +02:00
Peter von der Ahé 0750bc20ed Finish strong mode cleaning of dart2js.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2941033002 .
2017-06-15 13:49:02 +02:00
Peter von der Ahé b4066914eb Late night strong mode cleaning.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2942763002 .
2017-06-15 09:44:50 +02:00