zra@google.com
c686b2c624
Finishes removing intptr_t from raw object fields.
...
Also removes {Read,Write}IntptrValue from the snapshot reader and writer.
R=asiva@google.com
Review URL: https://codereview.chromium.org//343803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40048 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 19:51:22 +00:00
turnidge@google.com
320c1bb74d
Rework how types work in the VM Service.
...
We now return a "type" property and an optional "_vmType" property for
each response. We use this to "hide" vm implementation specifics in
the VM Service protocol.
For example, before we might have returned an integer reference with type
"@Smi". Now it would have the type "@int" and the _vmType "@Smi".
This also allows us to hide funky vm internal types behind the generic
"Object" type.
Updated the protocol.md file somewhat to describe a notion of "private
properties".
Updated the Observatory and unit tests.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//547703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40044 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 17:25:52 +00:00
johnmccutchan@google.com
863b0d3464
Add support for TokenStream, LocalVarDescriptors, and PcDescriptors over service
...
BUG=
R=turnidge@google.com
Review URL: https://codereview.chromium.org//553973004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40039 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 16:32:10 +00:00
fschneider@google.com
0469c12072
VM: Remove unused IsClosureCall bit from IC data.
...
Since closure calls are now implemented in terms of instance calls
(via .call and a dispatcher method), there is no need for a bit in
the IC data tracking if a IC call may be a closure call.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//551043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39979 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 17:10:59 +00:00
vegorov@google.com
a1e2035eda
Improve List.sublist and List.toList for large lists.
...
- Merge array allocation and List._copyFromObjectArray to provide memmove fast path;
- In optimizer given v2 = CreateArray(v0, v1) fold v2.length load to v1;
BUG=
R=iposva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//536043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39831 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 20:36:01 +00:00
iposva@google.com
50652300dc
- Add AtomicOperations::CompareAndSwapWord
...
- Make AtomicOperations inlineable.
- Use atomic tag word updates from C++ where necessary.
Review URL: https://codereview.chromium.org//529823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39731 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-01 18:18:44 +00:00
asiva@google.com
914e607bea
Fix warning in build
...
../../dart/runtime/vm/object.h:723:25: warning: passing NULL to non-pointer argument 1 of ‘void dart::Object::set_vtable(dart::cpp_vtable)’ [-Wconversion-null]
obj->set_vtable(NULL);
^
R=iposva@google.com
Review URL: https://codereview.chromium.org//514983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39628 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 00:21:29 +00:00
asiva@google.com
81cbf85787
Add passive handle type PassiveObject to allow
...
creation and using handles for simple use in methods which expect
handles without any need for dispatching methods.
R=iposva@google.com
Review URL: https://codereview.chromium.org//510613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39574 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 01:00:37 +00:00
srdjan@google.com
85af0719ef
Faster IC stubs by specializing them for two-argument Smi operations (implemented only a few for now)
...
R=zra@google.com
Review URL: https://codereview.chromium.org//436643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39471 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:08:40 +00:00
fschneider@google.com
8683cef7cc
Fix VM build.
...
Only gcc seems to support using a non-static member name in a
sizeof expression written sizeof(A::m).
Using a dereference expression instead.
Review URL: https://codereview.chromium.org//490023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39445 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 10:39:45 +00:00
fschneider@google.com
4983823977
VM: Improve performance of method recognizer and unify the it with the intrinsifier.
...
The method recognizer is now in a separate file and the intrinsifier uses the
same infrastructure. Each function is marked at initialization time, so that
recognizing a method is a fast operation (reading a field from the Function object)
I cleaned the symbol table from unused symbols since I had to regenerate the
binary snapshot in the repository anyway for this change.
I had to rename the methods that are duplicated between the recognized method list
and the intrinsics list to match the naming convention used by the method recognizer.
I left the other intrinsics unchanged for now. They will be renamed in a future CL.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//468793004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39444 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 10:21:09 +00:00
johnmccutchan@google.com
fbb31fb54d
Tweaks to perf jitdump support
...
BUG=
R=asiva@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//489923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39427 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 20:43:54 +00:00
turnidge@google.com
c48496b873
Refactor isolate startup code in preparation for making isolate spawning more truly non-blocking.
...
Instead of passing a startup message to the new isolate, pass all
necessary information in to _startIsolate directly. The new isolate
sends its control port and capabilities back to the parent.
R=iposva@google.com
Review URL: https://codereview.chromium.org//456983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39423 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 19:57:09 +00:00
hausner@google.com
0bbf6c5b16
Runtime support for evaluation of static field initializer expressions
...
Eliminates the generation of field initializer functions by the parser.
Adds a runtime call that creates a one-shot function to evaluate the
initializer of a static field. The runtime function gets called from
the implicit static getter function for the field.
R=srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//471283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39387 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:53:44 +00:00
koda@google.com
c22d3cf74a
Avoid UTF-8 decoding in num.toString.
...
4-7% speedup on SplayHarder.
Introduce _Num class to make Dart and VM hierarchies match and enable sharing code between integers and doubles.
R=iposva@google.com
Review URL: https://codereview.chromium.org//473673004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39383 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:15:39 +00:00
asiva@google.com
bf9906cf51
Revert r39246 which reverted r39101
...
R=koda@google.com
Review URL: https://codereview.chromium.org//474073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39272 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 22:06:54 +00:00
asiva@google.com
98c5d02664
Ensure that hash for a symbol is not set to 0 when it is made external.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//474033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39268 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 21:17:40 +00:00
ricow@google.com
c92b022598
Revert revision 39101 "Avoid linear search for function lookup."
...
This is causing breakage of the pop pop win sample.
For details see issue 20517
This revert had a minor merge conflict for a todo comment
R=kasperl@google.com
Review URL: https://codereview.chromium.org//471843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39246 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 12:39:07 +00:00
koda@google.com
cc2b9ab0c4
Use function names as service IDs, rather than indices.
...
This gives more descriptive ids and removes dependency on implementation details of Class.
Special kinds of functions still use indices and oddballs still fall back to the object ring.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//466183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39217 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 19:59:15 +00:00
koda@google.com
05e30d37a2
Support non-ASCII script URLs in VM service by using IRIs (generalized URIs).
...
IRIs (RFC 3987) first UTF-8-encode the string and then percent-encode each byte.
Thus, this change has no effect for ASCII strings.
BUG=dart:20472
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//466813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39145 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 16:33:07 +00:00
koda@google.com
df87039699
Avoid linear search for function lookup.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//421913010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39101 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-11 19:27:59 +00:00
koda@google.com
2d67774537
Avoid redundant allocation of accessor names.
...
Support prefixed lookup in symbol table.
Startup new gen usage after "hello world" startup is reduced by ~15%.
R=iposva@google.com
Review URL: https://codereview.chromium.org//442483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38884 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 23:04:52 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +00:00
mlippautz@google.com
0e5fd6081a
Resize async function modifier bits
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//425163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38717 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 00:27:23 +00:00
mlippautz@google.com
47c8f8b3e2
Reland transformation of async functions.
...
Reland https://codereview.chromium.org/362153002/
Additions:
* Fixes for parsing async "keyword".
* Further tests.
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//423213005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38715 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 23:50:33 +00:00
koda@google.com
3ddcda9ab8
Reimplement Symbols using hash table template.
...
In the process, add hash table support for materializing an Object key from a lookup key on demand.
Also use this to simplify CompressedTokenStream.
R=iposva@google.com
Review URL: https://codereview.chromium.org//397413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38710 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 22:47:56 +00:00
iposva@google.com
f34efcd2a2
- Force growth when allocating objects from a snapshot.
...
- Remove unused Code::ObjectExistsInArea.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//423193003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38698 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 20:56:26 +00:00
mlippautz@google.com
be3e426f27
Revert async changes.
...
Revert "Transform functions marked as async"
This reverts commit 79cbaaf60143babcb29bb0ed74a0da87fd998c39.
Revert "Fix snapshot test"
This reverts commit ee892aa105daccc74c734eb18934814b76a415bb.
BUG=
Review URL: https://codereview.chromium.org//428993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38690 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 18:42:53 +00:00
mlippautz@google.com
dfc33496a4
Transform functions marked as async
...
In a nutshell:
foo(params) async { <body> return result; }
transforms to
foo(params) async {
var c = new Completer();
var async_body = () { <body> completer.complete(result); }
new Future(async_body);
return c.future;
}
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//362153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38681 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 17:16:00 +00:00
koda@google.com
1cdcb12b4e
Add VM class for Map/LinkedHashMap.
...
Introduces a new internal class for the most common case, the default Map.
Passes all functionality tests.
Slow: Dart side simply calls into runtime for now.
Hidden behind "--use_internal_hash_map".
Add copies of hash map tests to exercise this implementation.
R=asiva@google.com
Review URL: https://codereview.chromium.org//380333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38588 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 20:04:11 +00:00
iposva@google.com
28c8553cb6
- Fix a lot of warnings generated by -Wshorten-64-to-32
...
when compiling for ia32 on Mac.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//415513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38499 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 14:10:13 +00:00
srdjan@google.com
154eb30f58
ONe more iteration of PcDesacriptor iterator imporvement: do not copy record but access individual values when needed.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//403643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38408 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 20:11:29 +00:00
asiva@google.com
a323a9c9db
The dart version of typeddata library has changed to be compatible with the dart2js implementation
...
(typeddata does not implement ByteBuffer anymore).
Added new Dart API functions to account for this change.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//392043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38351 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 22:08:07 +00:00
koda@google.com
663f5b5ab7
Hide dangerous interface String::Equals/Hash(uint8_t*,...
...
The method String::Equals(uint8_t*, intptr_t) was incorrectly specified as operating on UTF-8, when it was actually assuming Latin-1.
Still, friends that use templates (like Symbols) can still access the convenient overloaded Equals/Hash.
R=asiva@google.com
Review URL: https://codereview.chromium.org//400493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38343 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 20:07:06 +00:00
srdjan@google.com
1259bda234
Fix PcDescriptor iterator to never return a pointer to a memory location since the PcDescriptor can move with the GC.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//396213005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38338 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 18:30:38 +00:00
koda@google.com
b51526fea3
Use new hash table template for compressing token streams.
...
Uses the flexible low-level interface to minimize lookups and allocation.
BUG=dart:13747
R=asiva@google.com
Review URL: https://codereview.chromium.org//398583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38294 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 17:39:10 +00:00
fschneider@google.com
26470e8384
Avoid allocating an exception object in the snapshot reader.
...
The unhandled exception object needs only be allocated before
actually returning an error from the snapshot reader, and not
at each invocation of ReadObject.
R=asiva@google.com
Review URL: https://codereview.chromium.org//388963003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38280 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 11:49:45 +00:00
mlippautz@google.com
a97bafab93
vm/observatory: Clean up script access
...
Addresses issues from https://codereview.chromium.org/346003003/
BUG=
R=hausner@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//392933003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38264 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 22:55:19 +00:00
srdjan@google.com
16e4600ff5
Fix build (link error reproducible on linux with GYP_DEFINES=dart_debug_optimization_level=0).
...
Review URL: https://codereview.chromium.org//393083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38251 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 19:49:27 +00:00
srdjan@google.com
9c8a395f6f
More PcDescriptor cleanups, compress recors if no try index is needed (frequent).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//382993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38242 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 17:07:03 +00:00
lrn@google.com
cf8ac68c0d
Make VM JSON parser parse doubles without doing substring.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//385163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38155 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 12:14:23 +00:00
rmacnak@google.com
0c7531c941
Implement Evaluate without creating temp classes by storing an eval function's script in the function's data field.
...
This means Evaluate doesn't burn through CIDs, mitigating the problem where class table entries are treated as strong references. More generally the whole tangle of objects created during eval is collectable, and running eval in a loop doesn't lead to heap growth.
http://dartbug.com/18284
R=hausner@google.com
Review URL: https://codereview.chromium.org//379353003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38140 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 23:23:01 +00:00
srdjan@google.com
4c69c06f27
Specify descriptor kind to iterate on.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//383523005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38128 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 19:44:49 +00:00
srdjan@google.com
757243e371
Fix fix -> all green.
...
Review URL: https://codereview.chromium.org//374573008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38035 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:58:04 +00:00
srdjan@google.com
2b5f2884ac
FIx bot redness because of compilation errors on Linux.
...
Review URL: https://codereview.chromium.org//376653004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38033 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:45:01 +00:00
srdjan@google.com
2bb77cd8d5
Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression of PcDescriptors).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//356923006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38032 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:25:45 +00:00
mlippautz@google.com
f7e931bb7d
observatory: add class view based on end token position
...
vm: add method to compute end token positions
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//361743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37964 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 23:22:50 +00:00
rmacnak@google.com
14fcffb2b6
Hide synthetic metadata field exposed in r35926.
...
Also remove Object::CreateInternalMetaData.
BUG=http://dartbug.com/19731
R=iposva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//363473004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37900 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 20:09:09 +00:00
lrn@google.com
7a32a75dcc
Avoid unnecessary copying when parsing doubles.
...
R=sgjesse@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//368483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37863 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 11:59:31 +00:00
mlippautz@google.com
f2db35a741
Coverage API supports proper filtering
...
(Partly) addressing concerns of https://codereview.chromium.org/346003003/
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//351373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37793 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 17:51:52 +00:00