asiva@google.com
3b5f530a44
Rename the field type_arguments_instance_field_offset_ to
...
type_arguments_field_offset_ in preparation for calling it
type_arguments_field_offset_in_words_
Review URL: https://codereview.chromium.org//11316203
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15431 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:36:04 +00:00
iposva@google.com
6245a1ac1b
- Make RawObject::tags_ private.
...
Review URL: https://codereview.chromium.org//11411139
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15241 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:54:00 +00:00
ager@google.com
28775e1c98
Intrinsify ExternalUint8Array.[].
...
This helps the HTTP parser quite a bit. I was playing around with
it and thought I might as well upload it for review. Feel free
to take over the changelist if I'm doing this wrong. In that
case you should see this as a request for intrinsification of
ExternalUint8Arrays. :-)
R=fschneider@google.com ,srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//11280121
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15200 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 15:35:15 +00:00
srdjan@google.com
a6dae8cd4a
First part of static call cleanup: store static call targets into code object, referenced by code-offset.
...
Review URL: https://codereview.chromium.org//11418046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15091 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 16:39:07 +00:00
srdjan@google.com
7375693321
In optimized code use IC calls for instance calls that have no IC data instead of deoptimizing. The optimized IC call increments usage counter and reoptimizes optimized function if the threshold is met.
...
Recognize closure calls and mark them in ICData. Closure calls do not populate ICData, i.e., number of checks is always 0 (unless mixed closure calls with regular instance calls). Therefore closure IC calls do not count for reoptimization.
Review URL: https://codereview.chromium.org//11361225
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14860 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 18:34:05 +00:00
iposva@google.com
c9c79e6bcc
- Fix x64 build.
...
Review URL: https://codereview.chromium.org//11362214
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14822 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:26:38 +00:00
iposva@google.com
0c6ff657ed
- Do not mix scalar values and object fields in RawInstance to
...
simplify the traversal for GC. Classes with native fields
have a hidden reference to a typed array containing the
native fields.
Review URL: https://codereview.chromium.org//11312183
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14821 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:21:04 +00:00
asiva@google.com
2e21fbd3ee
Fix for issue 6623 - Canonicalize implicit static closure objects.
...
Review URL: https://codereview.chromium.org//11359151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14802 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 19:02:44 +00:00
fschneider@google.com
a42474ba37
Reland: Improve smi shift operations and avoid repeated deoptimizations.
...
This CL includes a bug fix where a NULL check of the pc was missing.
Also change the dart2js test status of arithmetic_test from Skip to Fail.
Review URL: https://codereview.chromium.org//11369158
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14755 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 19:54:55 +00:00
hausner@google.com
be175c758e
Implement const expressions for local variables
...
Review URL: https://codereview.chromium.org//11265047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14716 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:19:43 +00:00
fschneider@google.com
a830c7c091
Revert r14711 and r14709 because of test failures.
...
TBR=srdjan@google.com
Review URL: https://codereview.chromium.org//11363151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14712 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:37:26 +00:00
fschneider@google.com
0f251088ec
Improve smi shift operations and avoid repeated deoptimizations.
...
Smi left shifts do not contain a call now. Only after deoptimizing
at a smi operation we we generate mint code or a generic call to
avoid repeated deoptimization.
Added a test case for the code that was not covered by existing tests.
Review URL: https://codereview.chromium.org//11363141
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14709 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:03:47 +00:00
tball@google.com
209499c17f
Merged String subclasses into String.
...
Merged String subclasses (OneByteString, etc.) into String, keeping
their raw types. This allows String handles to continue to point
to a String after its raw type is changed, such as to make its data
external.
BUG=
Review URL: https://codereview.chromium.org//11367044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14545 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 22:22:19 +00:00
sgjesse@google.com
a248c61b14
New APIs for external byte arrays
...
The following APIs have been added:
Dart_IsExternalByteArray: Check whether an object is an external byte
array.
Dart_ExternalByteArrayGetData: Return the pointer to the external data
hosted by the external byte array.
R=cshapiro@google.com
BUG=
Review URL: https://codereview.chromium.org//11362009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14380 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 07:53:33 +00:00
asiva@google.com
ebbb7c4134
- Represent strings internally in UTF-16 format, this makes it
...
compatible with webkit and will allow for easy externalization of
strings. One byte strings are retained for pure ASCII strings.
(The language specification was changed recently to reflect this as
follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
consistent and better describe the underlying functionality
Dart_NewString => Dart_NewStringFromCString
Dart_NewString8 => Dart_NewStringFromUTF8
Dart_NewString16 => Dart_NewStringFromUTF16
Dart_NewString32 => Dart_NewStringFromUTF32
Dart_NewExternalString8 => Dart_NewExternalUTF8String
Dart_NewExternalString16 => Dart_NewExternalUTF16String
Dart_NewExternalString32 => Dart_NewExternalUTF32String
Dart_StringGet8 => Dart_StringToUTF8
Dart_StringGet16 => Dart_StringToUTF16
Dart_StringToCString => Dart_StringToCString
Dart_IsString8 => Removed
Dart_IsString16 -> Removed
Dart_StringToBytes -> Removed
Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
regis@google.com
57a60316f0
Fix wrong canonicalization of signature class due to name collision (issue 6353).
...
Add test.
Review URL: https://codereview.chromium.org//11342028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14234 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 00:06:24 +00:00
iposva@google.com
dc2c8b3707
- Consolidate code into the old generation.
...
- Record pointers between code objects.
- Collect unreferenced code objects.
Review URL: https://codereview.chromium.org//11265026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14113 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 23:46:01 +00:00
hausner@google.com
1811a6b913
Support for type dynamic in VM
...
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.
VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
asiva@google.com
1bf642129d
- Get rid of RawClosure class and use RawInstance for closures.
...
- Simplify SetRaw to not require an access to the Current Isolate.
Review URL: https://codereview.chromium.org//11087070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13581 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 20:34:08 +00:00
asiva@google.com
6b07453dd6
- Remove deprecated Dart API calls Dart_ClosureSmrck and DartClosureSetSmrck
...
- Remove the smrck field from RawClosure object.
Review URL: https://codereview.chromium.org//11017069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13559 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 17:08:30 +00:00
iposva@google.com
78c30b0775
- Update status files for failing tests.
...
Review URL: https://codereview.chromium.org//11093013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13387 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 00:47:42 +00:00
iposva@google.com
5f2f50f960
Land http://codereview.chromium.org/11047027/ for Matthias:
...
Implement export clause in VM
Implement export namespace support in VM compiler.
Missing functionality: ensuring that a name is only re-exported once.
Review URL: https://codereview.chromium.org//11028084
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13384 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 00:14:42 +00:00
iposva@google.com
b85f604f66
- Implement first class types in the VM.
...
- Make AbstractType a subclass of Instance and map it and its subclasses
to private Dart classes in dart:core implementing the Type interface.
- Avoid dispatching through statics in Object if not strictly needed.
Review URL: https://codereview.chromium.org//10979058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12981 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 21:19:00 +00:00
iposva@google.com
b1f0b23fc7
- Remove obsolete class.
...
Review URL: https://codereview.chromium.org//10979035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12920 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 17:25:39 +00:00
hausner@google.com
201bce4219
Support for show/hide combinators
...
- Add a new VM object called a Namespace.
- A Namespace is a library, and two list of names to hide/show.
- Convert Library and LibraryPrefix to contain Namespace
objects instead of Libraries in their import list.
Review URL: https://codereview.chromium.org//10967052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12804 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 20:46:56 +00:00
regis@google.com
61297238fb
Support redirecting factory constructors in the VM (issue 3969).
...
Add test (negative tests still missing).
Some more work is needed regarding when to throw a dynamic error and when to
report a compile-time error. Some questions are not answered by the spec.
Review URL: https://codereview.chromium.org//10964058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12791 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 17:28:37 +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
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
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
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
asiva@google.com
0dc73ee3a2
Remove inclusion of 'include/dart_api.h' in 'raw_object.h'
...
Review URL: https://chromiumcodereview.appspot.com//10902002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11571 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 00:17:52 +00:00
tball@google.com
962da19ba8
Reworked previous CL (ExternalStringGetPeer speed up) to avoid the
...
need for an 'extern "C"' declaration in raw_object.h, which broke
the Windows builds. Instead, a peer() method is added to the
RawExternalString*Object classes, and RawObject::ToAddr() is used
to fetch the address of these raw instances. This avoids the need
for Dart_ExternalStringGetPeer needing friend access to those classes.
Review URL: https://chromiumcodereview.appspot.com//10891036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11540 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 20:04:55 +00:00
tball@google.com
59efb29a14
Performance improvement for the Dart VM runtime method
...
Dart_ExternalStringGetPeer. This change is basically an unrolling
of the templates that previously defined the method, to reduce
the number of handles allocated.
This change is supported by the DartStringAccess VM benchmark, which
showed a ~20x improvement from the above change. Currently this
benchmark focuses on Dart_ExternalStringGetPeer, rather than String
performance in general.
Please review this carefully. Commented-out is a "NoGCScope no_gc_scope;"
line, which when enabled asserts that GC doesn't happen when this function
is called. However, one of the tests fails this check, though when I
set a breakpoint in gdb before the NoGCScope item is allocated, it's not
hit before the assertion fails. I commented out that line, in the hope
that more senior reviewers suggest improvements.
Review URL: https://chromiumcodereview.appspot.com//10897014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11534 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 18:06:17 +00:00
tball@google.com
c228cb4b55
Rollback of previous commit -- still under review.
...
Review URL: https://chromiumcodereview.appspot.com//10896018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11476 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 21:18:21 +00:00
tball@google.com
8f12d338d6
First implementation of performance improvement for
...
Dart_ExternalStringGetPeer.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11475 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 20:55:16 +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
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
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
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
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
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
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
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