asiva@google.com
2d3775a1b1
Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions:
...
Change 6302 description:
- Wire the stack frame iterator to use stack maps for traversing objects if
there are stack maps in the code object. If there are no stack maps it still
does the old style stack frame traversal between fp and sp looking for tagged
pointers.
- Added a mechanism to be able to iterate over the code space and look for a
particular object.
Review URL: https://chromiumcodereview.appspot.com//10030001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6331 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:20:23 +00:00
asiva@google.com
c79da818cc
Revert change 6302 until the compiler warning is addressed.
...
Review URL: https://chromiumcodereview.appspot.com//10025003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6304 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 02:04:28 +00:00
asiva@google.com
c27cec5b6e
- Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in the code object. If there are no stack maps it still does the old style stack frame traversal between fp and sp looking for tagged pointers.
...
- Added a mechanism to be able to iterate over the code space and look for a particular object.
- Remove registration of code objects into the code index table.
Review URL: https://chromiumcodereview.appspot.com//9791048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6302 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:44:48 +00:00
srdjan@google.com
1125846660
When checking against non-parametrized types use a cache to hold result tuples (class, result). That cache is stored in the instruction stream. Currently implemented for instanceof, ia32 only. Should migrate to other type tests and architectures.
...
70x improvement on a benchmark (similar to what is seen in html _unwrap).
Review URL: https://chromiumcodereview.appspot.com//10010029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6281 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-06 16:05:55 +00:00
regis@google.com
5282e44fb2
Use null type argument vector instead of vector of Dynamic for a generic raw
...
type when possible.
Fix type finalization of type parameters (always finalize in the context of the
class being parameterized and not in the enclosing class where the type
parameter is used).
Fix wrong generic optimization and added a test (a generic type instantiated
from a raw instantiator is not always raw).
Added printing of type argument vectors.
Review URL: https://chromiumcodereview.appspot.com//9939003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6068 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 22:16:52 +00:00
asiva@google.com
e360e4d1c9
Second set of changes for implementation of stack map support.
...
- Added functionality to be able to build stack maps in the compiler and register them into the Code object during Code finalization.
- Merged code_generator_ia32_test.cc and code_generator_x64_test.cc into code_generator_test.cc as the two files were identical.
Review URL: https://chromiumcodereview.appspot.com//9721006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5764 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 01:27:35 +00:00
srdjan@google.com
0832db6261
Fix 2172: report 'int' instead of Smi, Mint and Bigint when throwing TypeError.
...
Review URL: https://chromiumcodereview.appspot.com//9705041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5525 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-15 15:54:59 +00:00
hausner@google.com
cd6e29a898
Deoptimize functions before setting breakpoints
...
Does not yet handle cases where the functions have active frames
on the stack.
Review URL: https://chromiumcodereview.appspot.com//9696020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5436 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 20:37:49 +00:00
regis@google.com
d74c2008be
Fix type check to perform a subtype test at top level instead of an
...
assignability test. This only makes a difference when assigning an instance of
a function type.
Fix a bad language test.
Disable a bad co19 test (issue 99 filed).
Change error message for dynamic type error.
Review URL: https://chromiumcodereview.appspot.com//9664029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5413 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 16:16:12 +00:00
turnidge@google.com
ff26341fd6
Heartbeat implementation of dart:mirrors.
...
Add the skeleton for the dart:mirrors library in all the appropriate
places. The only thing we can do right now is ask an Isolate for its
debugName. Add a few tests.
Review URL: https://chromiumcodereview.appspot.com//9420038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5370 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-12 23:51:03 +00:00
regis@google.com
f4ddc43cdf
Generate dynamic type errors according to spec.
...
Fix a few bad tests.
Turn a couple negative tests in multi-tests.
Triage a few co19 failing tests.
Still to do:
Check bounds of generic types at runtime in checked mode.
Stop reporting bounds error in new operator as a compile time error.
Review URL: https://chromiumcodereview.appspot.com//9615035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5064 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 02:23:12 +00:00
asiva@google.com
4f7f9021c5
- Always write a Null Object for Code objects
...
- Do not populate the FunctionsCache array as it causes the function cache
to become inconsistent if we execute some dart code before capturing a
snapshot.
- Allow preallocation of objects even when generating snapshot and remove the
flag preallocate_objects_called_ (use a null test instead).
Review URL: https://chromiumcodereview.appspot.com//9580036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4915 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 01:53:26 +00:00
srdjan@google.com
17537cf230
Fix crash in inline cache: forgot to GC properly RawICData. Various cleanups.
...
Review URL: https://chromiumcodereview.appspot.com//9567023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4832 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 22:02:41 +00:00
srdjan@google.com
f6dfa63c9a
Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code object that belongs to that function. That is not the case, there can be several Code object generated for the same function. "Renamed" "code()" to "CurrentCode()", use unoptimized_code where it is clear that we are using unoptimized code only. If compiled, there is a 1:1 correspondence between function and unoptimized code.
...
Review URL: https://chromiumcodereview.appspot.com//9475031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4656 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 01:31:44 +00:00
hausner@google.com
6d9abc5e3b
StepOver, StepInto, StepOut
...
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00:28 +00:00
srdjan@google.com
a343a49338
Do not count invocations but usage of a function, i.e., increment a function's counter at IC calls and at return operations in unoptimized code. (TODO: increment count at static calls as well). There is no checking at method entry any more. The function counter reporting is not measuring the invocation count but much more how much time we spend in a method. Removed counter at backward branches.
...
Renamed flags to:
--optimization_counter_threshold (default 2000)
--report_usage_count
Review URL: https://chromiumcodereview.appspot.com//9460015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4583 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-25 00:33:25 +00:00
srdjan@google.com
1eaef108b9
Move CodeGenerator::DescriptorList into shared part.
...
Review URL: https://chromiumcodereview.appspot.com//9465028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4582 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-24 23:27:24 +00:00
srdjan@google.com
e6d87ec63f
When tracing type checks in runtime, also print the method where the type check occured.
...
Review URL: https://chromiumcodereview.appspot.com//9447028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4551 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 20:03:02 +00:00
srdjan@google.com
a54f33bf92
ICData is now a wrapper object that refers to the calling function, target name, ic data array, etc. The old ICData C++ class that wrapped around an Array is removed. The advantage is that the ICData object remains the same, only its ic_data array object is being modified as classes are added..
...
TODO: store ICData-s into function so that the type feedback can be easily extracted (currently must traverse the unoptimized code).
Review URL: https://chromiumcodereview.appspot.com//9395016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4417 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 00:40:03 +00:00
turnidge@google.com
0ddd4c04e9
Dart_PropagateError, take 2.
...
This change hopefully takes care of the non-mac build issues. The
checked mode failures are fixed in a separate cl.
Review URL: https://chromiumcodereview.appspot.com//9316071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3863 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 19:05:06 +00:00
turnidge@google.com
ae88492093
Revert Dart_PropagateError until I can track down the problems in
...
checked mode tests.
Sorry for the hubbub.
Review URL: https://chromiumcodereview.appspot.com//9314053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3823 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 23:39:28 +00:00
turnidge@google.com
9da62c5fea
Add Dart_PropagateError.
...
This function can be used in native functions to properly pass all
errors up the stack.
Set the long jump base in the Compiler instead of outside of the
compiler. A bunch of errors that used to be propagated through the
sticky_error are now propagated through return values. This includes
all of the DartEntry and DartLibraryCall functions.
In particular, we no longer use the long jump to cross dart frames.
Instead errors are propagated across dart frames using the same
mechanism that we use for unhandled exceptions. I've added assertions
to make sure that we only use the long jump when it is "safe".
Review URL: https://chromiumcodereview.appspot.com//9169102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3815 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 22:34:16 +00:00
iposva@google.com
9e8666ce55
- Avoid running into an unimplemented and add more debugging help.
...
Review URL: https://chromiumcodereview.appspot.com//9212059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3565 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 20:24:12 +00:00
turnidge@google.com
8920623dc5
OOB messages and general message refactor.
...
(1)
No longer give embedders direct access to inter-isolate messages.
Instead, keep these messages in an internal queue and rely on the
embedder only to provide notifications. This simplifies the api in
numerous ways:
- post message callback drops parameters and becomes message notify callback.
- close port callback goes away
- Dart_Message type goes away
- Dart_HandleMessage gets a simpler signature
Updated the custom_isolate_test to show what use of the new apis looks like.
(2)
Begin to add support for out-of-band (OOB) messages. These messages
supercede regular messages in the queue. We will attempt to deliver
these messages even while code is running, by using the isolate
interrupt mechanism. These messages are not user-visible. They will
be used by the runtime internally to implement things like reflection.
Renamed PortMessage to Message.
Refactored message sending apis in PortMap and Isolate.
Modified MessageQueue to be aware of multiple priorities.
Modify Dart_HandleMessage to process multiple OOB messages
Review URL: https://chromiumcodereview.appspot.com//9182001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3562 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 19:31:01 +00:00
hausner@google.com
3d3ed3720e
Fix issues 968 and 998
...
968: don't crash if no class name given after 'default'
998: eliminate code generator diagnostic output on stdout
Review URL: http://codereview.chromium.org//9072012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2930 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 01:12:04 +00:00
turnidge@google.com
0b833d4977
Add support for interrupting an isolate in the vm. Interrupts are
...
implemented by extending the existing support for stack overflow
checking in the vm. When an interrupt is scheduled for an isolate, we
overwrite the isolate's stack limit with a value guaranteed to cause a
stack overflow.
We support multiple kinds of interrupts, encoded in the low bits of
the stack limit.
Add Dart_InterruptIsolate and Dart_InterruptIsolateCallback to the
dart embedding api to allow the embedder to request and handle
interrupts.
Add EXPECT_SUBSTRING(needle, haystack) testing macro.
Review URL: http://codereview.chromium.org//8851008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2529 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 18:41:20 +00:00
srdjan@google.com
7b61cef42b
Implement two-arguments-check inline cache. Use it first for Smi binary operations.
...
Review URL: http://codereview.chromium.org//8827015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2345 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 17:24:47 +00:00
regis@google.com
dd32effb72
Adjust index of type parameters at finalization time (fix issue 718).
...
Add test.
Review URL: http://codereview.chromium.org//8872037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2286 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:00:55 +00:00
regis@google.com
ec7f6331d1
Add 64-bit stubs to call into the runtime and to call native functions.
...
Fix 64-bit assembler bugs.
Review URL: http://codereview.chromium.org//8818001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2206 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 00:03:08 +00:00
turnidge@google.com
36a830115b
Use a preallocated StackOverflowException rather than allocating one
...
while our stack is hurting. This allows us to get rid of the stack
tweaking which we do in this case.
Review URL: http://codereview.chromium.org//8823001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2149 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 23:01:46 +00:00
srdjan@google.com
f98993384f
Canonicalize TypeArguments.
...
Review URL: http://codereview.chromium.org//8773026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2133 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 17:47:47 +00:00
hausner@google.com
b122f27eac
Debugger step 2
...
Add ActivationFrame and StackTrace classes.
Add Breakpoint info: url and line number.
Fix breakpoint stub so breakpoints don't get patched over by PatchStaticCall
Review URL: http://codereview.chromium.org//8775060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2089 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:11:39 +00:00
srdjan@google.com
d07087ce77
Ongoing renaming of type classes:
...
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8776020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2002 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:19:59 +00:00
srdjan@google.com
17552e9a3c
Renaming type classes as discussed:
...
Type -> AbstractType
ParameterizedType -> Type
TODO:
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8761011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1987 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 16:54:52 +00:00
srdjan@google.com
0063555050
Use ParametrizedType instead of Type where appropriate. Expand ToCString of type related classes. Do not instantiate abtract classes Type and TypeArguments (e.g., through Type::null());
...
Review URL: http://codereview.chromium.org//8742028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1941 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:14:22 +00:00
hausner@google.com
b7cf1328a1
Very first steps for a debugger
...
- Introduce Debugger class.
- Each isolate has a debugger object.
- Introduce stubs that can be put in place of static or dynamic
Dart function calls.
- Very rudimentary command line option to place a breakpoint
at the beginning of a function.
Review URL: http://codereview.chromium.org//8687037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1928 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 17:04:45 +00:00
regis@google.com
42ac60faf3
null is an instance of Dynamic (fix issue 443).
...
Review URL: http://codereview.chromium.org//8592004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1715 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 19:35:53 +00:00
srdjan@google.com
abbe12ab38
Print uninstantiated type with --trace_type_checks for instanceof (easier to identify what caused calls to runtime).
...
Review URL: http://codereview.chromium.org//8598023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1676 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 22:49:52 +00:00
srdjan@google.com
7397762688
Better tracing of deoptimization (added a reason id and printing of source). Fix a bug with excessive deoptimization for null receiver -- caused by (null).toString().
...
Review URL: http://codereview.chromium.org//8588002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1593 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:38:05 +00:00
srdjan@google.com
92f177896b
Fix throwing ObjectNotClosure instead of null exception if closure is null.
...
Fix integer compareTo if other is a double NaN.
Fix Expect.stringEqual to accept null as arguments.
Update co19 status file.
Review URL: http://codereview.chromium.org//8528050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1539 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 18:02:12 +00:00
asiva@google.com
5cf3ad018a
Changes to pass the current isolate to all runtime and native calls.
...
Review URL: http://codereview.chromium.org//8528010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1499 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 05:55:22 +00:00
regis@google.com
8b9ebb3528
Second attempt at finalizing all classes in the VM (fix issue 364).
...
Review URL: http://codereview.chromium.org//8491055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1475 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 21:38:49 +00:00
srdjan@google.com
af451865ed
For instanceof inline check against right hand class id possible and interface String for OneByteString (positive checks only). Improves frog runtime by about 20%. Future work will be based on collecting types and using that data in optimized code. Add tracing of instance of type checks.
...
Review URL: http://codereview.chromium.org//8508035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1408 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 17:28:11 +00:00
hausner@google.com
f59e679860
Capturing for loop variables correctly
...
Re-introduce a "fresh copy" of the for loop variable(s) in each iteration. Adding a minimal test to check that closures capture the value of the particular loop iteration.
Review URL: http://codereview.chromium.org//8490019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1273 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 22:36:28 +00:00
srdjan@google.com
1d4dffcaf2
Emit node id at every call to runtime.
...
Review URL: http://codereview.chromium.org//8475013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1226 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 22:51:19 +00:00
srdjan@google.com
002bb47821
Special code for equality comparison for Smi, allowing null on left or right without calling deoptimization. The full solution is to implement two arguments type feedback collection (maybe also collect null classes for
...
equality comparison?)
Review URL: http://codereview.chromium.org//8413047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@923 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 22:25:05 +00:00
asiva@google.com
b245c234f0
Report NullPointerException when we try to construct a regular expression
...
using a NULL pointer.
Report NullPointerException instead of ObjectNotClosureException when the
closure object is Null.
Review URL: http://codereview.chromium.org//8363034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@901 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 17:32:29 +00:00
srdjan@google.com
8966841501
bool != int (Windows has the best C compiler).
...
Review URL: http://codereview.chromium.org//8400030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@845 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 18:06:17 +00:00
srdjan@google.com
e3d3c552bb
Fix excessive reoptimization (guard test lost somehow). Fixes problems in Dart.
...
Review URL: http://codereview.chromium.org//8412004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@844 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 17:43:04 +00:00
regis@google.com
ee7aca7f5b
Fix type tests involving an implicit closure of a non-parameterized class
...
extending a parameterized class.
Add corresponding test.
Disable new test for dartc (filed new issue 5516001).
Review URL: http://codereview.chromium.org//8393033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@771 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-26 19:03:29 +00:00