Lasse R.H. Nielsen
cf4eaae5a6
Change RangeError instances to use RangeError.range.
...
This avoids using the (sometimes confusing) "[...)" notation for half-open ranges.
Also change argument tests to simpler interval tests, and move error handling to the end of the functions.
Mostly in VM typed-data libraries.
R=sgjesse@google.com , srdjan@google.com
Committed: https://github.com/dart-lang/sdk/commit/932bcc6901d70492c6f1b8d000b9555a0db62f4b
Review URL: https://codereview.chromium.org//1132603003
2015-05-29 10:50:20 +02:00
Lasse R.H. Nielsen
9e175d27d7
Revert "Change RangeError instances to use RangeError.range."
...
Method hashes needs to be updated.
Review URL: https://codereview.chromium.org//1160903002
2015-05-28 10:46:15 +02:00
Lasse R.H. Nielsen
932bcc6901
Change RangeError instances to use RangeError.range.
...
This avoids using the (sometimes confusing) "[...)" notation for half-open ranges.
Also change argument tests to simpler interval tests, and move error handling to the end of the functions.
Mostly in VM typed-data libraries.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//1132603003
2015-05-28 10:34:03 +02:00
Daniel Andersson
6542a451c3
Refactor Isolate -> Thread in NativeArguments and exception handler jump.
...
Further reduces the one-to-one assumption about isolates and threads: native entries now ask the thread for its isolate, rather than the other way around.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1156143003
2015-05-26 16:49:51 -07:00
iposva@google.com
7d1785e760
- Allow any implementation of StackTrace to participate in async/
...
await exception handling.
R=hausner@google.com
Review URL: https://codereview.chromium.org//940863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43880 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 16:17:19 +00:00
iposva@google.com
6898a10c93
- Make sure to fail early if an non-stacktrace is passed into the VM
...
where we expect one.
Review URL: https://codereview.chromium.org//908433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43546 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 09:23:57 +00:00
regis@google.com
a1c9e2b6b0
Simplify double to bigint conversion.
...
Remove 3 bigint mutators.
Remove unused support to create vm internal error.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//821123003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42842 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 21:29:44 +00:00
vegorov@google.com
c431dbcb3f
Cleanup throwing of the RangeError in the runtime to remove duplicated code.
...
Improve List._copyFromObjectArray native performance for large arrays by using PassiveObject instead of Object.
R=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//533483003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39911 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 13:15:56 +00:00
hausner@google.com
0bbf6c5b16
Runtime support for evaluation of static field initializer expressions
...
Eliminates the generation of field initializer functions by the parser.
Adds a runtime call that creates a one-shot function to evaluate the
initializer of a static field. The runtime function gets called from
the implicit static getter function for the field.
R=srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//471283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39387 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:53:44 +00:00
rmacnak@google.com
bfd342fd8a
Remove MirroredCompilationError from the VM.
...
Regenerate snapshot test due to removed symbol.
BUG=http://dartbug.com/16562
R=regis@google.com
Review URL: https://codereview.chromium.org//389573007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38202 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 18:00:04 +00:00
regis@google.com
32f3e11d99
Cleanup of error and warning reporting.
...
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//340203003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37468 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 22:30:34 +00:00
rmacnak@google.com
7ce5c53f0b
Pass around the current isolate in exception handling code.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//326183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37409 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 18:17:03 +00:00
regis@google.com
1186078de6
Add support to trace warnings in TraceBuffer.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//328663008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37298 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 00:47:15 +00:00
regis@google.com
dec11d8b7b
Add support for javascript incompatibility warnings (work in progress).
...
For now, warnings are only issued when applicable for type tests, type casts,
and toString.
Fix newly reported lint errors.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//260713008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36001 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 22:42:10 +00:00
regis@google.com
da0958c822
Expose functionality to create a stack trace to internal vm code.
...
Provide functionality to limit depth of printed stack trace.
Fix frame numbering in presence of invisible functions in stack trace.
Let FlowGraphBuilder know if it is building a graph to generate optimized code.
The above features will be used to warn on Javascript incompatibilities.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//248213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35319 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 17:58:12 +00:00
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