On x86:
Original sizes:
Size of isolate snapshot = 925655
New space (0k of 32768k) Old space (1700k of 1792k) Code space (0k of 0k)
out/ReleaseIA32/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 80944
CorelibIsolateStartup(RunTime): 5636
UseDartApi(RunTime): 404620
Dart2JSCompileAll(RunTime): 1379683
FrameLookup(RunTime): 45
Size with the new TokenStream implementation:
Size of isolate snapshot = 851352
New space (0k of 32768k) Old space (1368k of 1536k) Code space (0k of 0k)
out/ReleaseIA32/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 76918
CorelibIsolateStartup(RunTime): 4056
UseDartApi(RunTime): 502111
Dart2JSCompileAll(RunTime): 1251646
FrameLookup(RunTime): 45
(saves about 332k out of the original TokenStream size of 410k)
On x64:
Original sizes:
Size of isolate snapshot = 924865
New space (0k of 32768k) Old space (3234k of 3444k) Code space (0k of 0k)
out/ReleaseX64/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 109660
CorelibIsolateStartup(RunTime): 3985
UseDartApi(RunTime): 463009
Dart2JSCompileAll(RunTime): 2170309
FrameLookup(RunTime): 35
Size with the new TokenStream implementation:
Size of isolate snapshot = 849675
New space (0k of 32768k) Old space (2436k of 2560k) Code space (0k of 0k)
out/ReleaseX64/run_vm_tests --benchmarks
CorelibCompileAll(RunTime): 98716
CorelibIsolateStartup(RunTime): 2938
UseDartApi(RunTime): 509149
Dart2JSCompileAll(RunTime): 2042273
FrameLookup(RunTime): 39
(saves about 798k out of the original TokenStream size of 810k)
Token stats:
Number of tokens: 101470
Literal tokens: 4550
Ident tokens: 33020
Review URL: https://chromiumcodereview.appspot.com//10697055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9539 260f80e4-7a28-3924-810f-c04153c831b5
The previous algorithm would visit each pointer in the heap and verify it
without regard for whether the pointer had already been visited.
The new algorithm computes the set of allocated objects and verifies each
object in the set. In a second pass, each pointer is visited and tested
for membership in the set.
BUG=2606
Review URL: https://chromiumcodereview.appspot.com//10696029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9532 260f80e4-7a28-3924-810f-c04153c831b5
In preparation for collapsing BindInstr/DoInstr and flattening
Computations into the Instruction hierarchy.
Add a pair of functions EffectGraphVisitor::Bind and
EffectGraphVisitor::Do for adding computations to the flow graph that
have respectively one and zero uses. This creates a single site where
we construct new BindInstr and a single site where we construct new
DoInstr (also, a single site where we construct new UseVal during flow
graph construction).
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10702092
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9407 260f80e4-7a28-3924-810f-c04153c831b5
Each fixed parameter is initially defined by a ParameterInstr as definition. This
definition is not in the instruction stream, but just in the initial environment
at the graph entry so that the live range of all parameters start at the same point.
The pre-order spanning tree was computed in the wrong way which caused test failures
when building SSA because renaming relies on the dominator tree which depends on
the preorder spanning tree.
Also change the IL printing functions to be more compatible with the visualizer tool.
Review URL: https://chromiumcodereview.appspot.com//10735002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9391 260f80e4-7a28-3924-810f-c04153c831b5
Each instruction that can deoptimize need to have the values of the
non-optimizing code as uses. The values are stored in an environment
(GrowableArray<Value*>) attached to the instruction when constructing
SSA form.
For now every instructions gets a deoptimization environment. It contains
the values of all locals, parameters and expression stack elements at
the start of the instruction.
The environment is not used yet, but can be printed in the flow graph
with the flag --print-environments.
Review URL: https://chromiumcodereview.appspot.com//10696090
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9345 260f80e4-7a28-3924-810f-c04153c831b5
The helper function RemoveFromGraph resets previous and next instruction pointers to NULL
when deleting an instruction.
I changed it to return the successor of the removed instruction so that the function is
more convenient to use while iterating over the list of instructions.
Review URL: https://chromiumcodereview.appspot.com//10692072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9332 260f80e4-7a28-3924-810f-c04153c831b5
In order to be able to efficiently iterate backwards over instructions
and removing or replacing instructions in the graph we want them to
be a double-linked list inside basic blocks. The list has the following
1. Block entry instructions do not have a previous instruction.
2. The last instruction in a block may or may not have a next instruction:
- Branches have a NULL-successor.
- Normal block exits have a block entry instructions as successor.
This CL also makes the accessor for previous and next instruction in this
list non-virtual. This avoidis the current code duplication there.
Review URL: https://chromiumcodereview.appspot.com//10665022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9297 260f80e4-7a28-3924-810f-c04153c831b5
The native ports use the snapshot reader to create the dart objects. Added support for reading external arrays from snapshots but no support for writing them. The only way an external array is written to a snapshot is through the api message writer.
This allows dart:io to avoid one copy of data read from files and sockets. This change only contains one use of the new API.
R=asiva@google.com,iposva@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10698011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9281 260f80e4-7a28-3924-810f-c04153c831b5