Sigmund Cherem
5a63b0e339
Add flutter mode to patched_sdk
...
This is needed to create a platform.dill for flutter.
R=aam@google.com
Review-Url: https://codereview.chromium.org/2931773003 .
2017-06-14 17:29:36 -07:00
Dmitry Stefantsov
32eed0892d
Update expectations for closure conversion tests
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2935223003 .
2017-06-14 11:03:46 +02:00
Jens Johansen
4bbda48a7c
[kernel] Stream everything. Replace .kernel_function with .kernel_offset
...
- Put pointer to kernel data into Script.
- Replace function.kernel_function pointer to AstNode with
kernel_offset():
- Replace field.kernel_field pointer to AstNode with kernel_offest().
- Stream the previously unstreamed AstNodes: FunctionDeclaration and
FunctionExpression.
- Move special handling for _buildin.getMainClosure into the streaming
flowgraph builder.
- Delete big parts of kernel_to_il.
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/948e2f5d7916032ed6f0bfdc316ba4f577a5ea61
Review-Url: https://codereview.chromium.org/2901533002 .
2017-06-14 10:59:57 +02:00
Jens Johansen
de5ebc5a4e
Revert "[kernel] Stream everything. Replace .kernel_function with .kernel_offset"
...
The commit somehow made e.g. vm-linux-release-ia32-be turn red.
This reverts commit 948e2f5d79 .
BUG=
Review-Url: https://codereview.chromium.org/2941483003 .
2017-06-14 09:12:38 +02:00
Jens Johansen
948e2f5d79
[kernel] Stream everything. Replace .kernel_function with .kernel_offset
...
- Put pointer to kernel data into Script.
- Replace function.kernel_function pointer to AstNode with
kernel_offset():
- Replace field.kernel_field pointer to AstNode with kernel_offest().
- Stream the previously unstreamed AstNodes: FunctionDeclaration and
FunctionExpression.
- Move special handling for _buildin.getMainClosure into the streaming
flowgraph builder.
- Delete big parts of kernel_to_il.
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2901533002 .
2017-06-14 08:27:21 +02:00
Siva Chandra
a879f91420
Remove dart:_vmservice and dart:vmservice_io from platform.dill.
...
A mirrors test which now passes has been removed from the blacklist.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2931193002 .
2017-06-13 13:49:38 -07:00
Peter von der Ahé
db2e915aac
Improve recovery from compile-time errors.
...
R=danrubel@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2938573002 .
2017-06-13 16:00:15 +02:00
Peter von der Ahé
14e9d0bd89
Prepare for improved error recovery from compile-time errors.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2931423002 .
2017-06-13 15:59:18 +02:00
Jens Johansen
76336b225f
[kernel] Streaming ScopeBuilder
...
The old ScopeBuilder is replaced with StreamingScopeBuilder
that does not use the Ast.
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2886873008 .
2017-06-13 11:39:31 +02:00
Peter von der Ahé
5095646191
Apply transformations after comparing to golden files.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2939533002 .
2017-06-13 09:40:35 +02:00
Peter von der Ahé
39ec420753
Option to enable showOffsets in dump.dart.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2931073002 .
2017-06-09 14:21:28 +02:00
Konstantin Shcheglov
cf59b1a0f9
Remove ClassHierarchy factory constructor.
...
KernelTarget already uses IncrementalClassHierarchy, and other clients
either need ClosedWorldClassHierarchy, so should explicitly create it,
or don't care, and can be switched to IncrementalClassHierarchy.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2930973002 .
2017-06-08 18:42:22 -07:00
Konstantin Shcheglov
5fe793ec4e
Use ClassHierarchy.applyChanges() in MixinFullResolution.
...
So, we let the hierarchy to decide how to react to the changes, and
instance of which class hierarchy to create.
This makes initial compilation with Kernel Driver about 5% faster.
R=ahe@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2924333002 .
2017-06-08 14:00:51 -07:00
Paul Berry
5c3dd4b11b
Change MethodInvocation.interfaceTarget from a Procedure to a Member.
...
It's possible for the interface target to be a field, e.g.:
typedef void F();
class C {
F f;
}
void g(C c) {
c.f(); // Interface target is C::f
}
Also, this CL fixes MethodInvocation.getStaticType() in the case where
the interface target is a getter.
R=dmitryas@google.com , kmillikin@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2923653003 .
2017-06-07 09:20:53 -07:00
Konstantin Shcheglov
c569a4a8b8
Compute all canonical names only for libraries being serialized.
...
This makes compilation with Kernel Driver about 20% faster than Fasta,
about 5.8 seconds using Kernel Driver vs. 7.2 seconds using Fasta. Note
that this is initial compilation, i.e. nothing read from the cache yet.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2927463003 .
2017-06-07 08:50:04 -07:00
Peter von der Ahé
d6a766bb14
Improve NSM handling.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2927613002 .
2017-06-07 09:28:13 +02:00
Dmitry Stefantsov
09e755196a
Pass a Target instance to DillTarget instead of its name
...
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2924833002 .
2017-06-06 16:03:49 +02:00
Konstantin Shcheglov
8ec1f95af6
Replace ClassHierarchy.classes with getOrderedClasses().
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2924713002 .
2017-06-05 20:23:13 -07:00
Konstantin Shcheglov
64ce51ce4b
Fix the test and implement forEachOverridePair() for IncrementalClassHierarchy.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2920323002 .
2017-06-05 13:11:29 -07:00
Konstantin Shcheglov
71b1905265
Fix the test for ClassHierarchy.getDispatchTarget().
...
The blame was placed incorrectly - it was a bug in the test itself.
We need both empty FunctionBody and isAbstract flag for Procedure.
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2925573002 .
2017-06-05 10:42:21 -07:00
Paul Berry
d0f954f492
Fix an analysis warning in pkg/kernel/lib/transformations/erasure.dart.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2924543002 .
2017-06-05 08:39:19 -07:00
Konstantin Shcheglov
5cf61cb0dc
Implement getInterfaceMember() for IncrementalClassHierarchy.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2916383003 .
2017-06-03 18:52:00 -07:00
Konstantin Shcheglov
952687a64f
Implement getDispatchTarget() in IncrementalClassHierarchy.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2916403002 .
2017-06-02 13:58:26 -07:00
Konstantin Shcheglov
99363d42d0
Implement getClassicLeastUpperBound() in IncrementalClassHierarchy.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2921083002 .
2017-06-02 13:46:58 -07:00
Konstantin Shcheglov
c2b5ae00ce
Implement getClassAsInstanceOf() and getTypeAsInstanceOf() for IncrementalClassHierarchy.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2915263003 .
2017-06-02 11:54:47 -07:00
Konstantin Shcheglov
4301ce842a
Implement IncrementalClassHierarchy.getRankedSuperclasses().
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2916323002 .
2017-06-02 09:15:44 -07:00
Dmitry Stefantsov
1e2f06f8da
Reapply "Use backend targets to run Kernel transformations in Fasta"
...
This reverts commit 0b424ca5d2
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2919003003 .
2017-06-02 16:10:28 +02:00
Dmitry Stefantsov
0b424ca5d2
Revert "Use backend targets to run Kernel transformations in Fasta"
...
This reverts commit 8ff762067a .
TBR=ahe@google.com
Review-Url: https://codereview.chromium.org/2918923003 .
2017-06-02 12:45:34 +02:00
Dmitry Stefantsov
8ff762067a
Use backend targets to run Kernel transformations in Fasta
...
R=ahe@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2918623004 .
2017-06-02 10:40:13 +02:00
Konstantin Shcheglov
65c1f5f8ab
Start implementing IncrementalClassHierarchy.
...
Only getClassDepth() for now.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2922533002 .
2017-06-01 15:01:51 -07:00
Konstantin Shcheglov
d91ba05859
Additional tests for ClassHierarchy.forEachOverridePair().
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2918663006 .
2017-06-01 14:51:14 -07:00
Konstantin Shcheglov
717937a180
Add the more complex LUB test.
...
Peter asked to a more complex test.
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2916093003 .
2017-06-01 14:46:20 -07:00
Konstantin Shcheglov
00f97489cf
Remove the ClassHierarchy.rootClass getter.
...
According to the language specification the root class is always
equivalent to the Object class.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2919833002 .
2017-06-01 11:56:46 -07:00
Konstantin Shcheglov
5bdfd1e69b
Pass ClassHierarchy instead of creating it.
...
MixinFullResolution is also updated to create new ClassHierarchy
instance only if there are transformed classes. This improves
incremental kernel generator initial time from 22 to 16 seconds.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2918593003 .
2017-06-01 07:20:13 -07:00
Konstantin Shcheglov
463275881d
Replace modelled Dart code comments with Kernel text validation.
...
Paul, do you want to keep ASCII hierarchies, or the text provides
enough information / easy to read?
R=ahe@google.com , paulberry@google.com
BUG=
Review-Url: https://codereview.chromium.org/2920563002 .
2017-05-31 13:09:36 -07:00
Konstantin Shcheglov
e94a8e1367
Start adding unit tests for ClassHierarchy.
...
I need these tests in order to be sure that I understand expectations
of the ClassHierarchy interface, and to be able to test a lazy
implementation I'm going to create for incremental kernel generator.
I moved lub_test tests into this wider test suite.
Tests for forEachOverridePair() are not complete yet, just one path
is tested.
If there are any additional cases that you think should be covered,
please let me know.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2912173002 .
2017-05-31 11:31:36 -07:00
Konstantin Shcheglov
3803374d32
Don't recreate CoreTypes in transformers. Pass it in.
...
The same will be done later for ClassHierarchy. So, it would be up to
the client to decide which flavour to create, and whether the same
instance can be reused.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2904203003 .
2017-05-31 09:54:27 -07:00
Konstantin Shcheglov
8460f770b1
Serialize also canonical names of 'interfaceTargetReference'.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2906693002 .
2017-05-30 10:54:14 -07:00
Konstantin Shcheglov
f9af7bf5bc
Extract ClassHierarchyImpl implementation from ClassHierarchy.
...
As a preparation step for using different implementation during
incremental kernel generation.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2904203002 .
2017-05-30 09:45:06 -07:00
Konstantin Shcheglov
0dd81884bf
Perform MixinFullResolution only for source libraries.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2912503003 .
2017-05-30 09:33:26 -07:00
Peter von der Ahé
8f1a69826a
Fix problems with closures_test.
...
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2898173005 .
2017-05-30 12:10:01 +02: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
Konstantin Shcheglov
97d587520c
Add LimitedBinaryPrinter, tests and switch incremental generator to it.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2896493002 .
2017-05-24 16:17:28 -07:00
Konstantin Shcheglov
2b8fd9dee8
Transform async code only for source libraries.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2905463002 .
2017-05-24 15:51:18 -07:00
Paul Berry
e642722f42
Implement subtyping rules for FutureOr in kernel.
...
These rules are only enabled when in strong mode, so existing Dart 1.0
functionality should be unaffected.
R=kmillikin@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2900113002 .
2017-05-24 06:14:22 -07:00
Konstantin Shcheglov
625129ac01
Make LibraryIndex lazy.
...
With this change it takes about 0.03% to create CoreTypes.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2896423002 .
2017-05-23 14:28:19 -07:00
Konstantin Shcheglov
77d4eb609b
Use LibraryIndex in CoreTypes instead of extending it.
...
A smaller step this time - change only clients, but keep implementation
the same for now.
Not all patched SDKs have all classes and procedures, so I have to make
some them lazy. All of them could be done for consistency, but this
might slightly affect performance for often used dart:core classes.
Also it's a bit of mess now.
Maybe group these classes into logical structures, coreTypes.core.list,
coreTypes.async.future, coreTypes.async.futureMicrotask, etc. Something
like it was before this change, but fixed types and names instead of
more flexible (but in general slower) strings.
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
BUG=
Review-Url: https://codereview.chromium.org/2890933002 .
2017-05-23 09:30:37 -07:00
Peter von der Ahé
425626363a
Fix closure and interpreter suites.
...
Review-Url: https://codereview.chromium.org/2897933004 .
2017-05-22 18:19:37 +02: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
Paul Berry
bf15116d0f
Handle FutureOr type when inferring async closures.
...
R=asgerf@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2892593005 .
2017-05-20 20:16:59 -07:00