Johnni Winther
586a465c45
Handle int constant
...
Prerequisites:
- move constants for emission to CodegenWorldBuilder
- use entities in custom elements analysis
- mostly use entities in lookup map analysis
- use entities in codegen listener
- use more entities in mirrors data
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2916893002 .
2017-06-02 13:32:31 +02:00
Johnni Winther
f72b893fea
Remove KernelAstAdapter.getNativeBehavior
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2919713003 .
2017-06-02 12:24:32 +02:00
Johnni Winther
e28a2a32bd
Move local properties to KernelToLocalsMap
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2914793006 .
2017-06-02 11:42:26 +02:00
Johnni Winther
fd3e76c4da
Use entities as keys rather than IR nodes
...
- in field value computation
- in super constructor inlining
+ general reduction in astAdapter usage
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2920753002 .
2017-06-02 11:37:15 +02:00
Johnni Winther
9c782896e9
Handle static invocation
...
+ implement Sorter for kernel entities.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2918543003 .
2017-06-01 10:00:43 +02:00
Sigmund Cherem
922326a91f
Fix performance regression for checking that retricted types are not
...
extended/implemented.
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2907333003 .
2017-05-31 14:07:17 -07:00
Sigmund Cherem
682011c7b2
Move enableNative to target, turn it on by default
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2913013003 .
2017-05-31 13:55:55 -07:00
Peter von der Ahé
8ea78cbc3f
Avoid using Invalid{Statement,Expression,Initializer}.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2906253004 .
2017-05-31 14:53:44 +02:00
Johnni Winther
34832f7a1b
Handle null literal in compile_from_dill
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2908253003 .
2017-05-31 13:06:53 +02:00
Johnni Winther
b97d158b9a
Add model test of CodegenWorldBuilder to compile_from_dill_test
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2913713004 .
2017-05-31 12:57:18 +02:00
Stephen Adams
d5f2138349
Use failedAt in more places
...
BUG=
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2898403002 .
2017-05-31 03:12:11 -07:00
Johnni Winther
38cdfde341
Add compile_from_dill test
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2912083002 .
2017-05-31 11:07:32 +02:00
Johnni Winther
f6dcc2ef4f
Don't tag fromEnvironment constructors as native
...
+ enable buildbot testing of closed_world_from_dill
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2907383002 .
2017-05-31 10:44:56 +02:00
Johnni Winther
0d0905cd81
It's alive!
...
With this change the empty program compiles and runs from .dill
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2908153003 .
2017-05-31 10:24:48 +02:00
Johnni Winther
44580b201e
Use entities for globals in Namer.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2907373002 .
2017-05-31 10:02:53 +02:00
Lasse R.H. Nielsen
5cbb22faf2
Make dart2js understand relative part-of in platform libraries.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2909043002 .
2017-05-29 15:12:43 +02:00
Johnni Winther
2a39972c7c
Use inlined constructor for closure data lookup.
...
Review-Url: https://codereview.chromium.org/2907153002 .
2017-05-29 11:17:46 +02:00
Johnni Winther
1a12151ee8
Avoid crash on instantiation of classes with black-listed supertypes.
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2910943002 .
2017-05-29 10:47:52 +02:00
Johnni Winther
43efd5039b
Add FunctionEntity.asyncMarker and refactor SourceInformationStrategy to avoid ResolvedAst
...
With this change the empty program now runs until codegen onQueueEmpty.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2897273002 .
2017-05-29 10:37:23 +02:00
Johnni Winther
f7468ab088
Add ClosureClassMaps super interface for ClosureTask
...
With this change the empty program now runs until ssa/codegen.
R=efortuna@google.com , sigmund@google.com
Review-Url: https://codereview.chromium.org/2898983005 .
2017-05-29 10:26:57 +02:00
Johnni Winther
133149d78b
Add KernelToElementMap.getSpannable to avoid most usage of KernelAstAdapter.getNode
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2897263002 .
2017-05-29 10:09:54 +02:00
Johnni Winther
f7cefd7676
Extract type inference queries from KernelAstAdapter to KernelToTypeInferenceMap
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2905623002 .
2017-05-29 09:59:15 +02:00
Dan Rubel
767d5ecbfd
Revert "improve fasta unterminated string recovery"
...
This reverts commit 6907345fb9 .
Review-Url: https://codereview.chromium.org/2907093002 .
2017-05-28 23:40:08 -04:00
Dan Rubel
6907345fb9
improve fasta unterminated string recovery
...
* enhance handling of unterminated strings
* update ast builder and string validator to handle unterminated strings
Review-Url: https://codereview.chromium.org/2906193004 .
2017-05-28 23:35:32 -04:00
Sigmund Cherem
dd70d8b655
Remove factory body in *.fromEnvironment, and implement this same behavior
...
directly inside dart2js.
A few notes:
* I ended up adding support for this feature also in dart2js with --use-kernel, it was not implemented correctly before. This is why more tests are passing.
* I played with two other ideas:
(a) making this a compile-time error instead
(b) making it a warning if the arguments were constant and implement it as a constant, treat it as an error if they were not.
Unfortunately both are a breaking changes, so I backed out from them. IMO (a) is the cleanest thing to do long term, and we should raise this with the language team.
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2896393003 .
2017-05-26 14:49:19 -07:00
Peter von der Ahé
27761fd369
Read SDK and patches from a JSON file.
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2895983002 .
2017-05-25 15:57:57 +02:00
Dan Rubel
54d6e3a1c5
cleanup fasta token classes
...
* replace fasta.SymbolToken --> analyzer.Token
* replace fasta.BeginGroupToken --> analyzer.BeginToken
* replace fasta.SymbolToken.eof --> analyzer.Token.eof
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2899043006 .
2017-05-25 07:26:50 -04:00
Peter von der Ahé
ddf5fc23f1
Improve analysis coverage.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2904483002 .
2017-05-24 15:52:42 +02:00
Peter von der Ahé
61d855bb47
Prepare for development branch by updating externally-used API.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2898183002 .
2017-05-24 14:32:45 +02:00
Johnni Winther
99538b2c13
Pull the member context from the current target
...
- the variable might be erroneous.
Review-Url: https://codereview.chromium.org/2901103003 .
2017-05-24 11:55:37 +02:00
Johnni Winther
7eec91c3bf
Pass context class directly to KernelSsaBuilder
...
Review-Url: https://codereview.chromium.org/2899273002 .
2017-05-24 11:41:54 +02:00
Johnni Winther
ac07b3ce03
Type .targetElement as MemberEntity
...
+ decouple LocalsHandler from ExecutableElement
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2901823002 .
2017-05-24 10:23:33 +02:00
Johnni Winther
a932d7fd51
Use KernelToElementMap (more) directly in KernelSsaBuilder
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2904493002 .
2017-05-24 10:18:48 +02:00
Johnni Winther
ccc6c484b3
Create KernelSsaBuilder from KernelSsaBuilderTask
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2899983003 .
2017-05-24 10:12:20 +02:00
Johnni Winther
b767ebaa71
Create SsaBuilderTask stub for KernelBackendStrategy
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2896853002 .
2017-05-24 10:04:32 +02:00
Johnni Winther
f8dc775b44
Share more logic between the Ssa(Ast)Builder and SsaKernelBuilder
...
This is a preparational step towards generating SSA from kernel based elements.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2893293002 .
2017-05-24 09:59:20 +02:00
Stephen Adams
a545c5c31f
Use failedAt in more places (constants, universe)
...
TBR=sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2900263002 .
2017-05-23 19:23:32 -07:00
Stephen Adams
e7e7d0c1b4
Use failedAt in more places (misc2)
...
TBR=sigmnd@google.com
Review-Url: https://codereview.chromium.org/2905573002 .
2017-05-23 19:04:16 -07:00
Stephen Adams
c7b3400eb5
Use failedAt in more places (misc)
...
TBR=sigmund@google.com
Review-Url: https://codereview.chromium.org/2904783002 .
2017-05-23 18:13:28 -07:00
Stephen Adams
2126af08b3
Use failedAt in more places (js_emitter)
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2903753002 .
2017-05-23 17:19:25 -07:00
Stephen Adams
7fa25e0ec2
Use failedAt in more places
...
TBR=johnniwinther@google.com
BUG=
Review-Url: https://codereview.chromium.org/2905463003 .
2017-05-23 16:31:39 -07:00
Stephen Adams
6f970697df
Use failedAt in more places
...
TBR=johnniwinther@google.com
BUG=
Review-Url: https://codereview.chromium.org/2898333002 .
2017-05-23 14:47:35 -07:00
Stephen Adams
1a965036b5
Lookup const constructor invocation like other constants
...
We should really be building the constants from kernel ir.
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2896983002 .
2017-05-23 13:52:23 -07:00
Stephen Adams
d2688c4ce6
Redo "dart2js: replace 'invariant' with 'failedAt' to defer interpolation"
...
TBR=johnniwinther@google.com
BUG=
Review-Url: https://codereview.chromium.org/2904613002 .
2017-05-23 11:44:52 -07:00
Stephen Adams
3e72e09a97
Revert "dart2js: replace 'invariant' with 'failedAt' to defer interpolation"
...
Investigating some analyzer warnings.
TBR=johnniwinther@google.com
BUG=
Review-Url: https://codereview.chromium.org/2897093002 .
2017-05-23 10:48:41 -07:00
Stephen Adams
641767c1da
dart2js: replace 'invariant' with 'failedAt' to defer interpolation
...
Speeds up dart2js_builds by ~5% (probably more with more replacements).
BUG=
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2902633002 .
2017-05-23 08:25:52 -07:00
Johnni Winther
3aad4a9cd8
Fix perf_test.
...
Review-Url: https://codereview.chromium.org/2903543002 .
2017-05-23 15:39:18 +02:00
Johnni Winther
ebe69e6060
Support loading binary data in dart2js
...
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2897903003 .
2017-05-23 10:43:20 +02:00
Stephen Adams
7fb377d3af
dart2js kernel: generate other==null header for operator== methods
...
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2898083002 .
2017-05-22 17:05:50 -07:00
Peter von der Ahé
4fddc2e4d5
Move code for instantiating Invocation to Target.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2897683002 .
2017-05-22 15:59:06 +02:00