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

Side by Side Diff: src/vm-state-inl.h

Issue 159993002: A64: Remove A64 special casing in ExternalCallbackScope (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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
« src/a64/simulator-a64.h ('K') | « src/mips/simulator-mips.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 isolate_->set_current_vm_state(previous_tag_); 79 isolate_->set_current_vm_state(previous_tag_);
80 } 80 }
81 81
82 82
83 ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback) 83 ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
84 : isolate_(isolate), 84 : isolate_(isolate),
85 callback_(callback), 85 callback_(callback),
86 previous_scope_(isolate->external_callback_scope()) { 86 previous_scope_(isolate->external_callback_scope()) {
87 #ifdef USE_SIMULATOR 87 #ifdef USE_SIMULATOR
88 #if V8_TARGET_ARCH_A64 88 scope_address_ = Simulator::current(isolate)->get_sp();
89 scope_address_ = reinterpret_cast<Address>(Simulator::current(isolate)->sp());
90 #else
91 int32_t sp = Simulator::current(isolate)->get_register(Simulator::sp);
92 scope_address_ = reinterpret_cast<Address>(static_cast<intptr_t>(sp));
93 #endif
94 #endif 89 #endif
95 isolate_->set_external_callback_scope(this); 90 isolate_->set_external_callback_scope(this);
96 } 91 }
97 92
98 ExternalCallbackScope::~ExternalCallbackScope() { 93 ExternalCallbackScope::~ExternalCallbackScope() {
99 isolate_->set_external_callback_scope(previous_scope_); 94 isolate_->set_external_callback_scope(previous_scope_);
100 } 95 }
101 96
102 Address ExternalCallbackScope::scope_address() { 97 Address ExternalCallbackScope::scope_address() {
103 #ifdef USE_SIMULATOR 98 #ifdef USE_SIMULATOR
104 return scope_address_; 99 return scope_address_;
105 #else 100 #else
106 return reinterpret_cast<Address>(this); 101 return reinterpret_cast<Address>(this);
107 #endif 102 #endif
108 } 103 }
109 104
110 105
111 } } // namespace v8::internal 106 } } // namespace v8::internal
112 107
113 #endif // V8_VM_STATE_INL_H_ 108 #endif // V8_VM_STATE_INL_H_
OLDNEW
« src/a64/simulator-a64.h ('K') | « src/mips/simulator-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698