asiva@google.com
b053301ccf
Fix for issue 1204.
...
Do not allocate a buffer of 64KB by default when writing a message out. Start
with a much smaller buffer. FOr script and full snapshots the buffer
allocated remains 64 KB.
Review URL: https://chromiumcodereview.appspot.com//10908185
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12153 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 02:06:59 +00:00
srdjan@google.com
67871d3098
Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot.
...
Review URL: https://chromiumcodereview.appspot.com//10912146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12093 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 15:00:51 +00:00
asiva@google.com
8bd6bc5480
- Add a test case to test Source code generation of all the corelibs
...
(core, coreimpl, isolate, math and mirrors).
- Fix bugs in source code generation which were causing the above tests to
fail.
(This should take care of issue 4647 and related bugs).
Review URL: https://chromiumcodereview.appspot.com//10911159
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12092 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 05:26:37 +00:00
vegorov@google.com
ec0412a8e3
Fix format used to write information into /tmp/perf-<pid>.map.
...
Address and size should be hex numbers without 0x prefix.
R=cshapiro@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10918123
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12052 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 18:34:15 +00:00
regis@google.com
7cc84c2892
Implement new optional parameters syntax in the vm (issue 4290).
...
Provide --reject_named_argument_as_positional flag to ease transition to new
syntax (default is false).
Add tests.
Review URL: https://chromiumcodereview.appspot.com//10910119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12004 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 01:13:27 +00:00
asiva@google.com
fdbe32e24d
Use external byte arrays for token stream, this moves the token stream out of the isolate heap. For full snapshots the external byte array points to the snapshot buffer thus incurring no extra space in the C heap either.
...
Heap usage stats before this change is:
New space (0k of 32768k) Old space (1085k of 1280k) Code space (0k of 0k)
Heap Usage stats after this change is:
New space (0k of 32768k) Old space (947k of 1024k) Code space (0k of 0k)
A savings of about 138k.
Review URL: https://chromiumcodereview.appspot.com//10914050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11977 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 18:46:51 +00:00
srdjan@google.com
4201667ccf
In preparation for lazy deoptimization add "is_alive_" field to RawCode: visit embedded pointers only if it is set to true. It will be set to false when patching the code to call lazy deopt-trampoline stub, thus potentially destroying embedded pointers.
...
Review URL: https://chromiumcodereview.appspot.com//10915120
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11969 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 17:07:20 +00:00
fschneider@google.com
725fe7b2d8
Implement loop invariant code motion for check instructions.
...
This CL adds a new optimization pass that hoist loop invariant
instructions upwards out of loops.
I'm adding a deoptimzation point at every Goto so that we
can move deoptimizing instructions like checks out of loops.
As a result there may be multiple deoptimization descriptors
with the same PC. The corresponding assert are removed.
Review URL: https://chromiumcodereview.appspot.com//10909094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11946 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 13:21:20 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
hausner@google.com
35d7793891
Throw AbstractClassInstantiationError if an abstract class is instantiated
...
This is the second try to my previous attempt to implement the
new abstract class handling. Instead of a compile-time error,
the VM now throws an AbstractClassInstantiationError at runtime
if an abstract class is instantiated. Added the new error class
to the core library.
For now I'm still using the rule that a class is abstract if it is explicitly
marked as abstract, or if it defines a new abstract method.
Review URL: https://chromiumcodereview.appspot.com//10916039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11708 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 18:06:42 +00:00
tball@google.com
ed5664507b
Removed handle creation and inlined Instance::IsValidNativeIndex().
...
The Dromaeo dom core benchmark shows significant time spent in it,
where ~half the time is spent creating a handle.
Review URL: https://chromiumcodereview.appspot.com//10918016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11673 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 01:49:28 +00:00
asiva@google.com
e7969b98de
Fix for issue 4848 (Added missing store buffer updates when storing an object reference into another object at a number of places).
...
Review URL: https://chromiumcodereview.appspot.com//10918010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11670 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 23:28:22 +00:00
srdjan@google.com
caf04303f7
Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This assumption (verified with Todd and Gilad) simplifies the implementation of lazy deoptimization considerably.
...
Add flag --deoptimize-alot, which will lazily deoptimize all live optimized frames. Currently only the presence of deoptimization information is checked.
Add kDeoptAfter deoptimization point, which is the continuation for lazy deoptimization, after a call. Rename kDeopt to kDeoptBefore.
Removed a tests case that called into a native without properly setting up a Dart frame (Ok-d by Siva).
Native functions are not optimizable.
TODO: Split deoptimization information from DeoptimizationStubs. Check for redundant PcDescriptor information (what can be merged, especially at calls).
Review URL: https://chromiumcodereview.appspot.com//10885039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11642 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:53:46 +00:00
hausner@google.com
5692051e4e
Convert double interface into abstract class
...
In a future change, we can implement double in the core
library, eliminating class Double (using the patch class
feature).
Review URL: https://chromiumcodereview.appspot.com//10876100
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11631 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:29:49 +00:00
kmillikin@google.com
8122966c80
Put live register bits in stackmaps.
...
Add a count of live registers to each stackmap and add bits describing the
registers. This allows untagged values in general purpose registers at
safepoints.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10882055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11595 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 10:20:26 +00:00
hausner@google.com
b3a2c41d02
Revert change 11558
...
I learnt that instantiating an abstract class is a runtime error, not a compile time error.
TBR=regis
Review URL: https://chromiumcodereview.appspot.com//10894048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11567 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 22:49:52 +00:00
hausner@google.com
28d88d4b2d
Add compiler error when instantiating abstract class
...
Also, make abstract keyword on methods optional.
Review URL: https://chromiumcodereview.appspot.com//10899039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11558 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 22:13:06 +00:00
hausner@google.com
c7f5bcd0ca
Eliminate interface bool
...
Replace with concrete class bool instead, and getting rid of class Bool in core_impl library.
Review URL: https://chromiumcodereview.appspot.com//10874071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 21:09:23 +00:00
ager@google.com
570d769b30
Use patching for Expando so the implementation-specific files are not needed in the SDK.
...
Make extra methods private in VM version.
R=ajohnsen@google.com ,cshapiro@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10870064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11369 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 07:15:18 +00:00
regis@google.com
d0539c0335
Propagate type of list literal from parser to ast, graph, and optimizer.
...
Review URL: https://chromiumcodereview.appspot.com//10878042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11329 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 18:17:11 +00:00
turnidge@google.com
bfc3132e94
Missing file from last commit.
...
Review URL: https://chromiumcodereview.appspot.com//10874043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11263 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:59:28 +00:00
regis@google.com
a0c527b5d8
Add convenience static members of Type: Smi and Mint.
...
Use them during type propagation.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10873036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11258 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:04:13 +00:00
hausner@google.com
0300d88b1b
Gentle start with removing explicit interfaces
...
Review URL: https://chromiumcodereview.appspot.com//10832401
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11248 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 18:32:10 +00:00
ager@google.com
7d86630418
Use patching for regexp implementation.
...
BUG=
Review URL: https://chromiumcodereview.appspot.com//10880020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11218 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 09:24:40 +00:00
regis@google.com
55c106f812
Make ClassFinalizer indifferent on whether we are generating a snapshot or not.
...
Add flag --error_on_malformed_type.
Remove obsolete flag --verify_implements.
Support snapshotting of LanguageError (for malformed types) and ApiError.
Review URL: https://chromiumcodereview.appspot.com//10871005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11198 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:27:49 +00:00
cshapiro@google.com
2e00a80dd5
Provide an Expando implementation for the VM.
...
Review URL: https://chromiumcodereview.appspot.com//10861041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11196 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:03:40 +00:00
srdjan@google.com
b6042c9419
Fix printing of symbols for profiling on x64.
...
Review URL: https://chromiumcodereview.appspot.com//10870018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11192 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 22:48:10 +00:00
asiva@google.com
596a5f1af9
Use kInstanceCid instead of object_store()->object_class() when checking to see if the class is object class.
...
Review URL: https://chromiumcodereview.appspot.com//10873004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11190 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 22:21:44 +00:00
ager@google.com
722c1a3ce6
Deprecate Math object in corelib in favor of dart:math library.
...
Review URL: https://chromiumcodereview.appspot.com//10829459
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:33:01 +00:00
kmillikin@google.com
57f5dbafd6
Give a length field to stack bitmaps.
...
The bitmaps describing the stack have an explicit length field. It is now
an assertion failure to read bits outside the length --- they are no longer
assumed to be false.
Also remove an unused method and simplify the implementation of
BitmapBuilder by removing an embedded member that was always referred to via
a pointer.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10832410
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11138 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 12:42:54 +00:00
asiva@google.com
4c6c2c096b
Retry r11091 with explicit template instatiation to keep the linker happy.
...
Review URL: https://chromiumcodereview.appspot.com//10869005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11118 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 00:18:43 +00:00
asiva@google.com
a4a52e0801
Add a symbol for PatchClass as it currently has a null for the name.
...
Review URL: https://chromiumcodereview.appspot.com//10837298
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11107 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 22:34:40 +00:00
asiva@google.com
9155bc295c
Revert change 11091.
...
Review URL: https://chromiumcodereview.appspot.com//10866004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11096 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 21:01:10 +00:00
asiva@google.com
b54731bd82
Currently we use a generated number as the class id for object class, this change tries to pin it to kInstanceCid so that we can do all the checks for object class using this class id.
...
Review URL: https://chromiumcodereview.appspot.com//10861023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11091 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 20:13:39 +00:00
kmillikin@google.com
94a5b82f60
Make stackmaps store their actual length.
...
This allows stackmaps with varying lengths in the same function, necessary
for the way we plan to support bitmaps for saved live registers.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10837303
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11019 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 08:43:32 +00:00
iposva@google.com
26d59247df
- Pass the correct version of handle reference to Class::NewNativeWrapper.
...
Review URL: https://chromiumcodereview.appspot.com//10827434
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11012 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 02:49:46 +00:00
regis@google.com
fea5f83714
Implement class hierarchy analysis in the VM.
...
Add test.
Review URL: https://chromiumcodereview.appspot.com//10828399
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11006 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 23:38:09 +00:00
srdjan@google.com
9db2823a00
Test functions do not have scripts associated with them. Prevent their optimization by marking any function without a script to be not optimizable.
...
Review URL: https://chromiumcodereview.appspot.com//10832397
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10998 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 20:04:25 +00:00
hausner@google.com
b64135920b
Eliminate imported_into pointers in Library
...
The imported_into pointers are no longer necessary with the new
library scoping rules.
Review URL: https://chromiumcodereview.appspot.com//10829431
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10991 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 17:51:29 +00:00
hausner@google.com
9dc7ab8e1e
Implement import scope
...
Implement the new scope rule for imports.
- Imported identifiers are in a scope that is shadowed
by the importing library's top-level scope.
- Conflicting names imported from different libraries
are not an error unless the name is referenced.
- Conflicting type names are only an error in checked mode.
In a follow-on change, I'll remove the "imported_into" pointers in libraries. They are no longer needed.
Issue 2945
Review URL: https://chromiumcodereview.appspot.com//10823396
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10923 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 21:06:16 +00:00
kmillikin@google.com
6c7d65e482
Reduce space used for stackmaps.
...
Only allocate space for the bits covered by the stackmap, instead of
for the backing store of the utility class that built it. Fix a bug
where the size in bytes was multiplied by the word size in bytes.
Also do some cleanup of the stackmap code and renaming in the tests.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10832292
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10870 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 07:57:47 +00:00
cshapiro@google.com
265e2306f5
Add a weak property type to the virtual machine.
...
Weak properties are key-value pairs. The liveness of the key determines
the liveness of the value. If the key is reachable the value is traced.
However, if the key is unreachable, the value is subject to finalization.
At present, the sole finalization action is clearing the key and value
fields. However, it is possible to extend this to invoking callbacks or
other techniques, as well as processing values in topological order.
Review URL: https://chromiumcodereview.appspot.com//10832199
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10867 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 01:17:39 +00:00
asiva@google.com
ab4f0f2b5e
1. Fix an issue with VM class names being null (this is exposed when doing a heap profile)
...
2. Move more VM class names as singletons to the VM isolate.
Review URL: https://chromiumcodereview.appspot.com//10827367
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10847 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 17:36:41 +00:00
iposva@google.com
e5851a16c5
- Merge function lists when patching classes (no more duplicates).
...
- Report errors when applying a patch with duplicate fields or mismatched parameters.
- Fix bug 4526: Wrong error message when defining an already defined class.
Review URL: https://chromiumcodereview.appspot.com//10854176
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10784 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 00:00:04 +00:00
regis@google.com
4bc16ae3f7
Cleanup handling of NullType in type propagation.
...
Remove AssertAssignable type checks from graph (when possible), rather than just
marking them as eliminated.
Review URL: https://chromiumcodereview.appspot.com//10828319
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10782 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 23:49:12 +00:00
iposva@google.com
5a443ddcc9
- Split functionality of adding implicit constructors and checking
...
for cycles into two functions.
- Fix handling of closures in patch classes.
Review URL: https://chromiumcodereview.appspot.com//10829332
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10703 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 07:33:19 +00:00
asiva@google.com
5d92c7c717
use bit fields for class state and field type values. This shrinks the snapshot
...
size by about 4k
Review URL: https://chromiumcodereview.appspot.com//10837247
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10696 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 01:06:01 +00:00
srdjan@google.com
820aa24ab6
Added Smi, Mint and Double types to object store.
...
Review URL: https://chromiumcodereview.appspot.com//10823324
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10687 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 22:54:53 +00:00
kmillikin@google.com
172ee045f3
Build and use stack maps in the SSA compiler.
...
Add a stack bitmap to the location summaries for calls that are GC
safepoints. The bitmap covers the spill slots. The register
allocator collects these bitmaps into a list and then marks live
pointer values during register allocation. When emitting code for a
call, a heap-allocated stackmap is built.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831261
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10618 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 06:59:24 +00:00
iposva@google.com
4b5c488b1d
- Remove debug printing.
...
Review URL: https://chromiumcodereview.appspot.com//10836230
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10617 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 01:23:41 +00:00