Commit Graph

2925 Commits

Author SHA1 Message Date
floitsch@google.com fb1632180e Add dart:collection_dev library.
Committed: https://code.google.com/p/dart/source/detail?r=17263
Reverted: https://code.google.com/p/dart/source/detail?r=17265

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17269 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 13:07:27 +00:00
floitsch@google.com 8d1020c6d2 Revert "Add dart:collection_dev library."
This reverts commit 17263.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17265 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 12:34:34 +00:00
floitsch@google.com ba73897a3e Add dart:collection_dev library.
Review URL: https://codereview.chromium.org//11959012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17263 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 12:26:09 +00:00
vegorov@google.com a77fc9701c When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
asiva@google.com fff63865e6 Add a new operator |= which does a simple assignment of the raw pointer into
a handle without any vtable settings. In debug mode there are the usual checks
to ensure that the vtable in the handle matches the expected vtable value
based on the dynamic type of the object.

It is useful in loopy code as follows:
  const Array& funcs = class.functions();
  Function func = Function::Handle();
  for (int i = 0; i < 100000000; i++) {
    func |= funcs.At(i);
  }
Review URL: https://codereview.chromium.org//11979003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17244 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:24:06 +00:00
srdjan@google.com 8451080044 Improve function lookup speed by working with raw objects only.
Review URL: https://codereview.chromium.org//11970043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17232 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 19:27:00 +00:00
hausner@google.com 79f4b5b61b Simplify exception handler table
Sort entries and drop the try_index field. This simplifies lookup
of exception handlers when walking the traces on exceptions.
Review URL: https://codereview.chromium.org//11970024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17179 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 01:10:42 +00:00
srdjan@google.com 37a715bbbf Lookup functions by name that contains the private key, except for dart_api which allows ignoring the private key.
Review URL: https://codereview.chromium.org//11968022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17178 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 00:42:03 +00:00
hausner@google.com cfb3b53aac Check whether exceptions are caught
The debugger can now determine whether an exemption will be caught or not.
Review URL: https://codereview.chromium.org//11946020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17167 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 22:16:09 +00:00
asiva@google.com c8284ad1bb Fix for 7941
- mark unused space in an object whose type has been transformed as
  Int8Array instead of Array. This ensure that GC does not traverse
  the contents of the unused space.
Review URL: https://codereview.chromium.org//11968020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17165 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 21:45:49 +00:00
hausner@google.com 245c0e2c3e Collect debugging info for catch clauses
Collect info about try-statement nesting, and a list of
handled types in each catch clause. This will be used by
the debugger to determine whether an exception is handled
by any handler on the stack.
Review URL: https://codereview.chromium.org//11883023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17100 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 22:43:00 +00:00
srdjan@google.com 9320b18911 Improve compilation speed on a pathological case > 2x (7 sec -> 2.7 sec) by improving local lookups.
Review URL: https://codereview.chromium.org//11893002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17085 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 19:08:55 +00:00
fschneider@google.com 75c4844bf5 Cleanup uses of X::CheckedHandle where X::Cast or X::Handle is sufficient.
The only places where CheckedHandle is appropiate is with arguments to
runtime functions and values from Dart API functions.

For other places in the VM either normal Handle and ^=, or Cast is sufficient.

T::Cast is used when the value is guaranteed to be of type T (and never Object::null()).
Otherwise, the operator^= is used for casting.

Also fix a style issue where a Raw* should be used as return type.
Review URL: https://codereview.chromium.org//11826024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17013 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-14 09:51:48 +00:00
asiva@google.com 62115b51fe Fix for issue 7757
- Iterate and collect all the inlined functions in an optimized dart frame
  into the stack frame when throwing an exception.
- Added a OptimizedDartFrameIterator class which iterates over all the inlined
  functions of a single optimized dart frame.
Review URL: https://codereview.chromium.org//11833025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17000 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-12 00:24:28 +00:00
iposva@google.com 51447e92ba - Start adding meta data for fields of VM internal classes.
- Correctly report instance size in bytes.
- At least report field sizes for variable sized objects.
Review URL: https://codereview.chromium.org//11880004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16996 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 23:05:57 +00:00
hausner@google.com 7e70aaddf7 Support for embedded Dart scripts
Add a line and column offset to scripts so that errors and exceptions
in embedded Dart scripts are reported at the proper location.
New API call Dart_LoadEmbeddedScript() that allows to specify
line and column offsets.

Stumbled on and fixed a bug. Script::kind field was not externalized to snapshot.
Review URL: https://codereview.chromium.org//11824067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16934 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 21:47:09 +00:00
srdjan@google.com 04fc29c7e1 Optimize function at its entry instead of at exit.
The code can be patched if it should not be executed any longer.
The code can be now patched at other location than at entry, the requirement is still that patching code does not overwrite an inlined object.
Intrinsic methods that do not have a fall through cannot be patched.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16897 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 00:28:57 +00:00
hausner@google.com e8a293c05a Allow optimized code when debugger is active
The debugger allows the VM to optimize code unless there is a breakpoint inside the
function. Whenever a new breakpoint is set (explicitly or implicitly by stepping)
all optimized code is discarded.
Review URL: https://codereview.chromium.org//11780005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16815 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 18:57:19 +00:00
iposva@google.com dbb7d249fb - Preallocate non-named ArgumentsDescriptors with a small amount of parameters.
Review URL: https://codereview.chromium.org//11773008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16734 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 18:36:39 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
regis@google.com 47e08870ca Support Null type in Class::TypeTest and simplify Instance::IsInstanceOf.
Review URL: https://codereview.chromium.org//11785006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16664 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-05 00:45:52 +00:00
asiva@google.com 4c069867e4 - Make Boolean 'true' and 'false' singleton VM isolate objects.
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +00:00
iposva@google.com e988dec7e7 - Mark huge methods are not-optimizable.
Review URL: https://codereview.chromium.org//11722006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16588 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 22:09:28 +00:00
asiva@google.com 7022b39e35 Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
hausner@google.com a2d682d1d8 Improve line info accuracy in debugging
Review URL: https://codereview.chromium.org//11696005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16550 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-28 18:51:58 +00:00
asiva@google.com 7ea520f10f Create read only handles for empty_array and sentinel objects
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
srdjan@google.com 5a698bba3d Use call counts to prevent cold calls from being inlined.
Review URL: https://codereview.chromium.org//11541002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16269 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 18:15:41 +00:00
vegorov@google.com 9fc1b54794 Store optimized flow graph statistics on the function itself.
This gives a good estimate for an early bailout from the inlining attempt.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16212 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-17 15:22:16 +00:00
regis@google.com 849585ef7c Implement Function.apply in vm (issue 5670).
Fix a closure parameter count check bug (unveiled by an apply test).
Review URL: https://codereview.chromium.org//11564029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16175 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 19:04:01 +00:00
fschneider@google.com 9e77dd7986 Store canonical type argments in a hash table instead of linear list.
The code closely follows the symbol table implementation, but adjusted 
for use with TypeArguments objects.
Review URL: https://codereview.chromium.org//11474056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16117 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 15:24:32 +00:00
regis@google.com c195fc9e92 Fix type test for callable objects (issue 7338).
Review URL: https://codereview.chromium.org//11549027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16069 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 22:33:15 +00:00
asiva@google.com 6749a3be79 Add read only handles for the following predefined symbols
"=="
 "[]"
 "[]="
 "this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +00:00
asiva@google.com 6eec2410ec Restructure Add and SetAt to not create a Handle.
Review URL: https://codereview.chromium.org//11443024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15926 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 19:28:14 +00:00
kmillikin@google.com c4726371fc Fix compilation on Windows.
Visual Studio reports that only static integral constants are allowed to be
initialized in the class.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15890 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 10:03:35 +00:00
kmillikin@google.com a119414b2f Cache lookups at megamorphic call sites in optimized code.
The function name and argument descriptor are mapped to a lookup cache
at compile time.  The cache maps class id to target function.  It is
resizable.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15889 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 09:48:52 +00:00
iposva@google.com 19a89a947e - Do not read past the end of the utf32_array.
Review URL: https://codereview.chromium.org//11447009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15847 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 17:18:22 +00:00
srdjan@google.com 93dd217564 Added Uint8ClampedList. COmpielr optimziations to follow in next CL.
Review URL: https://codereview.chromium.org//11437028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15806 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:53:51 +00:00
fschneider@google.com 63f6bbee77 Save a handle allocation in two accessor functions of class Type.
The ASSERT already makes sure, that we have the correct type at hand.
Review URL: https://codereview.chromium.org//11444008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15775 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 09:32:49 +00:00
asiva@google.com 4d26d87a3a Issue - 7123
Rename
 String::New(const uint8_t latin1_array......) to String::FromLatin1
 String::New(const uint16_t utf16_array......) to String::FromUTF16
 String::New(const int32_t utf32_array.......) to String::FromUTF32
Review URL: https://codereview.chromium.org//11443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15763 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 23:37:37 +00:00
kmillikin@google.com 8c4e214722 Pass IC data and arguments descriptor to IC miss runtime functions.
Before, we obtained them by pattern matching backwards on the machine
instructions at the call site.  This previous approach becomes unwieldy when
we need to use to use multiple instance call patterns.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15737 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 15:35:18 +00:00
asiva@google.com 02049c689e Fix for issue 7089 (Symbols::New was not quite working correctly
when there are non ASCII Latin-1 characters in the string).
Review URL: https://codereview.chromium.org//11411341

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15711 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 22:18:12 +00:00
srdjan@google.com e3863daaba Improve C++ code for string splittig (Dromaeo benchmark).
Review URL: https://codereview.chromium.org//11308337

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15710 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 21:52:02 +00:00
asiva@google.com 76def187f8 Fix bug in Utf8::CodePointCount which was causing some strings with latin1
characters to be stored as TwoByteStrings.
Review URL: https://codereview.chromium.org//11419259

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15604 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 21:53:58 +00:00
cshapiro@google.com 39ee2fdfeb Move various top-level Unicode definitions into classes and methods.
Review URL: https://codereview.chromium.org//11414249

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15568 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 03:33:37 +00:00
cshapiro@google.com 392ca92d2d Use the code point iterator when computing 16-bit string hash codes.
Review URL: https://codereview.chromium.org//11412258

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15565 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 02:36:19 +00:00
regis@google.com 91ad9a0180 Remove support for interfaces.
For now, disable tests using obsolete syntax.
Tests disabled in this cl and in previous ones removing default factory classes
will either be deleted or updated in a later cl.
Review URL: https://codereview.chromium.org//11411271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15562 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 01:26:31 +00:00
asiva@google.com a76bd61fcb When externalizing a string ensure that the basic tag bits are preserved.
Also make sure we do not try to externalize read only strings that are in
the VM isolate.
Review URL: https://codereview.chromium.org//11411204

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15553 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 23:19:17 +00:00
srdjan@google.com bf3bac3884 Implement faster splitting with empty string as pattern. Add special native for computing substring of OneByteString (preparation for instrinsic).
Review URL: https://codereview.chromium.org//11416270

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15548 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:55:09 +00:00
asiva@google.com b7673910ab Fix for issue 6359 - Make snapshots platform independent.
The issue previously was that an instance size was stored a
size in bytes, similarly field offsets were stored as an offset
in bytes. This caused issues when generating the snapshot on
one platform and reading it on another platform.
The VM has been changed to store the instance size as a size in
words and the field offset as an offset in words.
Review URL: https://codereview.chromium.org//11421117

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15538 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 19:28:22 +00:00
vegorov@google.com 132bdc6bfb Support VTune's JIT interface.
R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15517 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 13:54:06 +00:00