hausner@google.com
b4527a7465
First stab at mixins in VM compiler
...
Things not yet supported:
- Type parameters for super class and mixin class
- super call limitation check
Review URL: https://codereview.chromium.org//12210127
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18479 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:08:15 +00:00
asiva@google.com
a7b617c5d4
Provide implementations for
...
Dart_ScalarListAcquireData & Dart_ScalarListReleaseData
Review URL: https://codereview.chromium.org//12209075
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18330 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 19:48:32 +00:00
iposva@google.com
d421507d55
- Remove redundant type parameters for internal data.
...
Review URL: https://codereview.chromium.org//12218082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18287 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 23:27:50 +00:00
hausner@google.com
e56a1fc324
Remember owner class of patch code
...
This is a step towards using PatchClass for mixins
Review URL: https://codereview.chromium.org//12213020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18155 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 20:19:32 +00:00
regis@google.com
ca927278dc
Resubmit reverted r17962, but, for now, only report error about unfinalized
...
types if flag --error_on_malformed_type is specified.
Fix one more case of unfinalized signature type.
Review URL: https://codereview.chromium.org//12183014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18033 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 05:51:02 +00:00
asiva@google.com
20f821b4cb
Instead of setting up the can intrinsify state lazily setup eagerly
...
in Object::Init() so that the snapshot will carry it and when
running from a snapshot Intrinsifier::CanIntrinsify can be just a bit check.
Review URL: https://codereview.chromium.org//12096105
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17995 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 19:16:34 +00:00
antonm@google.com
5a9cc92093
Revert changes 17962-3 which break Dartium Debug build.
...
TBR=ricow@google.com
Review URL: https://codereview.chromium.org//12079117
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17977 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 12:45:42 +00:00
regis@google.com
650ae359a4
Fix class patching involving type parameters: type parameters of patched classes
...
were not finalized.
Simplify and fix function type alias finalization (remove dummy alias owner).
Make sure no unfinalized types or unresolved classes are written to a snapshot.
Verify that all pending classes are finalized before writing a snapshot.
Make snapshot_test more resilient to finalization errors.
Add missing import to snapshot_test.dart.
Fix typo in growable_array.dart.
Review URL: https://codereview.chromium.org//12123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17962 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 02:40:16 +00:00
asiva@google.com
c2cafbbe33
- Change the layout of external typed array objects to avoid the extra indirection when accessing elements in the array.
...
- Change the Dart API which create these external arrays to account for this change
Review URL: https://codereview.chromium.org//12093071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17937 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 18:53:21 +00:00
asiva@google.com
5f1413d8fc
Make Type, TypeParameter, TypeArguments and InstantiatedTypeArguments final heap objects.
...
Review URL: https://codereview.chromium.org//12086031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17739 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 00:53:22 +00:00
asiva@google.com
47fc558329
Adapt operator= and operator^= of Smi to be similar to other internal VM classes.
...
Review URL: https://codereview.chromium.org//12035087
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17618 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 23:47:02 +00:00
asiva@google.com
f4fe42c280
Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
...
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
srdjan@google.com
f2d02edd3f
Hide private corelib's method from stack trace in exceptions.
...
Review URL: https://codereview.chromium.org//12025038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17489 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 19:52:26 +00:00
asiva@google.com
4c796304dd
Move verification of builtin_vtables into Dart::InitializeIsolate.
...
This ensures that we don't ASSERT on every handle assignment
(not an issue with release builds but should help the debug builds some).
Review URL: https://codereview.chromium.org//11867015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17438 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 06:13:18 +00:00
asiva@google.com
8579ac9bb5
Allow externalization of canonical strings also. Only restrict canonical strings
...
in the VM isolate heap.
Review URL: https://codereview.chromium.org//11969029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17437 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 05:57:29 +00:00
fschneider@google.com
3e94e4a2fa
Fix bug in optimization in the presence of externalized strings.
...
The class-id of string objects can be changed via the Dart API. The optimizer
has to disable hoisting class-id checks across calls. For now, loop-invariant
code motion is disabled for checks of string class-ids.
Review URL: https://codereview.chromium.org//11867020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17288 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 16:29:02 +00:00
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
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
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
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
asiva@google.com
92dee42dcc
Do not emit pointer information for embedded singleton VM Isolate objects while generating code. These embedded objects do not need to be visited during GC.
...
Review URL: https://codereview.chromium.org//11722026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16645 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 18:38:00 +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
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
srdjan@google.com
76fe027314
Windows complains:
...
'dart::RawUint8Array' : base classes cannot contain zero-sized arrays
Replicate code for now instead of subclassing.
Review URL: https://codereview.chromium.org//11464011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15814 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 22:30:08 +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
hausner@google.com
5e47a858f3
Set BP in closurized function if necessary
...
If a function has been closurized, and both the regular function as well as
the closurized function are already compiled when the user sets a breakpoint,
then two code breakpoints have to be installed.
Fixed issue 2318.
Review URL: https://codereview.chromium.org//11446020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15764 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 00:09:36 +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
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