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

Unified Diff: src/vm-state-inl.h

Issue 131363008: A64: Synchronize with r15922. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/vm-state.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm-state-inl.h
diff --git a/src/vm-state-inl.h b/src/vm-state-inl.h
index 862c17e16ea9232fbc508a762ce87d4eb604b1bd..41690345cb987bceab7fad805732b480a61ec80e 100644
--- a/src/vm-state-inl.h
+++ b/src/vm-state-inl.h
@@ -29,7 +29,8 @@
#define V8_VM_STATE_INL_H_
#include "vm-state.h"
-#include "runtime-profiler.h"
+#include "log.h"
+#include "simulator.h"
namespace v8 {
namespace internal {
@@ -80,12 +81,30 @@ VMState<Tag>::~VMState() {
ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
- : isolate_(isolate), previous_callback_(isolate->external_callback()) {
- isolate_->set_external_callback(callback);
+ : isolate_(isolate),
+ callback_(callback),
+ previous_scope_(isolate->external_callback_scope()) {
+#ifdef USE_SIMULATOR
+#if V8_TARGET_ARCH_A64
+ scope_address_ = reinterpret_cast<Address>(Simulator::current(isolate)->sp());
+#else
+ int32_t sp = Simulator::current(isolate)->get_register(Simulator::sp);
+ scope_address_ = reinterpret_cast<Address>(static_cast<intptr_t>(sp));
+#endif
+#endif
+ isolate_->set_external_callback_scope(this);
}
ExternalCallbackScope::~ExternalCallbackScope() {
- isolate_->set_external_callback(previous_callback_);
+ isolate_->set_external_callback_scope(previous_scope_);
+}
+
+Address ExternalCallbackScope::scope_address() {
+#ifdef USE_SIMULATOR
+ return scope_address_;
+#else
+ return reinterpret_cast<Address>(this);
+#endif
}
« no previous file with comments | « src/vm-state.h ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698