lrn@google.com
292da5cc48
Make int an abstract class.
...
This looks deceptively simple (the only real change is in init, which
just copies the code for double, and the rest are just renaming for
consistency). It seems to work.
Review URL: https://chromiumcodereview.appspot.com//10933039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12304 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 07:17:27 +00:00
asiva@google.com
724b8600d4
Move all the closure related fields in RawFunction into a new class
...
called RawClosureData
Add a field called 'data_' in RawFunction which points to a RawClosureData
object for closure functions, a signature class for signature functions or
an implicit closure function if there is an implicit closure for a regular
function.
This ensures that we don't burn 5 fields in RawFunction for normal functions.
The heap savings from this change on standalone dart is about 67k.
After this change:
New space (0k of 32768k) Old space (886k of 1024k) Code space (0k of 0k)
Prior to this change:
New space (0k of 32768k) Old space (953k of 1024k) Code space (0k of 0k)
Review URL: https://chromiumcodereview.appspot.com//10917222
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12290 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 00:20:37 +00:00
regis@google.com
e860f819a0
Limit the maximum number of formal parameters (32K fixed and 32K optional)
...
in order to save space in function objects.
Naming cleanup.
Review URL: https://codereview.chromium.org//10928160
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12288 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 23:35:05 +00:00
asiva@google.com
3a69681099
Shrink the size of deoptimization_counter_ and kind_tag_ fields. This
...
compensates for the new num_optional_named_parameters_ field.
Review URL: https://chromiumcodereview.appspot.com//10905220
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12226 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 23:06:01 +00:00
iposva@google.com
a8a8f1e7de
- Do not limit the compiler message buffer, by allocating the message
...
into a String object.
Review URL: https://chromiumcodereview.appspot.com//10933021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12202 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:03:40 +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
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
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
asiva@google.com
e65ddf4079
Use Heap::kOld when allocating objects for script snapshots.
...
Review URL: https://chromiumcodereview.appspot.com//10867046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11486 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 00:51:32 +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
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
iposva@google.com
d8f4530942
- Remove redundant assertion.
...
- Add flag --verify-handles to enable checking when assigning to handles.
Review URL: https://chromiumcodereview.appspot.com//10872043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11250 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 18:55:42 +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
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
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
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
cshapiro@google.com
c9a5284465
Expose the WeakProperty type.
...
Review URL: https://chromiumcodereview.appspot.com//10834397
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10932 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-18 03:25:44 +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
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
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
99d563982c
- Support for patching of class methods and fields.
...
Review URL: https://chromiumcodereview.appspot.com//10827288
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
srdjan@google.com
8299db1ff0
Optimize equality for case when all targets are Object.equals.
...
Also fixes a couple of issues with https://chromiumcodereview.appspot.com/10830275/
Review URL: https://chromiumcodereview.appspot.com//10826285
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10615 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:44:07 +00:00
iposva@google.com
f29e6bb659
- Split Dart core libraries into shared sources and patch sources.
...
Currently this split goes along the runtime vs. library directories,
eventually more shared code will be sitting in the shared library
sources.
Review URL: https://chromiumcodereview.appspot.com//10834284
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10612 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:01:20 +00:00
asiva@google.com
00dd8aa761
Remove functions_cache_ and it's references as it is not being used anymore.
...
Review URL: https://chromiumcodereview.appspot.com//10824266
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10542 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 23:33:37 +00:00
hausner@google.com
9b47d131bf
Support new getter syntax (no formal parameter list)
...
Support both new and old getter syntax in the VM compiler.
One co19 test becomes invalid, as it expects a compile error
due to missing getter formal parameters.
Review URL: https://chromiumcodereview.appspot.com//10837208
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10541 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 22:53:34 +00:00
asiva@google.com
5fd180cdfc
1. Register canonical names for internal VM classes and get rid of the method GetSingletonClassName
...
2. Create the empty_array object as a singleton in the VM isolate and remove it from the object store
3. Remove eager population of the functions_cache entry in the class. This results in a pretty impressive reduction of the initial isolate heap size:
- on IA32 it goes from 1331k to 1071k
- on X64 it goes from 2431k to 1911k
- snapshot size also is reduced from 859219 bytes to 789147 bytes.
(as a follow up change I will consider completely removing functions cache)
Review URL: https://chromiumcodereview.appspot.com//10827249
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10535 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:43:00 +00:00
asiva@google.com
d218086729
1. Write out only the kind_tag_ field of a function in the snapshot instead of the individual bits as boolean values. This reduces the snapshot size by about 4k
...
2. Move the kind_tag_ accessor functions from RawFunction to Function (we try not to have any code in the Raw classes).
Review URL: https://chromiumcodereview.appspot.com//10831248
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10528 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 20:35:59 +00:00
iposva@google.com
f0862ed7d0
- Improve generated sources:
...
+ Strip private key from identifiers.
+ Properly handle strings with interpolation.
- Keep private key in the token stream and properly snapshot.
Review URL: https://chromiumcodereview.appspot.com//10823269
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10515 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 17:01:08 +00:00
srdjan@google.com
32d5673c05
Move deopt reason into PcDescriptor so the EAX/RAX register is not destroyed. Some cleanups in PC descriptor.
...
Review URL: https://chromiumcodereview.appspot.com//10832214
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10424 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 22:15:38 +00:00
asiva@google.com
d4d781d636
- Unify class ids and snapshot object ids list so that we don't have disparate
...
and sometimes confusing values.
- Remove instance_kind_ field from RawClass.
- Rename all class id names to have a Cid suffix.
- Remove code from object.h and object_store.h which dealt with object ids
of predefined classes for snapshots.
Review URL: https://chromiumcodereview.appspot.com//10827209
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 19:46:23 +00:00
iposva@google.com
de7f866c4a
- Allow patching of top-level methods and accessors.
...
Review URL: https://chromiumcodereview.appspot.com//10824209
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10409 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 17:29:49 +00:00