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

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

Issue 1414343002: Fix builds (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | runtime/vm/simulator_mips.cc » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 <setjmp.h> // NOLINT 5 #include <setjmp.h> // NOLINT
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_ARM64) 9 #if defined(TARGET_ARCH_ARM64)
10 10
(...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after
3513 // and try to find the setjmp associated with the simulated stack pointer. 3513 // and try to find the setjmp associated with the simulated stack pointer.
3514 SimulatorSetjmpBuffer* buf = last_setjmp_buffer(); 3514 SimulatorSetjmpBuffer* buf = last_setjmp_buffer();
3515 while (buf->link() != NULL && buf->link()->sp() <= sp) { 3515 while (buf->link() != NULL && buf->link()->sp() <= sp) {
3516 buf = buf->link(); 3516 buf = buf->link();
3517 } 3517 }
3518 ASSERT(buf != NULL); 3518 ASSERT(buf != NULL);
3519 3519
3520 // The C++ caller has not cleaned up the stack memory of C++ frames. 3520 // The C++ caller has not cleaned up the stack memory of C++ frames.
3521 // Prepare for unwinding frames by destroying all the stack resources 3521 // Prepare for unwinding frames by destroying all the stack resources
3522 // in the previous C++ frames. 3522 // in the previous C++ frames.
3523 Isolate* isolate = thread->isolate();
3524 StackResource::Unwind(thread); 3523 StackResource::Unwind(thread);
3525 3524
3526 // Unwind the C++ stack and continue simulation in the target frame. 3525 // Unwind the C++ stack and continue simulation in the target frame.
3527 set_pc(static_cast<int64_t>(pc)); 3526 set_pc(static_cast<int64_t>(pc));
3528 set_register(NULL, SP, static_cast<int64_t>(sp)); 3527 set_register(NULL, SP, static_cast<int64_t>(sp));
3529 set_register(NULL, FP, static_cast<int64_t>(fp)); 3528 set_register(NULL, FP, static_cast<int64_t>(fp));
3530 set_register(NULL, THR, reinterpret_cast<int64_t>(thread)); 3529 set_register(NULL, THR, reinterpret_cast<int64_t>(thread));
3531 // Set the tag. 3530 // Set the tag.
3532 thread->set_vm_tag(VMTag::kDartTagId); 3531 thread->set_vm_tag(VMTag::kDartTagId);
3533 // Clear top exit frame. 3532 // Clear top exit frame.
3534 isolate->set_top_exit_frame_info(0); 3533 thread->set_top_exit_frame_info(0);
3535 3534
3536 ASSERT(raw_exception != Object::null()); 3535 ASSERT(raw_exception != Object::null());
3537 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); 3536 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception));
3538 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); 3537 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace));
3539 buf->Longjmp(); 3538 buf->Longjmp();
3540 } 3539 }
3541 3540
3542 } // namespace dart 3541 } // namespace dart
3543 3542
3544 #endif // !defined(USING_SIMULATOR) 3543 #endif // !defined(USING_SIMULATOR)
3545 3544
3546 #endif // defined TARGET_ARCH_ARM64 3545 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698