Dmitry Stefantsov
fb290206a0
Remove unused imports to make analyzer happy
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2945493004 .
2017-06-16 11:09:17 +02:00
Dmitry Stefantsov
6ebe771a71
Remove unnecessary contexts in closure conversion
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2939043002 .
2017-06-16 11:01:10 +02:00
Dmitry Stefantsov
c4f4d010fb
Remove ContextClass that is not needed since we're using Vectors
...
Previously reified representation of contexts, also known as
ContextClass, was used in closure conversion. Now that we've switched
to Vectors, we no longer need that class.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2937213002 .
2017-06-16 10:32:36 +02:00
Dmitry Stefantsov
5982ace801
Add transformLibraries for closure conversion
...
Closure conversion can now be run on a part of a program. It allows
using closure conversion in kernel-isolate. It comes at a cost of
temporarily sacrificing implementation of tear-offs via closures; VM
mechanism for tear-offs is used for now.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2938773003 .
2017-06-15 14:18:10 +02:00
Dmitry Stefantsov
504f55c043
Unbind canonical name of getter after renaming it in closure conversion
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2936203002 .
2017-06-15 10:58:28 +02:00
Sigmund Cherem
f5a03eb0ef
fix bot: remove analyzer error
...
(I'm not sure why I didn't see this error before submitting)
TBR=aam@google.com
Review-Url: https://codereview.chromium.org/2940863004 .
2017-06-14 21:34:15 -07:00
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
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
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
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
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
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
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
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é
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
Asger Feldthaus
1ea216e6de
Add metadata annotations to library definitions.
...
BUG=
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2893803003 .
2017-05-19 11:35:26 +02:00
Régis Crelier
9aafded095
Pass type argument vector to generic functions (if --reify-generic-functions is
...
true, still false per default).
Work in progress, not functional yet (passed vector is still ignored in callee).
R=vegorov@google.com , zra@google.com
Review-Url: https://codereview.chromium.org/2859673002 .
2017-05-18 14:03:47 -07:00
Zhivka Gucevska
e68b664383
Add support for execution of constructor body
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2880343002 .
2017-05-18 15:30:22 +02:00
Asger Feldthaus
876db33bf4
Add import/export declaration AST node boilerplate to kernel.
...
Previously only deferred imports were represented. They have been
merged with the general form.
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2852373002 .
2017-05-18 14:38:08 +02:00
Zhivka Gucevska
4030e2de6c
Modify new instance allocation
...
A fresh new instance should be allocated after the evaluation of the
argument list for the constructor.
This change modifies the ConstructorInvocation application continuation
to allocate a new object and introduces :
* continuation applications for Redirecting and Super constructor
invocations, applied on evaluated arguments for Redirecting and Super
constructors respectively
* expression continuation for instance initialization, applied to the
new instance
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2888913002 .
2017-05-18 12:31:20 +02:00