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
iposva@google.com
7fb172b783
- Don't mix the collection of Error.stackTrace with the collection of
...
the stack trace for try-catch.
R=asiva@google.com
Review URL: https://codereview.chromium.org//38343004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29136 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 00:16:55 +00:00
iposva@google.com
d369b7a0c9
- Ensure that the token stream from generated source matches the
...
original token stream in the presence of combinations of
multiline string and string interpolation. If not this will
cause mismatches when accessing code snippets, e.g when
reporting parser errors or assertions.
- Ensure that ScanAll and ScanTo are in sync when adding or
counting tokens.
- Added unit test for multiline strings and interpolation.
- Expanded GenerateSource unit test to iterate through all
loaded libraries.
- Do not report columns for compilation errors in snapshotted
code.
- Do not report columns from exceptions and errors when dealing
with snapshotted code.
- Remove length field from TokenDescriptor. It was unused.
- Remove TokenStream::ComputeTokenPosition. It was unused.
R=fschneider@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//36323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29110 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 19:08:36 +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
hausner@google.com
fd57843900
Update handling of ambiguous name references
...
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.
Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.
Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.
Fixes 12915, 12913, 12724.
R=regis@google.com
Review URL: https://codereview.chromium.org//23484020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
srdjan@google.com
e3ce299913
Traverse inlined frames lazily when printing the stacktrace. No need to carry separate function and code array, since function can always be extracted from code.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23964003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27209 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 20:25:00 +00:00
srdjan@google.com
8cd4bf5b92
Change inlined stack frame iterator to use code and pc instead of frame.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23494026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27140 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 19:36:20 +00:00
iposva@google.com
da4806e40c
- Reapply change r26880.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23494014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26933 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 18:01:18 +00:00
kmillikin@google.com
ea5dfcd2e4
Revert "Compress memory usage. Imprive speed of finding exception handle..."
...
This reverts svn revision 26880. That change has broken stack traces for
exceptions, making it impossible to use them for debugging Dart code.
BUG=https://code.google.com/p/dart/issues/detail?id=12940
Review URL: https://codereview.chromium.org//23512004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26909 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 11:19:22 +00:00
srdjan@google.com
20d9b10e62
Improve performance of exception handling: quicker (and correcter) determination if the exception class extends class Error.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//23638003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26888 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 19:38:40 +00:00
srdjan@google.com
e8117fea14
Compress memory usage. Imprive speed of finding exception handlers: if a code does not have any handlers, do not reaverse the PC descriptors.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23691008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26880 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 16:47:49 +00:00
srdjan@google.com
e06ea63b60
Mark exception handlers if they have a stacktrace specified. Do not build a stacktrace if the handler has no stacktrace.
...
R=asiva@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//23445012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26823 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:42:21 +00:00
fschneider@google.com
d773e985a7
Mark private methods of core libraries as invisible in the VM.
...
This prevents accessing them via reflection which should not
be allowed since they are often handled specially by the compiler.
Those functions also will not be shown in stacktraces.
TEST=tests/language/reflect_core_vm_test.dart
R=rmacnak@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//23019013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26625 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 09:19:54 +00:00
jacobr@google.com
605b33c1bc
fix cpp11 compile errors
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23072026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
asiva@google.com
dbd0e8c285
Fix the stack trace when there are C++ frames in between dart frames.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//22938002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26044 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 00:16:16 +00:00
asiva@google.com
33a46a45c6
Fix minor bug which was causing throw of Null to not be recognized properly.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//22889002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26024 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 19:50:28 +00:00
regis@google.com
09bcdc6d6d
Fix VM implementation of CastError not to extend TypeError (issue 5280).
...
Remove non-compliant fields in various Error classes (issue 10144).
Remove implicit constructor when patching in a constructor (issue 12217).
Patch corelib Error classes instead of declaring subclasses.
Update tests and status files.
R=asiva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//21832003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25782 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 18:35:04 +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
regis@google.com
9581071936
Refactor resolution code in the vm to properly handle ambiguity errors.
...
Add test.
R=asiva@google.com
Review URL: https://codereview.chromium.org//19662003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25324 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 00:19:39 +00:00
mlippautz@google.com
7021e5bbe1
Rename: DartLibraryCalls::ExceptionCreate -> InstanceCreate
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//19678024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25246 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 21:49:45 +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
iposva@google.com
4a459257cc
- Unpoison stack for ASan when tearing down stack frames
...
during exception handling.
R=kcc@google.com
Review URL: https://codereview.chromium.org//15836008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23746 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 15:31:05 +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
regis@google.com
b59deaa17a
Merge JumpToErrorHandler and JumpToExceptionHandler stubs on all architectures.
...
Review URL: https://codereview.chromium.org//13874010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21689 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 18:32:06 +00:00
regis@google.com
d79c7c1969
Implement long jump in ARM and MIPS simulators.
...
Implement error and exception handler stubs on ARM.
Hook up simulator for object tests.
Enable codegen and object tests on ARM.
Review URL: https://codereview.chromium.org//14309004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21680 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 16:23:25 +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
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
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
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
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