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

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

Issue 18704006: Removes checks for stack overflow from arm and mips simulators (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_MIPS) 10 #if defined(TARGET_ARCH_MIPS)
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 SimulatorSetjmpBuffer buffer(this); 1000 SimulatorSetjmpBuffer buffer(this);
1001 1001
1002 if (!setjmp(buffer.buffer_)) { 1002 if (!setjmp(buffer.buffer_)) {
1003 int32_t saved_ra = get_register(RA); 1003 int32_t saved_ra = get_register(RA);
1004 Redirection* redirection = Redirection::FromBreakInstruction(instr); 1004 Redirection* redirection = Redirection::FromBreakInstruction(instr);
1005 uword external = redirection->external_function(); 1005 uword external = redirection->external_function();
1006 if (FLAG_trace_sim) { 1006 if (FLAG_trace_sim) {
1007 OS::Print("Call to host function at 0x%"Pd"\n", external); 1007 OS::Print("Call to host function at 0x%"Pd"\n", external);
1008 } 1008 }
1009 1009
1010 if ((redirection->call_kind() == kRuntimeCall) || 1010 if ((redirection->call_kind() == kRuntimeCall) ||
1011 (redirection->call_kind() == kNativeCall)) { 1011 (redirection->call_kind() == kNativeCall)) {
1012 // The top_exit_frame_info of the current isolate points to the top of
1013 // the simulator stack.
1014 ASSERT((StackTop() - Isolate::Current()->top_exit_frame_info()) <
1015 Isolate::GetSpecifiedStackSize());
1016 // Set the top_exit_frame_info of this simulator to the native stack. 1012 // Set the top_exit_frame_info of this simulator to the native stack.
1017 set_top_exit_frame_info(reinterpret_cast<uword>(&buffer)); 1013 set_top_exit_frame_info(reinterpret_cast<uword>(&buffer));
1018 } 1014 }
1019 if (redirection->call_kind() == kRuntimeCall) { 1015 if (redirection->call_kind() == kRuntimeCall) {
1020 NativeArguments arguments; 1016 NativeArguments arguments;
1021 ASSERT(sizeof(NativeArguments) == 4*kWordSize); 1017 ASSERT(sizeof(NativeArguments) == 4*kWordSize);
1022 arguments.isolate_ = reinterpret_cast<Isolate*>(get_register(A0)); 1018 arguments.isolate_ = reinterpret_cast<Isolate*>(get_register(A0));
1023 arguments.argc_tag_ = get_register(A1); 1019 arguments.argc_tag_ = get_register(A1);
1024 arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(A2)); 1020 arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(A2));
1025 arguments.retval_ = reinterpret_cast<RawObject**>(get_register(A3)); 1021 arguments.retval_ = reinterpret_cast<RawObject**>(get_register(A3));
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); 2224 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception));
2229 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); 2225 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace));
2230 buf->Longjmp(); 2226 buf->Longjmp();
2231 } 2227 }
2232 2228
2233 } // namespace dart 2229 } // namespace dart
2234 2230
2235 #endif // !defined(HOST_ARCH_MIPS) 2231 #endif // !defined(HOST_ARCH_MIPS)
2236 2232
2237 #endif // defined TARGET_ARCH_MIPS 2233 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698