Commit Graph

37 Commits

Author SHA1 Message Date
regis@google.com e3da5e16e4 Check type bounds of redirecting factories (issue 14699).
Add tests for malbounded redirecting factories.
Clean up bound checking code and type error reporting code.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30177 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 22:59:48 +00:00
rmacnak@google.com a5fd049d73 Hide MirroredCompilationErrror behind a flag until post-1.0. Remove VM reference to MirroredUncaughtExceptionError.
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28946 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 20:12:49 +00:00
regis@google.com 5a5edb7f0c Report use of malbounded interface in type test.
Fix language tests related to malbounded types (issues 14123, 14131, 14132).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28943 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 19:49:19 +00:00
srdjan@google.com b6b3e1f400 Factor out throwing of argument error.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28109 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 18:48:37 +00:00
zra@google.com 42add423d2 Fixes javascript integer overflow check.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25675 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 17:51:23 +00:00
asiva@google.com dcb6850f87 Fix for issue 11680
- implicitly store a full stack trace in Error objects when they are thrown.
- the shlFromInt on Mints and Bigints was trying to allocate a new OutOfMemory
  exception objects instead of using the pre-allocated exception object.
  Made the implementation of these methods native so that they can use the
  pre-allocated object.
- Ensure that it is not possible to allocate new OutOfMemory or StackOverflow
  exception objects.

R=ahe@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25492 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-25 19:28:53 +00:00
rmacnak@google.com 39bf0aca44 Implement the invoke methods (invoke, getField, setField, newInstance, apply) as internal natives.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25024 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 21:14:43 +00:00
floitsch@google.com 3c45bbcbe0 Cleanup VM error handling.
Unify the way the runtime throws errors. With this patch the VM goes through one location and always invokes the constructor of the errors.

It also makes it easier to rename fields in the error classes.

R=asiva@google.com

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

Reverted: https://code.google.com/p/dart/source/detail?r=24997

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25000 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:32:37 +00:00
floitsch@google.com f14e6b4975 Revert "Cleanup VM error handling."
This reverts commit r24995.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24997 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:18:50 +00:00
floitsch@google.com ef1afc7f91 Cleanup VM error handling.
Unify the way the runtime throws errors. With this patch the VM goes through one location and always invokes the constructor of the errors.

It also makes it easier to rename fields in the error classes.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24995 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 09:28:28 +00:00
zra@google.com 78ed504ed0 Adds a flag to the standalone vm to throw an exception on 53-bit integer overflow.
R=asiva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23640 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 17:18:07 +00:00
asiva@google.com fbc931e6a6 Report OOM errors instead of asserting on allocation failures when sending
messages to other isolates.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21980 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 20:52:22 +00:00
tball@google.com 6044627aa6 Rollback stacktrace change.
Review URL: https://codereview.chromium.org//12894005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20496 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 22:26:37 +00:00
tball@google.com 044a872ba5 Added VM support for isolate stacktrace status.
Review URL: https://codereview.chromium.org//12578022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20494 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 22:16:40 +00:00
floitsch@google.com 9722e27876 Remove deprecated IllegalJSRegExpException class.
Review URL: https://codereview.chromium.org//12317130

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19297 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 12:14:45 +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 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
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 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 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
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
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
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
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 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
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 d078d62165 Fix issue 1023:
- Throw OutOfMemoryException when allocation fails.
Review URL: http://codereview.chromium.org//9030013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2931 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 01:27:57 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00