Stephen Adams
0c69c06a87
Changes to compile compound constructor types
...
BUG=
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2976013002 .
2017-07-12 12:38:30 -07:00
Johnni Winther
15e981d88e
Convert data objects eagerly from K to J
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2978613002 .
2017-07-12 10:58:08 +02:00
Johnni Winther
72e8925206
Check emitter constants and fix tearOffName for JConstructorBody
...
R=sigmund@google.com , sra@google.com
Review-Url: https://codereview.chromium.org/2975933002 .
2017-07-12 10:37:21 +02:00
Johnni Winther
aa014f3b28
Fix crash in inference
...
Closes #30121
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2977683002 .
2017-07-12 10:18:19 +02:00
Johnni Winther
cca9a1573b
Support is tests
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2974223002 .
2017-07-12 09:58:54 +02:00
Peter von der Ahé
99d637f581
Improve parsing of function expressions.
...
Fixes #29937
Fixes #29978
Fixes #29979
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2968093003 .
2017-07-11 10:35:59 +02:00
Johnni Winther
ddad7cc116
Compute source spans for IR nodes and J/K-elements
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2974663002 .
2017-07-11 10:34:47 +02:00
Johnni Winther
ea7b7f3e57
Add ConstructorBodyEntity
...
+ remove KernelSsaGraphBuilder.astAdapter.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2968383002 .
2017-07-11 10:20:09 +02:00
Peter von der Ahé
2baaf0be13
Rename special dart2js error codes.
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2973053002 .
2017-07-11 10:00:16 +02:00
Sigmund Cherem
d60fe4de18
Document dart2js flags in dartjs -h
...
R=kathyw@google.com , sra@google.com
Review-Url: https://codereview.chromium.org/2974133002 .
2017-07-10 12:58:14 -07:00
Peter von der Ahé
b023d925ea
Use FastaMessage instead of String. Part 1.
...
See #30080 .
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2965393002 .
2017-07-10 19:50:14 +02:00
Johnni Winther
6ed6ac9fb9
Fix handling of async patches.
...
- and rewrite the only use to avoid async rewrite.
Review-Url: https://codereview.chromium.org/2977583002 .
2017-07-10 16:08:08 +02:00
Johnni Winther
3bd55a5024
Further cleanup of element use in type_graph_nodes
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2976483002 .
2017-07-10 13:05:02 +02:00
Johnni Winther
5dbd50204e
Lookup getClosureScope by member instead of node
...
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2975573002 .
2017-07-10 12:58:24 +02:00
Johnni Winther
3fab16c169
Use JsStrategy, remove KernelBackendStrategy
...
R=efortuna@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2974633002 .
2017-07-10 12:49:33 +02:00
Sigmund Cherem
d844dc8226
Move forward rolling FE public APIS (make bots green)
...
There were a couple issues found in the bots:
- dart2js unit tests I accidentally missed earlier.
- vmservice issues only show up in the debug-vm, I was testing locally with the
release vm.
- a small regression in detecting invalid .packages files. I marked the test
failing for now and plan to follow up on this on Monday.
TBR=ahe@google.com ,paulberry@google.com
Review-Url: https://codereview.chromium.org/2974703002 .
2017-07-07 21:15:07 -07:00
Sigmund Cherem
b71bd543a9
Reapply "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.""
...
Original CL had a bug that wasn't visible unless you delete your
out/ReleaseX64/patched_sdk folder.
Patchset #1 is the original CL, patchset #2 shows the fix.
This reverts commit 4aadfe09df .
BUG=
Review-Url: https://codereview.chromium.org/2976543002 .
2017-07-07 15:32:24 -07:00
Sigmund Cherem
4aadfe09df
Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service."
...
Reason: broke VM bots, still investigating.
This reverts commit 610d081947 .
TBR= paulberry@google.com
Review-Url: https://codereview.chromium.org/2979463002 .
2017-07-07 15:21:37 -07:00
Sigmund Cherem
610d081947
Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.
...
This CL tweaks the public APIs in package:front_end, and
starts using those APIs outside the package. For example, this
removes 9 uses of DillTarget, so it is not longer mentioned
outside pkg/front_end and the analyzer_target.
Actual changes:
- in package:front_end
* added kernel_generator_impl: new file contains code that
used to be in kernel_generator. Code has some modifications:
it uses a single canonical-root when loading summaries, and
it supports generating both outlines and kernel in one go.
* removed code that didn't belong here:
a. most of calculating deps for .GN moved to patch_sdk
b. vm-specific outcomes moved to kernel-service
* updated how `native` is implemented, so we can more easily
support dart2js and ddc
* updated how we check where `int`, `bool`, etc can be implemented.
* added support "hermetic mode" in modular builds
('chaseDependencies = false' option)
* moved `trim` step out of fasta, and for now call it only within
the public API. This is not yet exposed, and I stopped covering it in
most tests (now only covered in shaker tests). The plan is to add
tests for the public API covering this in the future.
* removed `uriToSource` when serializing outlines
* added unit tests for public APIs
- patch_sdk
* use the public API to craete platform.dill, outline.dill (now
500K insted of 3Mb because it excludes sources), and vmservice_io.dill
* moved here logic internal to .GN
- kernel service
* use the public API
* moved here logic that depends on VM internals (e.g. status enum,
compilation results)
- package:compiler
* use the public API in tools and unit tests
* simplified patched-sdk generation: no more extending fasta's internals
- package:kernel
* fix bug in deserialization: initializers and other lists were
overwritten accidentally with external definitions.
* updated unit tests, moved shared logic to frontend/src/fasta/testing
R=johnniwinther@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2953703002 .
2017-07-07 15:14:22 -07:00
Johnni Winther
e560e90f24
Fix dart2js-with-kernel test crashes
...
Review-Url: https://codereview.chromium.org/2970283003 .
2017-07-07 12:01:51 +02:00
Erik Ernst
3b05eb9553
Add support to dart2js for option --enable-asserts.
...
R=johnniwinther@google.com , sigmund@google.com , sra@google.com
Review-Url: https://codereview.chromium.org/2879153005 .
2017-07-07 10:59:09 +02:00
Johnni Winther
1c8cb51132
Assert that we don't mix K and J elements
...
- we did for BackendImpact, RuntimeTypesNeed, native classes.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2975433002 .
2017-07-07 10:58:59 +02:00
Johnni Winther
edbc13bac6
Use index in J/KTypeVariable and fix remaining inequivalence
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2970943002 .
2017-07-07 10:30:25 +02:00
Johnni Winther
2c671d6a1b
Add most equivalence tests to js_model/model_test
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2969073002 .
2017-07-07 10:23:28 +02:00
Johnni Winther
78e82212bc
Fix js_model/model_test
...
- by adding a JLocalFunction
Review-Url: https://codereview.chromium.org/2975513003 .
2017-07-07 10:15:13 +02:00
Johnni Winther
29df2fbb4f
Change inference element invariants
...
- members must be declarations
- parameters must be implementations
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2965223002 .
2017-07-07 09:22:12 +02:00
Emily Fortuna
f934f93758
Reapply "Added for-loop variable tracking and regular closures/initializers captured variable tracking."
...
This reverts commit b6671a0e3f .
BUG=
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2964783002 .
2017-07-06 14:09:54 -07:00
Johnni Winther
69421f0f62
Bring js_model/model_test on par with compile_from_dill tests.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2967933002 .
2017-07-06 16:38:15 +02:00
Johnni Winther
e340ee517a
Handle static fields in js_model/model_test
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2970673004 .
2017-07-06 16:30:55 +02:00
Johnni Winther
550b74233f
Handle instance/super methods in js_model/model_test
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2969993002 .
2017-07-06 16:15:54 +02:00
Johnni Winther
ba4220c563
Split ClassEnv into env and data to avoid copying types/constants from the k-model
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2971673002 .
2017-07-06 15:45:41 +02:00
Johnni Winther
f081f8b47d
Support creating elements from IR nodes in JsKernelToElementMap
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2969013002 .
2017-07-06 15:29:56 +02:00
Johnni Winther
410a5b1585
Implement JsKernelToElementMap through KernelToElementMapBase
...
- create indexed entities eagerly in JsKernelToElementMap
- copy the env and data object
- avoid the need for JsCommonElements and JsElementEnvironment
BUG=
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2972523002 .
2017-07-06 14:50:30 +02:00
Johnni Winther
f32dbe2d27
Use entities in ParameterTypeInformation
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2970953003 .
2017-07-06 12:31:04 +02:00
Johnni Winther
ae532f70c4
Change MemberTypeInformation.member type to MemberEntity
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2967153002 .
2017-07-06 12:19:03 +02:00
Johnni Winther
4ea9fa80ea
Use MemberEntity more in type_graph_nodes
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2966053002 .
2017-07-06 12:10:45 +02:00
Johnni Winther
e560a92ae7
Use entities internally in MemberTypeInformation
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2972653002 .
2017-07-06 11:43:43 +02:00
Johnni Winther
83082487bb
Split MemberTypeInformation by member kind
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2971693002 .
2017-07-06 11:06:18 +02:00
Johnni Winther
69580bda61
Remove reference of LocalFunctionElement in ParameterTypeInformation.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2970863003 .
2017-07-06 10:56:05 +02:00
Johnni Winther
4c172a3dd9
Split TypeSystem.typeInformations into member/parameter info
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2967003002 .
2017-07-06 10:43:40 +02:00
Johnni Winther
436eefbb33
Add NodeVisitor1 to js_ast
...
R=sra@google.com
Review-Url: https://codereview.chromium.org/2969873002 .
2017-07-06 10:24:53 +02:00
Peter von der Ahé
5999f45148
Implement type variables on old style function-typed formal parameters.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2969053002 .
2017-07-05 14:54:21 +02:00
Johnni Winther
8ce912063e
Split implementation of KernelToElementMapImpl
...
- to enable testing of pure implementations of the frontend/backend KernelToElementMap interfaces
This introduces Indexed* entities to enable sharing envs/data between K and J elements.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2964683003 .
2017-07-03 10:06:33 +02:00
Emily Fortuna
b6671a0e3f
Revert "Added for-loop variable tracking and regular closures/initializers captured variable tracking."
...
I think I had a bad merge. Reverting to figure out the issue.
This reverts commit d40f84fbf8 .
BUG=
Review-Url: https://codereview.chromium.org/2964113004 .
2017-07-01 07:33:53 -07:00
Emily Fortuna
d40f84fbf8
Added for-loop variable tracking and regular closures/initializers captured variable tracking.
...
This whole thing is hanging together by a thread. A BUNCH of tests and more implementation coming next once the KernelClosureClass is truly functional.
BUG=
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2961253005 .
2017-07-01 07:12:37 -07:00
Johnni Winther
8d9562ecd0
Support break in switch and break/continue in do statements
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2965763002 .
2017-06-30 21:17:11 +02:00
Johnni Winther
cc5fed3337
Use .callMethod instead of LocalFunctionElement as key in inference
...
This changes the inlining strategy a bit by solving a latent problem:
ClosedWorld.isCalledInLoop was computed using LocalFunctionElement but
queried using SynthesizedCallMethodX thus always returning false in
these cases.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2968743002 .
2017-06-30 21:07:34 +02:00
Johnni Winther
63f74d855f
Always store GlobalTypeInferenceElementData on the member context
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2961313002 .
2017-06-30 10:13:40 +02:00
Johnni Winther
ee04f3dc5f
Further splitting of inference type-info
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2963983002 .
2017-06-30 09:52:18 +02:00
Johnni Winther
469335dfb6
Move implementation from KernelToElementMapImpl to *BaseImpl and *ForImpactImpl
...
This is a step towards splitting element maps for impact and building while
still reusing common parts.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2964493002 .
2017-06-30 09:29:07 +02:00