asiva@google.com
453e8fe924
Add the native intrinsic TypedData_setRange to optimize the setRange call when the destination and source of setRange are of the same typeddata type.
...
Review URL: https://codereview.chromium.org//12881006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20078 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 13:33:11 +00:00
fschneider@google.com
924e321c35
Optimize TypedData in the same way as ScalarList.
...
Review URL: https://codereview.chromium.org//12775009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20002 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 10:39:20 +00:00
asiva@google.com
6b8987e55b
Add a command line option to generate source code for a script
...
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00
asiva@google.com
69d0484d2a
- Use dart:typedata types in the Dart API calls.
...
- Change the dart/io code to not use dart:scalarlist
Review URL: https://codereview.chromium.org//12730013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19848 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 10:57:48 +00:00
asiva@google.com
3b5c3e69dd
Add the allocator intrinsics for dart:typeddata implementation.
...
Review URL: https://codereview.chromium.org//12547018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19752 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 00:05:57 +00:00
lrn@google.com
a5a93492d9
Change VM's string-buffer patch to use a Uin16Array as backing buffer.
...
Review URL: https://codereview.chromium.org//12421002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19679 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:21:52 +00:00
asiva@google.com
3f14a14ee7
Implement 'dart:typeddata' directly in the VM instead of using 'dart:scalarlist'
...
Review URL: https://codereview.chromium.org//12544015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19656 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 21:50:33 +00:00
regis@google.com
f644ba9791
Complete implementation of bounds checking in the vm, by introducing a vm object
...
BoundedType that represents a type that could not be checked against an upper
bound at compile time. A BoundedType is verified at run time when used,
typically when it (and/or its bound) gets instantiated.
This fixes issues 7075 and 7625.
Added one test.
Review URL: https://codereview.chromium.org//12473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19519 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 22:04:23 +00:00
asiva@google.com
97f6dee777
First step towards implementing dart:typeddata library.
...
Review URL: https://codereview.chromium.org//12313088
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19427 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:11:45 +00:00
asiva@google.com
48418a75f7
Fix stack frame index numbers for full stack traces
...
It used to be:
#0 getCurrentStackTrace (file:///tmp/junk.dart:3:5)
#0 func1 (file:///tmp/junk.dart:10:29)
#1 func2 (file:///tmp/junk.dart:14:8)
#2 func3 (file:///tmp/junk.dart:18:8)
#3 func4 (file:///tmp/junk.dart:22:8)
#4 main (file:///tmp/junk.dart:26:8)
(Notice the two #0 frames on top).
Now it will print this as:
#0 getCurrentStackTrace (file:///tmp/junk.dart:3:5)
#1 func1 (file:///tmp/junk.dart:10:29)
#2 func2 (file:///tmp/junk.dart:14:8)
#3 func3 (file:///tmp/junk.dart:18:8)
#4 func4 (file:///tmp/junk.dart:22:8)
#5 main (file:///tmp/junk.dart:26:8)
Review URL: https://codereview.chromium.org//12381030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19272 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 03:00:52 +00:00
asiva@google.com
3c90369ba6
Add functionality to get full stack trace when exceptions are thrown.
...
This should address the issue raised in 7813.
try {
...
...
} on Object catch(e, s) {
print(s.fullStackTrace); // This should print the full stack trace.
}
Review URL: https://codereview.chromium.org//12316116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19179 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 22:47:06 +00:00
regis@google.com
3b374ead4b
Compile and simulate first dart function on arm generated from ast.
...
Review URL: https://codereview.chromium.org//12335102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19152 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 17:13:51 +00:00
regis@google.com
7c4eec75ed
Fix bad optimization prematurely marking types as instantiated (issue 8710).
...
Add test.
Review URL: https://codereview.chromium.org//12314132
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19101 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 00:32:31 +00:00
asiva@google.com
614b946f8a
Resubmit change 19074.
...
Review URL: https://codereview.chromium.org//12335111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19096 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 23:24:24 +00:00
asiva@google.com
487e5fa10a
Revert change 19074 until the windows build is fixed.
...
Review URL: https://codereview.chromium.org//12335107
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19084 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 21:41:29 +00:00
asiva@google.com
fcd78010e7
Fix for bug 6767 - Limit stack trace collection for stack overflow exceptions.
...
Use pre allocated stack object for collecting strack trace in the case of OOM
and stack overflow exceptions.
Review URL: https://codereview.chromium.org//12320103
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19074 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 19:07:40 +00:00
iposva@google.com
b564104ea5
- Properly load the core libraries as libraries and not as scripts.
...
This will honor their imports and library names.
Review URL: https://codereview.chromium.org//12321082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19017 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:25:29 +00:00
johnmccutchan@google.com
2e216391f3
Simd128Float32, Simd128Mask, and Simd128Float32List additions for dart:scalarlist
...
Review URL: https://codereview.chromium.org//12303013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19001 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 21:12:50 +00:00
asiva@google.com
97ef3c86d3
Move json, uri, utf and crypto libraries into the VM.
...
This should ensure that we would not need a patch per embedder for these libraries in case somebody decides to patch these.
Review URL: https://codereview.chromium.org//12318031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18865 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 01:24:57 +00:00
iposva@google.com
c900112af7
- Improve the message for NoSuchMethodErrors that are
...
determined statically at compile time.
Review URL: https://codereview.chromium.org//12328019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18848 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 18:53:27 +00:00
regis@google.com
8d24d2b98a
Implement ARM disassembler.
...
Implement ARM call patcher.
Review URL: https://codereview.chromium.org//12301042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18769 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 17:28:35 +00:00
regis@google.com
8c44be4313
Add support for object pool that will be used on ARM and MIPS architectures.
...
Modify code patching infrastructure to accept code object, which is necessary to
get to the object pool containing patchable target addresses.
Modify assembler test infrastructure to provide associated code object.
Review URL: https://codereview.chromium.org//12260026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18604 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 23:55:31 +00:00
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