Commit Graph

957 Commits

Author SHA1 Message Date
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
Ryan Macnak 0ed4d44a99 Toward precompiled snapshots.
Gets as far as encountering null Instructions in the first Dart_Invoke after loading the snapshot.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1318803002 .
2015-09-02 16:15:02 -07:00
Siva Annamalai 52c2319d48 Changes to prepare for allowing script snapshots to be taken after running the main application
- Update usage counter to optimization threshold or 0 depending on whether optimized code exists for the Function
- Do not serialize the resolved names cache and loaded scripts cache when doing script snapshots

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1329503002 .
2015-08-31 16:36:23 -07:00
Siva Annamalai 6b2ae767fd Changes to prepare for allowing script snapshots to be taken after running the main application
- Create singleton empty context scope object
 - Add an implicit field in the context scope so we can distinguish implict context scope objects
 - Allow serialization of extractor_parameter_types, extractor_parameter_names

BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1323813004 .
2015-08-31 15:41:41 -07:00
Daniel Andersson 51de0c8ff4 Refactor skipped code functions interface.
Prepares for parallel marking by encapsulating the skipped code functions set, and moving the finalization out to the GCMarker, after all marking is done.

Also changes the interface in the visitor interface to make it less coupled with the representation of the set.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1287463003 .
2015-08-27 11:19:19 -07:00
Florian Schneider 858f1d811a VM: Cache instructions entry point in RawFunction/RawCode.
This make calling sequences shorter and faster, at the expense of an extra
word in the code object and the instructions object.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1295823003 .
2015-08-19 10:04:39 +02:00
Ryan Macnak 38eb6cbd4f Store the RegExp and the string specialization cid in an Array in RawFunction::data_.
No change in Function size due to alignment round up.

R=regis@google.com

Review URL: https://codereview.chromium.org//1295973002 .
2015-08-14 16:01:10 -07:00
Siva Annamalai e61f1dc8ce 1. Reclaim the CreatedFromSnapshot bit and use the bit to indicate VM heap object.
2. Cleanup calls to set_tags when reading objects from a snapshot.

3. Fixes issue 21816

R=regis@google.com

Review URL: https://codereview.chromium.org//1221503004 .
2015-08-10 11:02:31 -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 8a3e134502 Non-tree-shaking --precompile.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1261673004 .
2015-07-30 15:29:19 -07:00
Srdjan Mitrovic cc1b7f0c3e Fix inlining information:
Missing caller inlining id chain left the inlining chain truncated and incorrect.
Added full mapping: inlining-id to caller-inlining-id.

Remove fix from https://codereview.chromium.org/1259243005/

Added some of changes from https://codereview.chromium.org/1260163006/

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1268783002 .
2015-07-30 14:47:32 -07:00
Siva Annamalai 325f40d9db Fix for bug 21079
Implement patch records to patch canonical objects.

BUG=21079
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1255003004 .
2015-07-30 10:24:13 -07:00
Ryan Macnak 8c98455ab5 Retaining path improvements.
- Don't answer retaining paths that go through ICData.
 - Associate edge labels with the referer instead of the referent.
 - Give edge labels for VM classes (offsets only).
 - Make is possible to distinguish closures and functions from their refs.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1246073005 .
2015-07-28 15:56:10 -07:00
Ryan Macnak 0979a7b23e Async-step, first cut.
Also fix inclusion of internal variables from outer scopes in var descriptors.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1241673003 .
2015-07-16 13:05:37 -07:00
Ryan Macnak d1475c0356 Port irregexp bytecode compiler and interpreter from V8 r24065.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1201383002 .
2015-07-07 14:43:32 -07:00
Srdjan Mitrovic c0b359db6c Intrinsic version of Object.runtimeType
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1217323002.
2015-07-01 10:13:14 -07:00
Daniel Andersson 12dddf1ced Move the delay set into its own class.
Prepare it for actual parallelism:
* add synchronization
* abstract out the header check/update (will become one CAS)

Use two separate marking visitors (sharing the delay set), with the main marking visitor in a separate thread (while mutator is paused), just to show we can.

Review URL: https://codereview.chromium.org//1176183002.
2015-06-19 12:58:19 -07:00
Siva Annamalai 321d34adad Fix for issue 23647 (https://github.com/dart-lang/sdk/issues/23647)
Do not use VM isolate indexes when writing out references to objects in the VM isolate.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1190143003.
2015-06-19 10:58:33 -07:00
Ryan Macnak 392a83221f Allow setting break-on-exceptions option over the service protocol. Add command to Observatory's debugger.
Decide whether to cache service objects based on the fixedId property.

Be more tolerant of eval scripts and functions.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1174313002.
2015-06-15 12:05:23 -07:00
Ryan Macnak b8bad6725c Expand the class id to 32 bits and size field to 16 bits on 64-bit platforms.
Remove misleading suffix from disassembly of some ia32 immediate ops.

R=asiva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//1174173007.
2015-06-12 16:42:40 -07:00
Siva Annamalai 298a2f467f Add an assertion to ensure that the return type and types of parameters are canonical or a TypeParameter.
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org//1182673002.
2015-06-11 18:09:41 -07:00
Ryan Macnak f2b59c3ed9 Make guard_cid and nullable_cid half words.
Add missing half-word instructions for ia32/x64.

46.0kB -> 38.4kB (-16.5%) of Field in hello world

R=srdjan@google.com

Review URL: https://codereview.chromium.org//1176703002.
2015-06-10 14:14:50 -07:00
Florian Schneider 265a54411a Object pool with support for untagged entries.
This adds meta-information to object pool entries to allow storing
untagged immediates or code addresses (ExternalLabel) directly.

This eliminates the need to generate extra code to preserve the LSB
when storing immediates as smis (x64, arm64).

BUG=

Review URL: https://codereview.chromium.org//1175523002.
2015-06-10 11:41:22 +02:00
Ryan Macnak a16abcdf5a Shrink some fields and add some bounds checks.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1149943009.
2015-06-09 10:47:25 -07:00
Daniel Andersson a410c0f993 Thread-local store buffers, v2
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1168483003.
2015-06-09 09:33:36 -07:00
Daniel Andersson 6090af8f0b Serialize maps without hashes.
Re-generate the indices after deserialization.

This is a more compact representation, and also fixes the issue with identity hash codes not being portable between isolates.

BUG=21675
R=asiva@google.com

Review URL: https://codereview.chromium.org//1151013005
2015-06-02 09:04:37 -07:00
Daniel Andersson ea46192ca3 VM-internalize the default Map implementation.
Make the compact linked hash map, which is the default implementation for Map
(including map literals), a VM-internal class.

This makes it easy to have more efficient serialization of maps (although for
now, the implementation is straight-forward).

Refactor the compact hash class hierarchy to enable the VM-internal class and
the rest (also the Set classes) to share a maximal amount of code, by using
two different bases for implicit/explicit fields.

Remove existing proof-of-concept, C++-based internal VM-class.

BUG=http://dartbug.com/22982
R=asiva@google.com

Review URL: https://codereview.chromium.org//1151523002
2015-05-28 09:32:54 -07:00
Florian Schneider e0621416f8 Remove unused pc descriptor types.
kClosureCall and kOptStaticCall are not needed anymore.
Closure calls are implemented as instance calls - the ClosureCall instruction
 only occurs in the synthetic FunctionImpl.call dispatcher - and does not correspond
to a source location where breakpoints can be set.

kOptStaticCall is not needed because breakpoints can only be set in unoptimized
code. kOther is used instead.

This also removes an unused PC descriptor at closure calls from unoptimized
code.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org//1160063002
2015-05-28 14:27:37 +02:00
Siva Annamalai 5e0a3d66e5 Move bootstrap scripts and token streams to the VM isolate so that they become read only objects. This reduces the per isolate heap size as follows:
Before the change:
Size of isolate snapshot = 780799
New space (0k of 1024k) Old space (758k of 1024k)

After the change:
Size of isolate snapshot = 279696
New space (0k of 1024k) Old space (602k of 1024k)

BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1151113002
2015-05-22 12:48:11 -07:00
John McCutchan 67c1b3a775 Fix build errors with GCC
BUG=

Review URL: https://codereview.chromium.org//1150183002
2015-05-21 18:42:14 -07:00
John McCutchan baa34257fc Track prologue offset of Code and use for more precise return addresses
- Remember the prologue offset in the Code object.
- Size of Code object does not change.
- Use the prologue offset to assist in locating the return address of the current frame.
- Prologue offset + instruction pattern matching will be accurate for all Dart code, most intrinsic prefixed Dart code, and some stub code.
- By default only collect Dart frames (normal Dart developers only care about Dart frames)

R=srdjan@google.com

Review URL: https://codereview.chromium.org//1150633002
2015-05-21 18:35:19 -07:00
Ryan Macnak 300a2f34cf Delta encode pc descriptors, and combine pc kind and try index into single field.
328.3kB -> 126.8kB (-61.4%) mirrors_reader_test

Avoid quadratic var-int decoding in extracting edge counters by decoding once into a temporary list.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//1128183007
2015-05-18 11:04:45 -07:00
asiva@google.com 05d7eb5dfa Move symbol table from per isolate snapshot to vm isolate snapshot, this reduces the per isolate initial heap size
from New space (0k of 1024k) Old space (1274k of 1536k)
to New space (0k of 1024k) Old space (756k of 1280k)

R=hausner@google.com

Review URL: https://codereview.chromium.org//1123813002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45795 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 20:14:37 +00:00
fschneider@google.com 4aa1febbe6 Eliminate object table and use regular object pool for deoptimization infos.
On platforms that already use an object pool, we had a separate object table
used only for deoptimization infos. With this CL we don't have separate
tables, but only use the common object pool for both purposes.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//1073173003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45108 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 15:43:58 +00:00
fschneider@google.com c2fad4230c VM: Enable collection of unoptimized code for optimized functions.
Until now, code GC was limited to function that have not been optimized.
With lazy generation of unoptimized code on deoptimization we can now
collect unoptimized code for optimized functions as well.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//1067383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45062 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 12:02:30 +00:00
iposva@google.com 320b0e5541 - Remove JSCRE from the runtime.
R=vegorov@google.com

Review URL: https://codereview.chromium.org//1071713003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44987 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 23:59:23 +00:00
regis@google.com 831406238c Remove zapping of registers introduced in r37297 that has not turned up any GC
bugs in a long time.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1075493003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44982 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 20:56:28 +00:00
vegorov@google.com 3062d3bae0 Compress deopt instructions in memory using variable length encoding.
Remove DeoptInfo type entirely and store compressed instructions in the TypedData.

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

Review URL: https://codereview.chromium.org//1054393003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44966 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 13:08:36 +00:00
koda@google.com 0311c0eac9 Revert "Eliminate fake-Isolate workaround from concurrent sweeper."
The ARM simulator still needs a current isolate for its atomics.

TBR=iposva@google.com

Review URL: https://codereview.chromium.org//1027243003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44637 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-23 17:17:41 +00:00
koda@google.com b7e1dcac19 Eliminate fake-Isolate workaround from concurrent sweeper.
Add RawObject::Size(ClassTable*) to avoid remaning calls to Isolate::Current.

R=iposva@google.com

Review URL: https://codereview.chromium.org//1024063003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44611 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-20 20:37:38 +00:00
asiva@google.com cfb2df1020 Fix for issue 20992 - Allow sending static/top-level functions to other isolates which are spawned using the 'spawn function' functionality.
R=regis@google.com

Review URL: https://codereview.chromium.org//982723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44297 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 18:50:19 +00:00
koda@google.com 2124c76656 Catch corrupted pointers earlier.
Lack of pointer validation made issues 22549 and 22621 more difficult to track down.

Before this change, ScavengePointer would ignore any sufficiently large garbage values, even if they were obviously not well-formed pointers.

Remove obsolete unit test with "foreign" pointers; the zero-size scavenger case is already thoroughly exercised by the VM isolate.

BUG=22621
R=iposva@google.com

Review URL: https://codereview.chromium.org//975443003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44147 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 20:40:30 +00:00
iposva@google.com 7d1785e760 - Allow any implementation of StackTrace to participate in async/
await exception handling.

R=hausner@google.com

Review URL: https://codereview.chromium.org//940863002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43880 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 16:17:19 +00:00
iposva@google.com db9faebe98 - Simplify collection of stack traces. If we determine that a stack
trace is needed we collect the full stack trace instead of piecing
  it together as we walk up the stack.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//939773003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43863 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 02:18:53 +00:00
srdjan@google.com 81d8099650 Redesign inlining interval computation.
Review URL: https://codereview.chromium.org//904763003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43622 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 23:11:05 +00:00
iposva@google.com 6898a10c93 - Make sure to fail early if an non-stacktrace is passed into the VM
where we expect one.

Review URL: https://codereview.chromium.org//908433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43546 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 09:23:57 +00:00
koda@google.com 96bed4dd79 Add missing call to VerifiedMemory::Accept when initializing Smi field.
BUG=dart:22224
R=asiva@google.com

Review URL: https://codereview.chromium.org//898453009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43533 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 00:02:29 +00:00
hausner@google.com 2487c76886 Add support for sync* and yield and yield*
R=srdjan@google.com

Review URL: https://codereview.chromium.org//888463004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43516 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 18:36:40 +00:00
johnmccutchan@google.com e1d3dbcd8c Reduce isolate startup time in debug mode by 20 millis
Before:
CorelibIsolateStartup(RunTime): 34280

After:
CorelibIsolateStartup(RunTime): 14836

R=koda@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//884793002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43252 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-28 18:54:18 +00:00
fschneider@google.com b79f717e89 VM: Use PC offset instead of absolute PC in exception handler info.
Similar to the change I did for PC descriptors: We can save space by
using a uint32_t for the offset, instead of a uword for the absolute pc.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//868103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43138 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-26 15:40:06 +00:00