Commit Graph

1278 Commits

Author SHA1 Message Date
Rico Wind 02320ff26e Revert "This is a fixed up version of:"
This reverts commit dd7767d95e.

This made the analyzer fail:
http://build.chromium.org/p/client.dart/builders/analyzer_experimental-linux-release-be/builds/3418/

Please note that this is just not the new test (which I would just have
suppressed)
It seems that in --checked --host-checked mode we see a range of new
failures, because of the change to flags.

It also made dart2js fail on the new tests

Ivan: Will you look into this with the analyzer people?

R=iposva@google.com
BUG=

Review URL: https://codereview.chromium.org//1308743006 .
2015-09-07 08:41:46 +02:00
Rico Wind dd7767d95e This is a fixed up version of:
https://codereview.chromium.org/1305183010/

- Reorder the priority of flags in the test harness when passed to the VM:
  default flags, file flags, command line flags
- Ensure to not enable assertions when not being requested.

Peter, any reason to not move the flags in to the
configuration file?  Why don't we actually have all of them in there? (not
that I want to move them, I am just currious why we don't add them in
there, it seems more logical to me)

BUG=
R=iposva@google.com, whesse@google.com

Review URL: https://codereview.chromium.org//1330643003 .
2015-09-07 07:44:41 +02:00
Srdjan Mitrovic cba48a6ab6 More cleanups for background compilation.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1325373004 .
2015-09-06 11:10:48 -07:00
Matthias Hausner 6fad437e5c BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1327003003 .
2015-09-04 19:39:21 -07:00
Matthias Hausner d3a2f619bb Fix compiler stats
Prints the stats into a zone-allocated string that can either be dumped to the console, or displayed as a whole in the observatory.

Distinguish token consumption between class parsing and function parsing when compiling.

Change stat counter macros use thread instead of isolate.

Review URL: https://codereview.chromium.org//1300033002 .
2015-09-04 13:13:56 -07:00
Siva Annamalai 79ef28317f Changes to prepare for allowing script snapshots to be taken after running the main application:
- Rename accessors of class Field to make it more apparent as to what is being accessed (static field values or instance field offsets
- Use precompiled initializer state (Used only during precompilation) to also store saved initial value of static fields (Used only during application snapshot   generation)

BUG=
R=hausner@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//1289643005 .
2015-09-04 11:03:46 -07:00
Srdjan Mitrovic 771f2dfb52 Symbols::NewFormatted and old space allocation.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1322973006 .
2015-09-04 10:59:28 -07:00
Matthias Hausner d0f408811e Cache more constants
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1311393010 .
2015-09-03 16:32:58 -07:00
Srdjan Mitrovic d4365bc6f4 Lookup getter/setter symbols before alllocating them, thus eliminating extra String allocations in new space.
Various old space allocations, cleanups.
Add a test for Symbols concatenation.

BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1320673012 .
2015-09-03 14:09:34 -07:00
Matthias Hausner 9a79cbd78e Eliminate LocalVarDescriptors in some corner cases
Fix initializing functions so they can be recompiled if
var descriptors are needed for a stack trace.

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1317753004 .
2015-09-03 13:55:03 -07:00
Regis Crelier 1abc4ce8e9 Reduce the number of captured variables in async code, by only capturing local
variables that are in scope at each await location.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1308163006 .
2015-09-02 18:29:32 -07:00
Srdjan Mitrovic 0094f0a76f More cleanups in compiler (remove allocation in new space).
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1314363003 .
2015-09-02 16:03:24 -07:00
Srdjan Mitrovic 7fb555045a Remove allocation in old space ....
Eliminate need for GrowableObjectArray, allocate constants in old space.

BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1305223006 .
2015-09-02 08:59:33 -07:00
Matthias Hausner f286b5b8b6 Moar constant caching
Insert all compile-time constants expression in the constant cache.

BUG=

Review URL: https://codereview.chromium.org//1303973007 .
2015-09-01 14:42:53 -07:00
Srdjan Mitrovic 59db5010a9 More elimination of new space allocation, fix bugs in Symbols::FromConcatAll
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1322043002 .
2015-09-01 10:30:03 -07:00
Srdjan Mitrovic dd5410209f Added {Zone}GrowableHandlePtrArray types: simplifies code, makes code safer
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1312833009 .
2015-08-31 09:24:00 -07:00
Srdjan Mitrovic d732b68b8c oneee# Enter a description of the change.
Collect interfaces without GrowableObjectArray

Concat to symbol without temporary String creation

BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org//1311693003 .
2015-08-28 08:24:17 -07:00
Regis Crelier e6225bee44 Improve async code in VM by not unnecessarily capturing parameters of async and
sync closures, thereby avoiding copy of parameters on entry.
Remove variable aliases in local scopes now that another mechanism detects
use-before-define cases. Keep aliases only for captured variables of outer
functions thereby speeding up scope lookups for all Dart code (not just async).
The next step will be to try to reduce the number of captured variables in
async code.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1317213003 .
2015-08-27 16:49:07 -07:00
Srdjan Mitrovic f857c1ba8e Remove more GrowableObjectArray usage in parser
Allocate appropriate data structures in old space from beginning

BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org//1316373002 .
2015-08-27 13:46:32 -07:00
Matthias Hausner 62e9d05668 Introduce per-isolate cache for compile time constants
Compile-time constant values are maintained in a cache, keyed
by script and token position. When the same code is compiled
again later, e.g. by the optimizing compiler, the value is
found in the cache and does not need to be computed again.

In this version, the key is a string concatenated from the
script url and the token position. That’s probably more overhead
than we want.

Added two compiler stat counters for number of cached constants
and number of cache hits. Running dart2js to compile a hello world
program results in about 1400 cached values and 85 cache hits.

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1308073005 .
2015-08-26 16:17:20 -07:00
Regis Crelier a799659bcf Use correct scope to lookup saved async context variable.
Stop inserting aliases in all intermediary scopes for explicitly captured
variables.
Use proper lookup function in async code to access async completer variable.
Add asserts verifying async variables existence.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1314993002 .
2015-08-25 15:46:17 -07:00
Srdjan Mitrovic 5985718945 Clean up default parameter computation in parser
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1316763002 .
2015-08-25 14:54:48 -07:00
Srdjan Mitrovic 304dc3486f Make default_parameter_values a ZoneGrowableArray instead of an array in new space
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1307943008 .
2015-08-24 17:22:44 -07:00
Regis Crelier 8b825b3f73 Simplify and improve canonicalization of signature types.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1311773006 .
2015-08-24 14:53:33 -07:00
Srdjan Mitrovic fcea0077cc Minor cleanup in preparation for removal of allocation in new space, and removal of an 'optimization'
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1310383002 .
2015-08-24 13:40:32 -07:00
Regis Crelier 26031ab6b0 Avoid numerous type allocations by caching the canonical type of a class, which
is used as the receiver type for non-static methods of this class, be it a
generic, non-generic, or signature class.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//1309613002 .
2015-08-21 13:37:07 -07:00
Srdjan Mitrovic 2b6219fd5a Addressed review comments from previous CLs; adding more Symbols::FromConcat
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1308013002 .
2015-08-21 11:16:30 -07:00
Florian Schneider c05f1f9448 VM: Link native calls lazily.
The first invocation of a native functions goes into LinkNativeCall which
determines the final entry point and patches the object pool entry.

When running precompiled code, this makes deserializing the object
pool entries for native functions easy, they all initially point to
a single entry (LinkNativeCall).

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1294113004 .
2015-08-21 11:37:50 +02:00
Srdjan Mitrovic 14be219d84 GrowableObjectArray -> GrowableArray for parsing type arguments
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1309523002 .
2015-08-20 15:54:46 -07:00
Srdjan Mitrovic 4280716656 Remove new space allocation in optimizing compiler, use Symbols::FromConcat where appropriate
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1303923002 .
2015-08-20 15:13:06 -07:00
Daniel Andersson 00ef260503 Enable concurrent optimization test after migrating scopes to Thread*
Also move static call target table allocation into old space.

Note that stats are not thread-safe, so running two compilers concurrently may lead to inaccurate stats.

BUG=https://github.com/dart-lang/sdk/issues/24109

Review URL: https://codereview.chromium.org//1291803009 .
2015-08-19 15:16:47 -07:00
Srdjan Mitrovic 5dedcf9d28 Reuse canonicalized type for receiver type if class is not signature class and has no type parameters.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1284093004 .
2015-08-19 10:57:36 -07:00
Regis Crelier 6d6a6a49b6 Clean up code capturing variables explicitly.
R=hausner@google.com

Review URL: https://codereview.chromium.org//1284103008 .
2015-08-17 16:09:42 -07:00
Daniel Andersson 76ff397c1c Migrate LongJumpScope to Thread.
This was one of the blockers for concurrent compilation (issue 24109).

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1299653003 .
2015-08-17 13:29:17 -07:00
Florian Loitsch debf1d6f7c Don't zone-register async callbacks for every await call in the VM.
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.

R=hausner@google.com

Committed: https://github.com/dart-lang/sdk/commit/4dae43d63727268f2e0cc45d6020246eb49177b8
Reverted: https://github.com/dart-lang/sdk/commit/cb4f9fc925c5a92c6cf756751e38296383f66507

Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 19:26:50 +02:00
Florian Loitsch cb4f9fc925 Revert "Don't zone-register async callbacks for every await call in the VM."
This reverts commit 4dae43d637.

Review URL: https://codereview.chromium.org//1296973002 .
2015-08-17 16:43:35 +02:00
Florian Loitsch 4dae43d637 Don't zone-register async callbacks for every await call in the VM.
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 15:58:19 +02:00
Daniel Andersson bc149bf2f5 Migrate most uses of StackZone(Isolate*) to Thread*.
Also migrate some HANDLESCOPE uses.
This prepares for concurrent compilation.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1285293004 .
2015-08-13 13:11:30 -07:00
Siva Annamalai 228e0877a7 Use Object::null_instance and Object::null_function and do not create Handles everytime.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1289813005 .
2015-08-13 10:57:18 -07:00
Florian Loitsch f2d08149fd Don't delay values and errors from async/await functions.
Fixes issue 23497.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1287673002 .
2015-08-13 13:00:11 +02:00
Matthias Hausner fc55f38aaf Fix ??= AST modification.
BUG=23988
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1273033007 .
2015-08-11 13:13:56 -07:00
Daniel Andersson ecccff2566 Refactor VMTagScope to Thread* rather than Isolate*.
Prepares for per-thread vm tags, but only changes the interface for now.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1284713003 .
2015-08-10 10:43:30 -07:00
Matthias Hausner 55b7315d83 Make constructor closure functions invisible on the stack
Matches implicit closures and method extractor functions.

BUG=

Review URL: https://codereview.chromium.org//1282633002 .
2015-08-07 16:56:50 -07:00
Srdjan Mitrovic 8cee9ac89d Change heuristic to determine which fields contain modifieable double boxes: do it if field was initialized with a double constant. Fix a parser bug
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1278003002 .
2015-08-07 09:16:02 -07:00
Ryan Macnak b34267d0d7 Replace is_synthetic bit on Fields with is_reflectable. Mark private fields of dart:* as non-reflectable.
This fixes an inconsistency in mirrors where some classes in dart:* would claim to have a field but throw NSM if one attempts to access it, and prevents accessing private static fields of dart:* that don't have implicit getters or setters.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1280713002 .
2015-08-06 16:48:01 -07:00
Matthias Hausner 223e5a6bb5 Adapt C?.m to latest spec version
BUG=23794
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1269413005 .
2015-08-05 15:41:31 -07:00
Matthias Hausner 1426ac4f77 Reuse constructor closures
Previously created constructor closures now get
reused when the parent function is recompiled.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1271343003 .
2015-08-05 11:07:52 -07:00
Matthias Hausner 90adbb2968 Fix constructor closures in checked mode
The parameters of constructor closures must be dynamic.
The Spec says so, and it’s necessary. The formal type
of constructor parameters may not be valid in the context
of the closure function, e.g. if it is a type parameter.

BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1269783004 .
2015-08-04 12:36:13 -07:00
Ryan Macnak 5ea1f9eb39 Initial tree-shaking for precompilation: only selective compilation, no removal of unused Functions/Classes.
hello world 23.1 -> 8.1 MB heap

R=fschneider@google.com

Review URL: https://codereview.chromium.org//1259123009 .
2015-08-04 11:35:36 -07:00
Matthias Hausner 4ebab25d8f Implement constructor closures
One detail that isn't implemented yet is canonicalization of constructor tear-offs. At the moment, two tear-offs of the same constructor result in closures that are not equal.

BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1255063005 .
2015-08-03 15:50:46 -07:00