Johnni Winther
c102d3f72a
Remove direct access to enqueuer through use of WorldImpact
...
R=het@google.com
Review URL: https://codereview.chromium.org/2527973002 .
2016-11-29 09:05:53 +01:00
Johnni Winther
bf13fc1b28
Handle assert with message in type inference
...
Closes #27882
R=sra@google.com
Review URL: https://codereview.chromium.org/2528043003 .
2016-11-29 08:36:27 +01:00
Asger Feldthaus
8f12489839
Add --verify-ir flag to dartk and test.py.
...
This replaces the old --sanity-check flag from dartk. Some files have
been renamed to avoid the wording "sanity check".
Compared to --sanity-check, the following checks have been added:
- variables are not referenced out of scope
- variables are not redeclared
- class type parameters are not referenced from static context
A unit test has been added to check that the verifier rejects certain
invalid ASTs.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2531873002 .
2016-11-28 12:21:19 +01:00
Stephen Adams
b20b10a0af
dart2js-kernel: Implement Let and PropertySet.
...
The Accessor builders capture some subexpressions to help map kernel
Nodes to Ast Nodes.
R=asgerf@google.com
Review URL: https://codereview.chromium.org/2526123002 .
2016-11-26 12:42:37 -08:00
Asger Feldthaus
963e1ebc55
Do not sort named parameters on FunctionNode.
...
This was originally done to be consistent with FunctionType,
where the named parameters are sorted, but for FunctionNode
it is not necessary.
It causes issues for natives that expect parameters to be
declared in a certain order. It is also an issue if we
ever want to reuse the kernel format for summaries, where
it is also preferable to present the named parameters in
their original order.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2527933002 .
2016-11-25 11:22:37 +01:00
Erik Ernst
4912fd1501
Make initializing formal access available by default
...
This CL changes dart2js such that the effect that we used to get with
option '--initializing-formal-access' is now obtained unconditionally,
i.e., that extension is now enabled by default.
dart2js will continue to accept the option, such that scripts passing
the option will not break.
The CL is _not_ intended to be landed at this time, the plan is to
enable the feature in a coordinated manner when all tools are ready.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2141023002 .
2016-11-25 10:15:21 +01:00
Erik Ernst
7809d25b92
Remove the ability in dart2js to turn off syntax-only generic methods.
...
This CL removes all the checks for 'enableGenericMethodSyntax' in the
implementation, which takes away the ability to turn this feature off
and simplifies the code.
As a result, `ParserOptions` is now empty; we may want to remove it,
but this CL does not do that.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2521073003 .
2016-11-23 12:16:30 +01:00
Stephen Adams
9e80530980
dart2js/kernel: Implement type literal (constant) and JS_INTERCEPTOR_CONSTANT
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2529483002 .
2016-11-22 14:44:30 -08:00
Johnni Winther
f6fbc40423
Fix kernel/impact_test
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2521993002 .
2016-11-22 16:21:37 +01:00
Johnni Winther
e4c612fc3e
Handle forwarding constructors of unnamed mixin applications for reflection
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2519383002 .
2016-11-22 15:58:50 +01:00
Asger Feldthaus
fbb698393d
Update third_party/pkg/kernel version
...
This CL also updates the use of kernel in dart2js, and
updates the VM/kernel status files.
This is a preliminary step to moving kernel into the
SDK repository.
BUG=
R=het@google.com , johnniwinther@google.com , kmillikin@google.com , sigmund@google.com , vegorov@google.com
Committed: https://github.com/dart-lang/sdk/commit/5d66d0e5dc32ce06641f360876361a07de821997
Review URL: https://codereview.chromium.org/2518023002 .
Reverted: https://github.com/dart-lang/sdk/commit/d69e048d600468f4a4fe112cb7a750f79e5d9c69
2016-11-22 15:22:20 +01:00
Asger Feldthaus
d69e048d60
Revert "Update third_party/pkg/kernel version"
...
This reverts commit 5d66d0e5dc .
BUG=
Review URL: https://codereview.chromium.org/2514323005 .
2016-11-22 14:35:56 +01:00
Asger Feldthaus
5d66d0e5dc
Update third_party/pkg/kernel version
...
This CL also updates the use of kernel in dart2js, and
updates the VM/kernel status files.
This is a preliminary step to moving kernel into the
SDK repository.
BUG=
R=het@google.com , johnniwinther@google.com , kmillikin@google.com , sigmund@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org/2518023002 .
2016-11-22 13:42:13 +01:00
Erik Ernst
9bf3b95cc5
Enable syntax-only support for generic functions by default, take 2.
...
Fixed some status entries since the first land-revert of this CL.
This addresses https://github.com/dart-lang/sdk/issues/27501 .
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2520293002 .
2016-11-22 12:33:43 +01:00
Stephen Adams
ed4c2cb457
Build CFG for various JS() foreign methods
...
BUG=
R=het@google.com
Committed: https://github.com/dart-lang/sdk/commit/a897bc383247592379ce5148652b78678a4d0f97
Review URL: https://codereview.chromium.org/2404123002 .
Reverted: https://github.com/dart-lang/sdk/commit/476ffbda5e24973ce39ce8fae57d144054755ca8
2016-11-21 14:24:32 -08:00
Johnni Winther
8da63799a0
Compute [WorldImpact] for main method as entrypoint
...
R=het@google.com
Review URL: https://codereview.chromium.org/2511403002 .
2016-11-21 10:59:03 +01:00
Emily Fortuna
3db16e52eb
Don't call stringify if we can prove that the type is a string.
...
BUG=https://github.com/dart-lang/sdk/issues/27394
R=het@google.com
Review URL: https://codereview.chromium.org/2512303002 .
2016-11-18 17:07:20 -08:00
Emily Fortuna
80e227a840
Fix dart2js/analyze_unused_dart2js_test.
...
(I thought I reran the test when I added currentImplicitInstantiations stack, but clearly not)
TBR=sigmund@google.com
BUG=
Review URL: https://codereview.chromium.org/2514833003 .
2016-11-18 12:00:42 -08:00
Emily Fortuna
4b93090c09
Add types for map literal construction with kernel code.
...
Possible this could be further simplified?
.... http://i1.kym-cdn.com/photos/images/facebook/000/234/739/fa5.jpg
BUG=https://github.com/dart-lang/sdk/issues/27394
R=sigmund@google.com , sra@google.com
Review URL: https://codereview.chromium.org/2512023002 .
2016-11-18 10:41:29 -08:00
Stephen Adams
7b12dbc665
Bit width analysis for avoiding conversion of bitops to unsigned.
...
R=sigmund@google.com
Committed: https://github.com/dart-lang/sdk/commit/a5443a8b0d983eda457996b8534646154a59c334
Review URL: https://codereview.chromium.org/2507883002 .
Reverted: https://github.com/dart-lang/sdk/commit/08854375b316f285588a8a51dd379bad4da26c6f
2016-11-18 10:26:07 -08:00
Erik Ernst
cf4cff3812
Revert "Enable syntax-only support for generic functions by default."
...
This reverts commit 70fa0defe9 .
(There were too many tests previously failing and now passing on
browsers to fix it right now, will sort it out on Monday.)
Review URL: https://codereview.chromium.org/2514693003 .
2016-11-18 15:54:32 +01:00
Johnni Winther
39697dc5cf
Enhance precision of recorded instantiation info in ResolutionWorldBuilder
...
+ use this to enhance closed_world_test.
R=het@google.com
Review URL: https://codereview.chromium.org/2506393002 .
2016-11-18 10:57:35 +01:00
Erik Ernst
70fa0defe9
Enable syntax-only support for generic functions by default.
...
This CL removes the 'DartOptions=--generic-method-syntax' directives in
test cases concerned with generic functions and enables that feature by
default. The option '--generic-method-syntax' is still allowed, but the
feature is always enabled so the option makes no difference.
R=johnniwinther@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/2476423005 .
2016-11-18 09:56:17 +01:00
Johnni Winther
d0e057903e
Provide source map info for simple async methods.
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2510073002 .
2016-11-18 09:28:40 +01:00
Stephen Adams
08854375b3
Revert "Bit width analysis for avoiding conversion of bitops to unsigned."
...
TBR=sigmund@google.com
BUG=
Review URL: https://codereview.chromium.org/2510893002 .
2016-11-16 13:55:20 -08:00
Stephen Adams
a5443a8b0d
Bit width analysis for avoiding conversion of bitops to unsigned.
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2507883002 .
2016-11-16 13:37:12 -08:00
Stephen Adams
29ad2c2326
Fix generateAtUseSite for complex HIs checks
...
This avoids a few unnecessary temporaries.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2439653002 .
2016-11-16 12:25:26 -08:00
Emily Fortuna
226e47a127
Set runtime type information when converting list literals.
...
BUG=https://github.com/dart-lang/sdk/issues/27394
R=het@google.com
Review URL: https://codereview.chromium.org/2502033002 .
2016-11-16 10:53:07 -08:00
Stephen Adams
502631b225
ssa-tracer: include inputs to HTypeInfoExpression
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2499253004 .
2016-11-16 09:59:02 -08:00
Johnni Winther
12e2244310
Compute WorldImpact in NativeEnqueuer.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2498403002 .
2016-11-16 11:21:46 +01:00
Johnni Winther
bce19eba04
Compute WorldImpact for mirror analysis.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2500373003 .
2016-11-16 11:08:36 +01:00
Johnni Winther
b95379102a
Remove Registry
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2500413002 .
2016-11-16 10:57:10 +01:00
Sigmund Cherem
8103739900
Fix issue #27830 : the type of an super-set assignment expression is the type of
...
the rhs.
The issue was introduced in a recent refactor in commit 37afcd5197
BUG= https://github.com/dart-lang/sdk/issues/27830
R=sra@google.com
Review URL: https://codereview.chromium.org/2508513003 .
2016-11-15 15:59:24 -08:00
Stephen Adams
4bd5671a31
Fix HTypeConversion.checkedInput
...
For function types, HTypeConversion.checkedInput would return the call
to the method on the reified type object. Now the construction of the
call is deferred to codegen.dart, so the input is available directly.
The optimizer also detects checks (type assertions and 'as' casts) on
`null` values and removes the useless test.
BUG=
R=efortuna@google.com
Review URL: https://codereview.chromium.org/2497313003 .
2016-11-15 15:51:54 -08:00
Johnni Winther
128727744c
Remove Selector.sameNameHack
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2501563002 .
2016-11-15 13:03:27 +01:00
Harry Terkelsen
de49cba535
kernel->ssa: get simple constructors working
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2498493003 .
2016-11-14 15:45:57 -08:00
Sigmund Cherem
f460a8706d
Add implementation of Isolate.resolvePackageUri for dart2js.
...
This uses 'packages/' as the default base to resolve uris from, but also exposes
a hook to allow users to overwrite it.
BUG= https://github.com/dart-lang/sdk/issues/25594
R=het@google.com , lrn@google.com
Review URL: https://codereview.chromium.org/2495383003 .
2016-11-14 15:11:49 -08:00
Emily Fortuna
c0554489bd
Adding check or trust type checks to builder_kernel.dart.
...
BUG= https://github.com/dart-lang/sdk/issues/27394
R=het@google.com , sigmund@google.com , sra@google.com
Review URL: https://codereview.chromium.org/2479323003 .
2016-11-14 11:08:44 -08:00
Johnni Winther
6689fb80cd
Add kernel/closed_world_test
...
R=het@google.com
Review URL: https://codereview.chromium.org/2495013002 .
2016-11-14 11:11:43 +01:00
Johnni Winther
c6a7b1cc43
Remove Compiler access from ResolutionEnqueuer
...
+ move CommonMasks into ClosedWorld
+ move OpenWorld into ResolutionWorldBuilder
Main changes in:
compiler.dart
enqueue.dart
world.dart
types/types.dart
universe/world_builder.dart
R=het@google.com
Review URL: https://codereview.chromium.org/2488353004 .
2016-11-14 10:42:28 +01:00
Johnni Winther
99cd985a40
Refactor enqueuers
...
- limit use of globalDepencies
- remove mirrorDependencies
- compute native class through WorldImpact
- decouple reflectable elements analysis from enqueuers
- prepare for creating multiple enqueuers for closed world tests
R=het@google.com
Review URL: https://codereview.chromium.org/2494093002 .
2016-11-14 10:08:11 +01:00
Sigmund Cherem
053fa1c500
dart2js: move type-mask intermediate data from tree-elements into the global
...
inference engine.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2468303003 .
2016-11-09 07:26:13 -08:00
Johnni Winther
26f61fe1d4
Change IR encoding of redirecting factory invocations.
...
- redirecting factory constructors are not included in the program
- invocations of redirecting factory constructor point to the effective target
R=het@google.com
Review URL: https://codereview.chromium.org/2486703002 .
2016-11-09 16:22:27 +01:00
Sigmund Cherem
ce758e7e0a
dart2js: depend directly on kernel/ast to avoid indirect dependency on dart:io
...
BUG= https://github.com/dart-lang/sdk/issues/27744
R=het@google.com
Review URL: https://codereview.chromium.org/2485093003 .
2016-11-08 13:13:10 -08:00
Johnni Winther
8ea13999de
Handle dart:html in kernel_impact
...
R=het@google.com
Review URL: https://codereview.chromium.org/2481113003 .
2016-11-08 09:31:53 +01:00
Harry Terkelsen
4b2751a80e
don't rely on identical for comparing empty linked lists
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2476333003 .
2016-11-07 15:48:45 -08:00
Johnni Winther
bfa476c2b6
Fix kernel/visitor_test
...
- still need to change encoding of redirecting factories.
R=het@google.com
Review URL: https://codereview.chromium.org/2468273003 .
2016-11-04 08:37:04 +01:00
Emily Fortuna
de2697f41c
Code cleanup: moving compiler perf tests to compiler/tool
...
Task as described in https://docs.google.com/spreadsheets/d/1zebkSp_VjVFC_vd2JufrOkrT5O1XVu6iyoCmusE_UEk/edit#gid=0&vpid=A1
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2473553005 .
2016-11-03 15:28:58 -07:00
Johnni Winther
d1ec8db337
Fix type conversion of malformed type
...
Review URL: https://codereview.chromium.org/2472993002 .
2016-11-03 12:46:33 +01:00
Johnni Winther
d153808ca6
Add stacktrace_test
...
- also add helper program for working with sourcemaps.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2431223006 .
2016-11-03 11:00:46 +01:00