Commit Graph

2925 Commits

Author SHA1 Message Date
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
rmacnak@google.com 154c31169e Teach the Observatory about WeakProperties (ephemerons).
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//536273002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39885 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 20:36:34 +00:00
rmacnak@google.com 22fed7f373 Teach the Observatory about MirrorReferences.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//542473003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39883 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 19:55:15 +00:00
jgruber@google.com 285af85187 Forward heap space argument in String and Integer::New*
BUG=
R=iposva@google.com, vegorov@google.com

Review URL: https://codereview.chromium.org//544573003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39874 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 15:45:48 +00:00
rmacnak@google.com 117f18b8a4 Teach the Observatory about Contexts. Factor out object graph information from the instance view.
Address various issues with mismatched tags and type errors.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//532063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39845 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 00:27:49 +00:00
srdjan@google.com 9820ecf1eb Fix printing of PcDescriptors.
R=regis@google.com

Review URL: https://codereview.chromium.org//534373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39837 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 21:19:57 +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
asiva@google.com 10011c8b72 - Make Parser::ReceiverType an instance method so that it has access to 'I'
- Minor changes to avoid handle creation.
- Fix snapshot version check error message.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//516303006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39815 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 18:29:12 +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 ac6b6f8fe4 Use PassiveObject were possible.
Review URL: https://codereview.chromium.org//512933002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39687 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-29 00:22:16 +00:00
turnidge@google.com 8a3c490f6b Add a new Sentinel type for sentinel responses. (They are not Null).
Fix some stray problems.

Silence warnings about stray GC events.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//514833003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39663 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 16:52:01 +00:00
rmacnak@google.com 2396c11a3c Treat null like the object it is in the Observatory and Service.
BUG=http://dartbug.com/20649
R=turnidge@google.com

Review URL: https://codereview.chromium.org//501583007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39616 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 19:36:29 +00:00
turnidge@google.com beebba4624 More service api cleanup.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//488233003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39609 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 17:13:31 +00:00
rmacnak@google.com 08cbcf480e Did you mean const?
R=srdjan@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//507063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39569 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 21:43:55 +00:00
asiva@google.com 2c7cb613ab Use isolate parameter while creating handles during class finalizers.
R=regis@google.com

Review URL: https://codereview.chromium.org//506683003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39568 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 20:54:16 +00:00
rmacnak@google.com 912741174f Remove service.Class.children, and (mostly) as a side-effect sort the class hierarchy view.
Fix spelling of superclass and subclass. Remove redudant null check in JSONifying classes.

BUG=http://dartbug.com/20554
R=johnmccutchan@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//500093003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39532 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 21:31:58 +00:00
turnidge@google.com 4d5f3ba638 vmservice protocol cleanup
user_name -> name
name -> vmName

Also, vmName is now only provided when it differs from name.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//487023003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39525 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 18:53:43 +00:00
srdjan@google.com 8745b71d4a Fix performance degradation in Havlak: prevent conflicting method recognizer kinds to be stored in the function.
Review URL: https://codereview.chromium.org//497623003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39477 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 22:37:47 +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 937726a0aa Improve polymorphic inlining of int/int double/double operations.
I added inlining of the native Double methods _add, _sub, _mul and _div and fromInteger
and unified the method recognition of the MethodRecognizer and the Intrinsifier classes.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//484693003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39446 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 11:13:44 +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
mlippautz@google.com 8285db5d29 Fix call to completer for async closures.
Addressing comments from https://codereview.chromium.org/460763002/

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//467323002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39207 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 17:14:44 +00:00
fschneider@google.com 54a7410866 Fix bug with CHA dependencies by recording a set of classes for registering code.
CHA is not only used with the receiver class, but also with other classes
when doing type propagation. The optimized code has to be registered with
all classes that are affected by CHA so that deoptimization occurs whenever
the set of subclasses changes for these classes.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//463103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39194 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 12:43:03 +00:00
mlippautz@google.com b267da78b7 Async closures are not optimizable for now.
BUG=

Review URL: https://codereview.chromium.org//467993002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39184 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 01:09:10 +00:00
koda@google.com 3d0729d454 Fix one missing invalid encoding case.
TBR=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//460233005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39146 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 16:43:48 +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
koda@google.com 50bb605a6a Handle-like interface for HashTable.
A combination of two independent interface changes:
1. Constructor takes a RawArray* and allocates its own Array handle.
2. Release provides access to the entire handle, rather than just the raw.

This results in a very clean usage pattern, like:
  FooTable table(get_foo_table());
  table.Insert(obj);
  ...
  set_foo_table(table.Release());

Having the isolate inside HashTable also allows faster allocation of temporary handles.

R=iposva@google.com

Review URL: https://codereview.chromium.org//428273002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38794 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 19:50: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
asiva@google.com d63cc843b6 Fix invalid handle scope error when Dart_IsClosure is used.
dart/runtime/vm/handles_impl.h:98: error: expected: isolate->top_handle_scope() != NULL

R=srdjan@google.com

Review URL: https://codereview.chromium.org//416663003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38520 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 20:32:07 +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
koda@google.com aca839c54f Allocate fewer empty arrays.
Use VM isolate's canonical, untyped, empty array when possible.

Takes Dart2JS benchmark from ~9000 empty arrays to ~200.

R=asiva@google.com

Review URL: https://codereview.chromium.org//381483002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38435 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-21 16:41:05 +00:00