Commit Graph

58 Commits

Author SHA1 Message Date
fschneider@google.com 90bb8f61bc Fix a crash bug when creating a stack trace from an optimized frame.
In some cases of NoSuchMethodError creating a stack trace with optimized
code did result in an assertion failure.

We don't have deoptimization info at all potentially throwing calls
in optimized code: Namely in the prologue that copies parameters.

BUG=dart:8200
TEST=tests run with --optimization-threshold=5
Review URL: https://codereview.chromium.org//12079071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17843 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 14:06:26 +00:00
fschneider@google.com dfda7854a8 Fix source position for stack traces with optimized top function.
Fix decoding of the deoptimization info when constructing a stack trace.

Fix stack trace for checked mode exceptions from optimized code.

BUG=dart:8058
TEST=runtime/tests/vm/dart/optimized_stacktrace_test.dart,
     tests/language/stack_overflow_stacktrace_test.dart
Review URL: https://codereview.chromium.org//12049039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17755 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 12:38:27 +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
srdjan@google.com d1c4735609 Transition ^= to |=
Review URL: https://codereview.chromium.org//11867022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17309 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:53:17 +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
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 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
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
asiva@google.com 8af296c9c8 Cleanup the exceptions create code to use Arrays instead GrowableArrays so
that it is consistent with the DartEntry invoke code that it calls finally.
Review URL: https://codereview.chromium.org//11639007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16295 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 23:47:35 +00:00
tball@google.com 3282ae3f72 Second version of support for specifying an unhandled exception callback
in Dart.  Isolate.spawnFunction optionally takes a callback parameter,
which is not resolved until an unhandled exception occurs.  If a callback
wasn't specified, the VM will then call an "_unhandledExceptionCallback"
function if it is defined in the isolate's source file. If no callback
is provided, the error is logged as the isolate is closed.
Review URL: https://codereview.chromium.org//11558034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16186 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 00:20:07 +00:00
iposva@google.com d66477ee50 - Remove duplicate declaration of flag.
Review URL: https://codereview.chromium.org//11548048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16083 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 00:39:12 +00:00
cshapiro@google.com a7675e8dd3 Provide a mechanism for dumping of heap profiles on predefined events.
Review URL: https://codereview.chromium.org//11478012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15940 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 00:50:31 +00:00
asiva@google.com 1a76ed33c4 Return an unhandled exception error on an OOM or other errors while
reading a message. This ensures that we never call FindExceptionHelper
with no dart invocation frames.
Review URL: https://codereview.chromium.org//11475012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15833 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 01:41:53 +00:00
tball@google.com bf5f0db5d0 Added support for isolate unhandled exceptions.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15352 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 23:31:47 +00:00
lrn@google.com 22309b260c Remove NullPointerException.
Accessing non-existing members on null now throws NoSuchMethodError.
Throwing a null value fails by throwing a NullThrownError.
Methods checking for null now generally throw new ArgumentError(null).

Committed: https://code.google.com/p/dart/source/detail?r=15061

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15136 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 09:21:52 +00:00
lrn@google.com 0c8dce77f1 Revert "Remove NullPointerException."
Crashes in the x64 VM.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15065 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 09:59:59 +00:00
lrn@google.com e211c2f0ee Remove NullPointerException.
Accessing non-existing members on null now throws NoSuchMethodError.
Throwing a null value fails by throwing a NullThrownError.
Methods checking for null now generally throw new ArgumentError(null).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15061 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 08:51:49 +00:00
asiva@google.com 4027860e52 Throw illegal argument exception when
- objects which extend NativeWrapper are passed in isolate messages
- closure objects are passed in isolate messages
(issues 6108, 6312)
Review URL: https://codereview.chromium.org//11293163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14926 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 23:14:41 +00:00
lrn@google.com 7e6ae8ea09 Renaming IndexOutOfRangeException to RangeError.
It now extends ArgumentError.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14405 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 13:46:30 +00:00
regis@google.com ec09038e82 Remove references to ObjectNotClosureException and ClosureArgumentMismatchException
from the VM (issue 6124).
These are replaced with NoSuchMethodError for now (work in progress).
Review URL: https://codereview.chromium.org//11312019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14362 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 18:13:12 +00:00
lrn@google.com bc7f07ae86 Move ObjectNotClosureException and ClosureArgumentMismatchException to patch file.
They are no longer available in the core library, and are only used by the VM.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13992 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 06:17:21 +00:00
lrn@google.com aa78cf0c87 Remove unused WrongArgumentCountException.
Review URL: https://codereview.chromium.org//11236020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13863 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 11:52:48 +00:00
lrn@google.com e0527ef304 Change StackOverflowException to be an Error.
Also change OutOfMemoryError to actually extend Error.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13857 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 09:51:14 +00:00
lrn@google.com 89f5daea9e Rename OutOfMemoryException to OutOfMemoryError.
This is a reapply with missing status file changes.

TBR=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13822 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-19 14:01:24 +00:00
kasperl@google.com f7a56d3f70 Revert "Rename OutOfMemoryException to OutOfMemoryError."
This reverts r13818.

TBR'ed.

R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13820 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-19 13:11:15 +00:00
lrn@google.com 58f3453267 Rename OutOfMemoryException to OutOfMemoryError.
Also move ExceptionImplementation to core.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13818 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-19 12:20:52 +00:00
asiva@google.com 517ff06459 Instead of aborting with an assert, exit with an error when we get an OOM
while handling messages. This is a temporary solution until we have the
isolate error handling mechanism in place (for issue 1403).
Review URL: https://codereview.chromium.org//10915295

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13433 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 19:49:11 +00:00
lrn@google.com 6f2cf94aa8 Rename CastException to CastError.
Review URL: https://codereview.chromium.org//10977078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13009 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 12:13:58 +00:00
lrn@google.com a1faa6f135 Change IllegalArgumentException to ArgumentError.
Review URL: https://codereview.chromium.org//10989013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +00:00
lrn@google.com f52c24b62f Rename NoSuchMethodException to NoSuchMethodError.
Moved NoSuchMethodError to errors.dart.
No changes in co19 tests, but test status updated.

Review URL: https://chromiumcodereview.appspot.com//10909166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12172 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 09:52:25 +00:00
cshapiro@google.com da14bf70a7 Add attributions so printf like functions can have their arguments checked.
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.

Review URL: https://chromiumcodereview.appspot.com//10869063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
ajohnsen@google.com 3a6daefd99 Expose remaining 'errors' in an unified dart:core.
This is a follow-up on my previous move of AssertionError.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10896007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11513 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 11:57:37 +00:00
iposva@google.com 99d563982c - Support for patching of class methods and fields.
Review URL: https://chromiumcodereview.appspot.com//10827288

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
rnystrom@google.com 0bc9b19740 Rename BadNumberFormatException -> FormatException.
Review URL: https://chromiumcodereview.appspot.com//10850034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10354 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 20:56:59 +00:00
asiva@google.com cd5b8f890c Address review comments.
Review URL: https://chromiumcodereview.appspot.com//10829177

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10264 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:30:53 +00:00
asiva@google.com 540b01f66f Eagerly get the function and code corresponding to the frame elements in a stack trace so that we won't be doing expensive code object lookups when setting up the stack trace.
Review URL: https://chromiumcodereview.appspot.com//10824128

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10248 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 20:30:08 +00:00
asiva@google.com ec7f44f025 Create frequently used symbols in the vm isolate
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
srdjan@google.com d173b31373 Minor cleanups: use GrowableArray::is_empty instead of ::length() == 0
Review URL: https://chromiumcodereview.appspot.com//10790086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9780 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 16:06:40 +00:00
srdjan@google.com 00c3067049 Fix problem of excessive attempts to optimize, fix excessive deoptimizations for load/store indexed, performance issue with non-inlineable instance setter (direct call instead of IC call). Add tracing of issues encountered when attepting to optimize a method (--trace_failed_optimization_attempts), rename flag --print_stacktrace_at_throw.
Review URL: https://chromiumcodereview.appspot.com//10704210

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9680 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 20:55:09 +00:00
regis@google.com d95cbc8d7f Use VM type cast and save handles.
Review URL: https://chromiumcodereview.appspot.com//10693071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
asiva@google.com f05e3736d8 Fix issue 1968, replace usage of inline 'asm' constructs in 'stack alignment', 'jump to exception handler' and 'jump to error handler' code with calls to appropriate stubs.
Review URL: https://chromiumcodereview.appspot.com//10664004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9071 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:35:20 +00:00
regis@google.com 0532a90a2f Implement type cast in the VM.
Review URL: https://chromiumcodereview.appspot.com//10659005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9070 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:23:11 +00:00
hausner@google.com 41bd5107c4 Fix issue 3636, break on exception
Call the "pause on exception" handler in the debugger even when
there are no breakpoints set.

Fixes issue 3636.
Review URL: https://chromiumcodereview.appspot.com//10544159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8679 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 18:07:48 +00:00
hausner@google.com eebec2a081 Debugger break on TypeError, AssertionError
Add debugger functionality to pause the VM whenever a TypeError
or AssertionError exception happens.

This is a first step towards breaking on handled and unhanded
exceptions in general. We first need to generate more debug info
for catch handlers so we can determine whether an exception will
be handled or not before we unwind the stack to run the catch
clauses.
Review URL: https://chromiumcodereview.appspot.com//10537065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8457 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:51:50 +00:00
srdjan@google.com 92eb96c913 Fix issue 2939, revert previous change that accepted null as excpetion objects:
throw null throws NullPointerException as per latest spec.
Review URL: https://chromiumcodereview.appspot.com//10392016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7475 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 22:27:12 +00:00
asiva@google.com 3107319e40 Simplify representation of stack frames. Remove the special types DartFrame/StubFrame and instead use StackFrame with methods IsDartFrame and IsStubFrame for frames representing Dart or Stub Code. This eliminates all the complexity that was added to ensure that we always see only one stub frame before hitting a dart frame during iteration.
Fixes bug 6380625 which was another case when we had two stub frames before hitting the dart frame.
Review URL: https://chromiumcodereview.appspot.com//10173008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6920 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 01:15:28 +00:00
turnidge@google.com e61a02c10d Implement spawnFunction from the new isolate api.
Still need to implement spawnUri, which will be the more difficult one.
Review URL: https://chromiumcodereview.appspot.com//9691005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5441 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-13 22:05:08 +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
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