Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: runtime/vm/simulator_arm.cc

Issue 17587015: Allows exception object to be null in simarm and simmips. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <math.h> // for isnan. 5 #include <math.h> // for isnan.
6 #include <setjmp.h> 6 #include <setjmp.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #if defined(TARGET_ARCH_ARM) 10 #if defined(TARGET_ARCH_ARM)
(...skipping 3055 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 Isolate* isolate = Isolate::Current(); 3066 Isolate* isolate = Isolate::Current();
3067 while (isolate->top_resource() != NULL && 3067 while (isolate->top_resource() != NULL &&
3068 (reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) { 3068 (reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) {
3069 isolate->top_resource()->~StackResource(); 3069 isolate->top_resource()->~StackResource();
3070 } 3070 }
3071 3071
3072 // Unwind the C++ stack and continue simulation in the target frame. 3072 // Unwind the C++ stack and continue simulation in the target frame.
3073 set_register(PC, static_cast<int32_t>(pc)); 3073 set_register(PC, static_cast<int32_t>(pc));
3074 set_register(SP, static_cast<int32_t>(sp)); 3074 set_register(SP, static_cast<int32_t>(sp));
3075 set_register(FP, static_cast<int32_t>(fp)); 3075 set_register(FP, static_cast<int32_t>(fp));
3076 ASSERT(raw_exception != NULL); 3076
regis 2013/06/24 17:30:47 My concern is that we trash register kExceptionObj
zra 2013/06/24 18:43:58 raw_exception == NULL means that someone threw the
3077 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 3077 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
3078 if (raw_stacktrace != NULL) { 3078 if (raw_stacktrace != NULL) {
3079 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 3079 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
3080 } 3080 }
3081 buf->Longjmp(); 3081 buf->Longjmp();
3082 } 3082 }
3083 3083
3084 } // namespace dart 3084 } // namespace dart
3085 3085
3086 #endif // !defined(HOST_ARCH_ARM) 3086 #endif // !defined(HOST_ARCH_ARM)
3087 3087
3088 #endif // defined TARGET_ARCH_ARM 3088 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698