[iwyu] Include isolate.h less.
This removes the include from: assembler.h (moved Isolate::AddressId to globals.h / IsolateAddressId) counters.h (ditto) elements.h (trivial) keys.h (trivial + iwyu fixes) property.h (trivial) transitions.h (trivial) vm-state.h (trivial) heap/code-stats.h (trivial + drive-by iwyuing) BUG=v8:5294 Change-Id: I36b8c07d4edf4177f1a987a393569f5191167ed3 Reviewed-on: https://chromium-review.googlesource.com/532879 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#46176}
This commit is contained in:
parent
2a614f95bd
commit
28d6d14ad5
@ -909,7 +909,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
if (FLAG_debug_code) {
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ mov(r3, Operand(pending_exception_address));
|
||||
__ ldr(r3, MemOperand(r3));
|
||||
__ CompareRoot(r3, Heap::kTheHoleValueRootIndex);
|
||||
@ -938,15 +938,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set r0 to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1026,8 +1026,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
StackFrame::Type marker = type();
|
||||
__ mov(r7, Operand(StackFrame::TypeToMarker(marker)));
|
||||
__ mov(r6, Operand(StackFrame::TypeToMarker(marker)));
|
||||
__ mov(r5,
|
||||
Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(r5, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ ldr(r5, MemOperand(r5));
|
||||
__ mov(ip, Operand(-1)); // Push a bad frame pointer to fail if it is used.
|
||||
__ stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() |
|
||||
@ -1038,7 +1038,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
Label non_outermost_js;
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ mov(r5, Operand(ExternalReference(js_entry_sp)));
|
||||
__ ldr(r6, MemOperand(r5));
|
||||
__ cmp(r6, Operand::Zero());
|
||||
@ -1067,8 +1067,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// field in the JSEnv and return a failure sentinel. Coming in here the
|
||||
// fp will be invalid because the PushStackHandler below sets it to 0 to
|
||||
// signal the existence of the JSEntry frame.
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
||||
isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate())));
|
||||
}
|
||||
__ str(r0, MemOperand(ip));
|
||||
__ LoadRoot(r0, Heap::kExceptionRootIndex);
|
||||
@ -1123,8 +1123,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Restore the top frame descriptors from the stack.
|
||||
__ pop(r3);
|
||||
__ mov(ip,
|
||||
Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ str(r3, MemOperand(ip));
|
||||
|
||||
// Reset the stack to the callee saved registers.
|
||||
|
@ -148,7 +148,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
// handle this a bit differently.
|
||||
__ stm(db_w, sp, restored_regs | sp.bit() | lr.bit() | pc.bit());
|
||||
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ str(fp, MemOperand(ip));
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -1432,9 +1432,11 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
|
||||
str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset));
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
str(fp, MemOperand(ip));
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
str(cp, MemOperand(ip));
|
||||
|
||||
// Optionally save all double registers.
|
||||
@ -1494,16 +1496,19 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
|
||||
|
||||
// Clear top frame.
|
||||
mov(r3, Operand::Zero());
|
||||
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
str(r3, MemOperand(ip));
|
||||
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
if (restore_context) {
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
ldr(cp, MemOperand(ip));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
str(r3, MemOperand(ip));
|
||||
#endif
|
||||
|
||||
@ -1840,7 +1845,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
mov(r6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
mov(r6,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
ldr(r5, MemOperand(r6));
|
||||
push(r5);
|
||||
|
||||
@ -1852,7 +1858,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
pop(r1);
|
||||
mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
|
||||
str(r1, MemOperand(ip));
|
||||
}
|
||||
|
@ -1041,15 +1041,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ Bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set x0 to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1137,7 +1137,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
int64_t bad_frame_pointer = -1L; // Bad frame pointer to fail if it is used.
|
||||
__ Mov(x13, bad_frame_pointer);
|
||||
__ Mov(x12, StackFrame::TypeToMarker(marker));
|
||||
__ Mov(x11, ExternalReference(Isolate::kCEntryFPAddress, isolate()));
|
||||
__ Mov(x11, ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate()));
|
||||
__ Ldr(x10, MemOperand(x11));
|
||||
|
||||
__ Push(x13, x12, xzr, x10);
|
||||
@ -1147,7 +1147,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// Push the JS entry frame marker. Also set js_entry_sp if this is the
|
||||
// outermost JS call.
|
||||
Label non_outermost_js, done;
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ Mov(x10, ExternalReference(js_entry_sp));
|
||||
__ Ldr(x11, MemOperand(x10));
|
||||
__ Cbnz(x11, &non_outermost_js);
|
||||
@ -1186,8 +1186,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// field in the JSEnv and return a failure sentinel. Coming in here the
|
||||
// fp will be invalid because the PushTryHandler below sets it to 0 to
|
||||
// signal the existence of the JSEntry frame.
|
||||
__ Mov(x10, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
||||
isolate())));
|
||||
__ Mov(x10, Operand(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate())));
|
||||
}
|
||||
__ Str(code_entry, MemOperand(x10));
|
||||
__ LoadRoot(x0, Heap::kExceptionRootIndex);
|
||||
@ -1247,7 +1247,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Restore the top frame descriptors from the stack.
|
||||
__ Pop(x10);
|
||||
__ Mov(x11, ExternalReference(Isolate::kCEntryFPAddress, isolate()));
|
||||
__ Mov(x11, ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate()));
|
||||
__ Str(x10, MemOperand(x11));
|
||||
|
||||
// Reset the stack to the callee saved registers.
|
||||
|
@ -133,7 +133,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
saved_registers.Combine(fp);
|
||||
__ PushCPURegList(saved_registers);
|
||||
|
||||
__ Mov(x3, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ Mov(x3, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ Str(fp, MemOperand(x3));
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -2936,11 +2936,11 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, const Register& scratch,
|
||||
STATIC_ASSERT((-3 * kPointerSize) == ExitFrameConstants::kCodeOffset);
|
||||
|
||||
// Save the frame pointer and context pointer in the top frame.
|
||||
Mov(scratch, Operand(ExternalReference(Isolate::kCEntryFPAddress,
|
||||
Mov(scratch, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
Str(fp, MemOperand(scratch));
|
||||
Mov(scratch, Operand(ExternalReference(Isolate::kContextAddress,
|
||||
isolate())));
|
||||
Mov(scratch,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
Str(cp, MemOperand(scratch));
|
||||
|
||||
STATIC_ASSERT((-3 * kPointerSize) == ExitFrameConstants::kLastExitFrameField);
|
||||
@ -2996,19 +2996,19 @@ void MacroAssembler::LeaveExitFrame(bool restore_doubles,
|
||||
|
||||
// Restore the context pointer from the top frame.
|
||||
if (restore_context) {
|
||||
Mov(scratch, Operand(ExternalReference(Isolate::kContextAddress,
|
||||
Mov(scratch, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
Ldr(cp, MemOperand(scratch));
|
||||
}
|
||||
|
||||
if (emit_debug_code()) {
|
||||
// Also emit debug code to clear the cp in the top frame.
|
||||
Mov(scratch, Operand(ExternalReference(Isolate::kContextAddress,
|
||||
Mov(scratch, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
Str(xzr, MemOperand(scratch));
|
||||
}
|
||||
// Clear the frame pointer from the top frame.
|
||||
Mov(scratch, Operand(ExternalReference(Isolate::kCEntryFPAddress,
|
||||
Mov(scratch, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
Str(xzr, MemOperand(scratch));
|
||||
|
||||
@ -3087,7 +3087,7 @@ void MacroAssembler::PushStackHandler() {
|
||||
// (See JSEntryStub::GenerateBody().)
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
Mov(x11, ExternalReference(Isolate::kHandlerAddress, isolate()));
|
||||
Mov(x11, ExternalReference(IsolateAddressId::kHandlerAddress, isolate()));
|
||||
Ldr(x10, MemOperand(x11));
|
||||
Push(x10);
|
||||
|
||||
@ -3099,7 +3099,7 @@ void MacroAssembler::PushStackHandler() {
|
||||
void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
Pop(x10);
|
||||
Mov(x11, ExternalReference(Isolate::kHandlerAddress, isolate()));
|
||||
Mov(x11, ExternalReference(IsolateAddressId::kHandlerAddress, isolate()));
|
||||
Drop(StackHandlerConstants::kSize - kXRegSize, kByteSizeInBytes);
|
||||
Str(x10, MemOperand(x11));
|
||||
}
|
||||
|
@ -55,6 +55,7 @@
|
||||
#include "src/ic/ic.h"
|
||||
#include "src/ic/stub-cache.h"
|
||||
#include "src/interpreter/interpreter.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/ostreams.h"
|
||||
#include "src/regexp/jsregexp.h"
|
||||
#include "src/regexp/regexp-macro-assembler.h"
|
||||
@ -890,10 +891,8 @@ ExternalReference ExternalReference::interpreter_dispatch_counters(
|
||||
ExternalReference::ExternalReference(StatsCounter* counter)
|
||||
: address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {}
|
||||
|
||||
|
||||
ExternalReference::ExternalReference(Isolate::AddressId id, Isolate* isolate)
|
||||
: address_(isolate->get_address_from_id(id)) {}
|
||||
|
||||
ExternalReference::ExternalReference(IsolateAddressId id, Isolate* isolate)
|
||||
: address_(isolate->get_address_from_id(id)) {}
|
||||
|
||||
ExternalReference::ExternalReference(const SCTableReference& table_ref)
|
||||
: address_(table_ref.address()) {}
|
||||
@ -954,6 +953,13 @@ ExternalReference ExternalReference::date_cache_stamp(Isolate* isolate) {
|
||||
return ExternalReference(isolate->date_cache()->stamp_address());
|
||||
}
|
||||
|
||||
void ExternalReference::set_redirector(
|
||||
Isolate* isolate, ExternalReferenceRedirector* redirector) {
|
||||
// We can't stack them.
|
||||
DCHECK(isolate->external_reference_redirector() == NULL);
|
||||
isolate->set_external_reference_redirector(
|
||||
reinterpret_cast<ExternalReferenceRedirectorPointer*>(redirector));
|
||||
}
|
||||
|
||||
ExternalReference ExternalReference::stress_deopt_count(Isolate* isolate) {
|
||||
return ExternalReference(isolate->stress_deopt_count_address());
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "src/builtins/builtins.h"
|
||||
#include "src/deoptimize-reason.h"
|
||||
#include "src/globals.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/label.h"
|
||||
#include "src/log.h"
|
||||
#include "src/register-configuration.h"
|
||||
@ -55,6 +54,7 @@ class ApiFunction;
|
||||
namespace internal {
|
||||
|
||||
// Forward declarations.
|
||||
class Isolate;
|
||||
class SourcePosition;
|
||||
class StatsCounter;
|
||||
|
||||
@ -852,7 +852,7 @@ class ExternalReference BASE_EMBEDDED {
|
||||
|
||||
explicit ExternalReference(StatsCounter* counter);
|
||||
|
||||
ExternalReference(Isolate::AddressId id, Isolate* isolate);
|
||||
ExternalReference(IsolateAddressId id, Isolate* isolate);
|
||||
|
||||
explicit ExternalReference(const SCTableReference& table_ref);
|
||||
|
||||
@ -1078,12 +1078,7 @@ class ExternalReference BASE_EMBEDDED {
|
||||
// This lets you register a function that rewrites all external references.
|
||||
// Used by the ARM simulator to catch calls to external references.
|
||||
static void set_redirector(Isolate* isolate,
|
||||
ExternalReferenceRedirector* redirector) {
|
||||
// We can't stack them.
|
||||
DCHECK(isolate->external_reference_redirector() == NULL);
|
||||
isolate->set_external_reference_redirector(
|
||||
reinterpret_cast<ExternalReferenceRedirectorPointer*>(redirector));
|
||||
}
|
||||
ExternalReferenceRedirector* redirector);
|
||||
|
||||
static ExternalReference stress_deopt_count(Isolate* isolate);
|
||||
|
||||
|
@ -873,7 +873,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ mov(cp, Operand(context_address));
|
||||
__ ldr(cp, MemOperand(cp));
|
||||
|
@ -897,7 +897,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
__ Mov(scratch, Operand(ExternalReference(Isolate::kContextAddress,
|
||||
__ Mov(scratch, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
masm->isolate())));
|
||||
__ Ldr(cp, MemOperand(scratch));
|
||||
|
||||
|
@ -532,8 +532,8 @@ Node* RegExpBuiltinsAssembler::RegExpExecInternal(Node* const context,
|
||||
{
|
||||
// A stack overflow was detected in RegExp code.
|
||||
#ifdef DEBUG
|
||||
Node* const pending_exception_address = ExternalConstant(
|
||||
ExternalReference(Isolate::kPendingExceptionAddress, isolate()));
|
||||
Node* const pending_exception_address = ExternalConstant(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate()));
|
||||
CSA_ASSERT(this, IsTheHole(Load(MachineType::AnyTagged(),
|
||||
pending_exception_address)));
|
||||
#endif // DEBUG
|
||||
|
@ -405,7 +405,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ mov(esi, Operand::StaticVariable(context_address));
|
||||
|
||||
|
@ -738,7 +738,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ li(cp, Operand(context_address));
|
||||
__ lw(cp, MemOperand(cp));
|
||||
|
@ -872,7 +872,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ li(cp, Operand(context_address));
|
||||
__ Ld(cp, MemOperand(cp));
|
||||
|
@ -899,7 +899,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ mov(cp, Operand(context_address));
|
||||
__ LoadP(cp, MemOperand(cp));
|
||||
|
@ -890,7 +890,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ mov(cp, Operand(context_address));
|
||||
__ LoadP(cp, MemOperand(cp));
|
||||
|
@ -436,7 +436,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ movp(rsi, masm->ExternalOperand(context_address));
|
||||
|
||||
@ -473,7 +473,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ movp(rsi, masm->ExternalOperand(context_address));
|
||||
|
||||
|
@ -310,7 +310,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
|
||||
FrameScope scope(masm, StackFrame::INTERNAL);
|
||||
|
||||
// Setup the context (we need to use the caller context from the isolate).
|
||||
ExternalReference context_address(Isolate::kContextAddress,
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
masm->isolate());
|
||||
__ mov(esi, Operand::StaticVariable(context_address));
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#include "src/counters.h"
|
||||
|
||||
#include "src/isolate.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include "src/base/platform/elapsed-timer.h"
|
||||
#include "src/base/platform/time.h"
|
||||
#include "src/globals.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects.h"
|
||||
#include "src/runtime/runtime.h"
|
||||
#include "src/tracing/trace-event.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
#define V8_ELEMENTS_H_
|
||||
|
||||
#include "src/elements-kind.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/keys.h"
|
||||
#include "src/objects.h"
|
||||
|
||||
|
@ -408,8 +408,8 @@ void ExternalReferenceTable::AddIsolateAddresses(Isolate* isolate) {
|
||||
#undef BUILD_NAME_LITERAL
|
||||
};
|
||||
|
||||
for (int i = 0; i < Isolate::kIsolateAddressCount; ++i) {
|
||||
Add(isolate->get_address_from_id(static_cast<Isolate::AddressId>(i)),
|
||||
for (int i = 0; i < IsolateAddressId::kIsolateAddressCount; ++i) {
|
||||
Add(isolate->get_address_from_id(static_cast<IsolateAddressId>(i)),
|
||||
address_names[i]);
|
||||
}
|
||||
}
|
||||
|
@ -1457,6 +1457,27 @@ inline std::ostream& operator<<(std::ostream& os,
|
||||
|
||||
enum class ConcurrencyMode { kNotConcurrent, kConcurrent };
|
||||
|
||||
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
|
||||
C(Handler, handler) \
|
||||
C(CEntryFP, c_entry_fp) \
|
||||
C(CFunction, c_function) \
|
||||
C(Context, context) \
|
||||
C(PendingException, pending_exception) \
|
||||
C(PendingHandlerContext, pending_handler_context) \
|
||||
C(PendingHandlerCode, pending_handler_code) \
|
||||
C(PendingHandlerOffset, pending_handler_offset) \
|
||||
C(PendingHandlerFP, pending_handler_fp) \
|
||||
C(PendingHandlerSP, pending_handler_sp) \
|
||||
C(ExternalCaughtException, external_caught_exception) \
|
||||
C(JSEntrySP, js_entry_sp)
|
||||
|
||||
enum IsolateAddressId {
|
||||
#define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
|
||||
FOR_EACH_ISOLATE_ADDRESS_NAME(DECLARE_ENUM)
|
||||
#undef DECLARE_ENUM
|
||||
kIsolateAddressCount
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
|
@ -2,14 +2,15 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "src/assembler.h"
|
||||
#include "src/heap/spaces.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
class Isolate;
|
||||
class HeapObject;
|
||||
class LargeObjectSpace;
|
||||
class PagedSpace;
|
||||
class RelocIterator;
|
||||
|
||||
class CodeStatistics {
|
||||
public:
|
||||
// Collect statistics related to code size.
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "src/base/ring-buffer.h"
|
||||
#include "src/counters.h"
|
||||
#include "src/globals.h"
|
||||
#include "src/heap/heap.h"
|
||||
#include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck
|
||||
|
||||
namespace v8 {
|
||||
|
@ -1056,7 +1056,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ mov(edx, Immediate(isolate()->factory()->the_hole_value()));
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ cmp(edx, Operand::StaticVariable(pending_exception_address));
|
||||
// Cannot use check here as it attempts to generate call into runtime.
|
||||
__ j(equal, &okay, Label::kNear);
|
||||
@ -1073,15 +1073,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set eax to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1131,7 +1131,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// Push marker in two places.
|
||||
StackFrame::Type marker = type();
|
||||
__ push(Immediate(StackFrame::TypeToMarker(marker))); // marker
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
__ push(Operand::StaticVariable(context_address)); // context
|
||||
// Save callee-saved registers (C calling conventions).
|
||||
__ push(edi);
|
||||
@ -1139,11 +1140,11 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ push(ebx);
|
||||
|
||||
// Save copies of the top frame descriptor on the stack.
|
||||
ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference c_entry_fp(IsolateAddressId::kCEntryFPAddress, isolate());
|
||||
__ push(Operand::StaticVariable(c_entry_fp));
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0));
|
||||
__ j(not_equal, ¬_outermost_js, Label::kNear);
|
||||
__ mov(Operand::StaticVariable(js_entry_sp), ebp);
|
||||
@ -1159,8 +1160,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
handler_offset_ = handler_entry.pos();
|
||||
// Caught exception: Store result (exception) in the pending exception
|
||||
// field in the JSEnv and return a failure sentinel.
|
||||
ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
|
||||
isolate());
|
||||
ExternalReference pending_exception(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ mov(Operand::StaticVariable(pending_exception), eax);
|
||||
__ mov(eax, Immediate(isolate()->factory()->exception()));
|
||||
__ jmp(&exit);
|
||||
@ -1200,8 +1201,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(¬_outermost_js_2);
|
||||
|
||||
// Restore the top frame descriptor from the stack.
|
||||
__ pop(Operand::StaticVariable(ExternalReference(
|
||||
Isolate::kCEntryFPAddress, isolate())));
|
||||
__ pop(Operand::StaticVariable(
|
||||
ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate())));
|
||||
|
||||
// Restore callee-saved registers (C calling conventions).
|
||||
__ pop(ebx);
|
||||
|
@ -213,7 +213,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
|
||||
__ pushad();
|
||||
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
__ mov(Operand::StaticVariable(c_entry_fp_address), ebp);
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -1005,9 +1005,12 @@ void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) {
|
||||
push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot.
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference c_function_address(Isolate::kCFunctionAddress, isolate());
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
ExternalReference c_function_address(IsolateAddressId::kCFunctionAddress,
|
||||
isolate());
|
||||
mov(Operand::StaticVariable(c_entry_fp_address), ebp);
|
||||
mov(Operand::StaticVariable(context_address), esi);
|
||||
mov(Operand::StaticVariable(c_function_address), ebx);
|
||||
@ -1091,7 +1094,8 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) {
|
||||
|
||||
void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
if (restore_context) {
|
||||
mov(esi, Operand::StaticVariable(context_address));
|
||||
}
|
||||
@ -1100,7 +1104,7 @@ void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
|
||||
#endif
|
||||
|
||||
// Clear the top frame.
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0));
|
||||
}
|
||||
@ -1120,7 +1124,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
||||
ExternalReference handler_address(IsolateAddressId::kHandlerAddress,
|
||||
isolate());
|
||||
push(Operand::StaticVariable(handler_address));
|
||||
|
||||
// Set this new handler as the current one.
|
||||
@ -1130,7 +1135,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
|
||||
void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
||||
ExternalReference handler_address(IsolateAddressId::kHandlerAddress,
|
||||
isolate());
|
||||
pop(Operand::StaticVariable(handler_address));
|
||||
add(esp, Immediate(StackHandlerConstants::kSize - kPointerSize));
|
||||
}
|
||||
|
@ -197,8 +197,7 @@ void Isolate::InitializeOncePerProcess() {
|
||||
thread_data_table_ = new Isolate::ThreadDataTable();
|
||||
}
|
||||
|
||||
|
||||
Address Isolate::get_address_from_id(Isolate::AddressId id) {
|
||||
Address Isolate::get_address_from_id(IsolateAddressId id) {
|
||||
return isolate_addresses_[id];
|
||||
}
|
||||
|
||||
@ -2676,7 +2675,7 @@ bool Isolate::Init(Deserializer* des) {
|
||||
heap_.SetStackLimits();
|
||||
|
||||
#define ASSIGN_ELEMENT(CamelName, hacker_name) \
|
||||
isolate_addresses_[Isolate::k##CamelName##Address] = \
|
||||
isolate_addresses_[IsolateAddressId::k##CamelName##Address] = \
|
||||
reinterpret_cast<Address>(hacker_name##_address());
|
||||
FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT)
|
||||
#undef ASSIGN_ELEMENT
|
||||
|
@ -193,20 +193,6 @@ class CompilationManager;
|
||||
RETURN_ON_EXCEPTION_VALUE(isolate, call, MaybeHandle<T>())
|
||||
|
||||
|
||||
#define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
|
||||
C(Handler, handler) \
|
||||
C(CEntryFP, c_entry_fp) \
|
||||
C(CFunction, c_function) \
|
||||
C(Context, context) \
|
||||
C(PendingException, pending_exception) \
|
||||
C(PendingHandlerContext, pending_handler_context) \
|
||||
C(PendingHandlerCode, pending_handler_code) \
|
||||
C(PendingHandlerOffset, pending_handler_offset) \
|
||||
C(PendingHandlerFP, pending_handler_fp) \
|
||||
C(PendingHandlerSP, pending_handler_sp) \
|
||||
C(ExternalCaughtException, external_caught_exception) \
|
||||
C(JSEntrySP, js_entry_sp)
|
||||
|
||||
#define FOR_WITH_HANDLE_SCOPE(isolate, loop_var_type, init, loop_var, \
|
||||
limit_check, increment, body) \
|
||||
do { \
|
||||
@ -508,14 +494,6 @@ class Isolate {
|
||||
DISALLOW_COPY_AND_ASSIGN(PerIsolateThreadData);
|
||||
};
|
||||
|
||||
|
||||
enum AddressId {
|
||||
#define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
|
||||
FOR_EACH_ISOLATE_ADDRESS_NAME(DECLARE_ENUM)
|
||||
#undef DECLARE_ENUM
|
||||
kIsolateAddressCount
|
||||
};
|
||||
|
||||
static void InitializeOncePerProcess();
|
||||
|
||||
// Returns the PerIsolateThreadData for the current thread (or NULL if one is
|
||||
@ -587,7 +565,7 @@ class Isolate {
|
||||
// Mutex for serializing access to break control structures.
|
||||
base::RecursiveMutex* break_access() { return &break_access_; }
|
||||
|
||||
Address get_address_from_id(AddressId id);
|
||||
Address get_address_from_id(IsolateAddressId id);
|
||||
|
||||
// Access to top context (where the current function object was created).
|
||||
Context* context() { return thread_local_top_.context_; }
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef V8_KEYS_H_
|
||||
#define V8_KEYS_H_
|
||||
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects.h"
|
||||
#include "src/objects/hash-table.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
@ -1029,7 +1029,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
if (FLAG_debug_code) {
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ li(a2, Operand(pending_exception_address));
|
||||
__ lw(a2, MemOperand(a2));
|
||||
__ LoadRoot(t0, Heap::kTheHoleValueRootIndex);
|
||||
@ -1057,15 +1057,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set v0 to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1142,7 +1142,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
StackFrame::Type marker = type();
|
||||
__ li(t2, Operand(StackFrame::TypeToMarker(marker)));
|
||||
__ li(t1, Operand(StackFrame::TypeToMarker(marker)));
|
||||
__ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress,
|
||||
__ li(t0, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate)));
|
||||
__ lw(t0, MemOperand(t0));
|
||||
__ Push(t3, t2, t1, t0);
|
||||
@ -1167,7 +1167,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
Label non_outermost_js;
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate);
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate);
|
||||
__ li(t1, Operand(ExternalReference(js_entry_sp)));
|
||||
__ lw(t2, MemOperand(t1));
|
||||
__ Branch(&non_outermost_js, ne, t2, Operand(zero_reg));
|
||||
@ -1190,8 +1190,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// field in the JSEnv and return a failure sentinel. Coming in here the
|
||||
// fp will be invalid because the PushStackHandler below sets it to 0 to
|
||||
// signal the existence of the JSEntry frame.
|
||||
__ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
||||
isolate)));
|
||||
__ li(t0, Operand(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate)));
|
||||
__ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in v0.
|
||||
__ LoadRoot(v0, Heap::kExceptionRootIndex);
|
||||
__ b(&exit); // b exposes branch delay slot.
|
||||
@ -1251,7 +1251,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Restore the top frame descriptors from the stack.
|
||||
__ pop(t1);
|
||||
__ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress,
|
||||
__ li(t0, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate)));
|
||||
__ sw(t1, MemOperand(t0));
|
||||
|
||||
|
@ -140,7 +140,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ li(a2, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ li(a2, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ sw(fp, MemOperand(a2));
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -4181,7 +4181,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
li(t2,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
lw(t1, MemOperand(t2));
|
||||
push(t1);
|
||||
|
||||
@ -4194,7 +4195,8 @@ void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
pop(a1);
|
||||
Addu(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
|
||||
li(at, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
li(at,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
sw(a1, MemOperand(at));
|
||||
}
|
||||
|
||||
@ -5644,9 +5646,11 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
|
||||
sw(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset));
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate())));
|
||||
sw(fp, MemOperand(t8));
|
||||
li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
sw(cp, MemOperand(t8));
|
||||
|
||||
const int frame_alignment = MacroAssembler::ActivationFrameAlignment();
|
||||
@ -5697,16 +5701,19 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
|
||||
}
|
||||
|
||||
// Clear top frame.
|
||||
li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate())));
|
||||
sw(zero_reg, MemOperand(t8));
|
||||
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
if (restore_context) {
|
||||
li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
li(t8, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
lw(cp, MemOperand(t8));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
sw(a3, MemOperand(t8));
|
||||
#endif
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
if (FLAG_debug_code) {
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ li(a2, Operand(pending_exception_address));
|
||||
__ Ld(a2, MemOperand(a2));
|
||||
__ LoadRoot(a4, Heap::kTheHoleValueRootIndex);
|
||||
@ -1054,15 +1054,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set v0 to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1139,7 +1139,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
StackFrame::Type marker = type();
|
||||
__ li(a6, Operand(StackFrame::TypeToMarker(marker)));
|
||||
__ li(a5, Operand(StackFrame::TypeToMarker(marker)));
|
||||
ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, isolate);
|
||||
ExternalReference c_entry_fp(IsolateAddressId::kCEntryFPAddress, isolate);
|
||||
__ li(a4, Operand(c_entry_fp));
|
||||
__ Ld(a4, MemOperand(a4));
|
||||
__ Push(a7, a6, a5, a4);
|
||||
@ -1164,7 +1164,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
Label non_outermost_js;
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate);
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate);
|
||||
__ li(a5, Operand(ExternalReference(js_entry_sp)));
|
||||
__ Ld(a6, MemOperand(a5));
|
||||
__ Branch(&non_outermost_js, ne, a6, Operand(zero_reg));
|
||||
@ -1187,8 +1187,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// field in the JSEnv and return a failure sentinel. Coming in here the
|
||||
// fp will be invalid because the PushStackHandler below sets it to 0 to
|
||||
// signal the existence of the JSEntry frame.
|
||||
__ li(a4, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
||||
isolate)));
|
||||
__ li(a4, Operand(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate)));
|
||||
__ Sd(v0, MemOperand(a4)); // We come back from 'invoke'. result is in v0.
|
||||
__ LoadRoot(v0, Heap::kExceptionRootIndex);
|
||||
__ b(&exit); // b exposes branch delay slot.
|
||||
@ -1248,7 +1248,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Restore the top frame descriptors from the stack.
|
||||
__ pop(a5);
|
||||
__ li(a4, Operand(ExternalReference(Isolate::kCEntryFPAddress,
|
||||
__ li(a4, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate)));
|
||||
__ Sd(a5, MemOperand(a4));
|
||||
|
||||
|
@ -141,7 +141,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ li(a2, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ li(a2, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ Sd(fp, MemOperand(a2));
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -4514,7 +4514,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
li(a6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
li(a6,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
Ld(a5, MemOperand(a6));
|
||||
push(a5);
|
||||
|
||||
@ -4528,7 +4529,8 @@ void MacroAssembler::PopStackHandler() {
|
||||
pop(a1);
|
||||
Daddu(sp, sp, Operand(static_cast<int64_t>(StackHandlerConstants::kSize -
|
||||
kPointerSize)));
|
||||
li(at, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
li(at,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
Sd(a1, MemOperand(at));
|
||||
}
|
||||
|
||||
@ -6167,9 +6169,11 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
|
||||
Sd(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset));
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate())));
|
||||
Sd(fp, MemOperand(t8));
|
||||
li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
Sd(cp, MemOperand(t8));
|
||||
|
||||
const int frame_alignment = MacroAssembler::ActivationFrameAlignment();
|
||||
@ -6218,16 +6222,19 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
|
||||
}
|
||||
|
||||
// Clear top frame.
|
||||
li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate())));
|
||||
Sd(zero_reg, MemOperand(t8));
|
||||
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
if (restore_context) {
|
||||
li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
li(t8, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
Ld(cp, MemOperand(t8));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
li(t8,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
Sd(a3, MemOperand(t8));
|
||||
#endif
|
||||
|
||||
|
@ -975,7 +975,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
if (FLAG_debug_code) {
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
|
||||
__ mov(r6, Operand(pending_exception_address));
|
||||
__ LoadP(r6, MemOperand(r6));
|
||||
@ -1005,15 +1005,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set r3 to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1103,7 +1103,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ push(r0);
|
||||
__ push(r0);
|
||||
// Save copies of the top frame descriptor on the stack.
|
||||
__ mov(r8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(r8, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ LoadP(r0, MemOperand(r8));
|
||||
__ push(r0);
|
||||
|
||||
@ -1112,7 +1113,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
Label non_outermost_js;
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ mov(r8, Operand(ExternalReference(js_entry_sp)));
|
||||
__ LoadP(r9, MemOperand(r8));
|
||||
__ cmpi(r9, Operand::Zero());
|
||||
@ -1136,8 +1137,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// field in the JSEnv and return a failure sentinel. Coming in here the
|
||||
// fp will be invalid because the PushStackHandler below sets it to 0 to
|
||||
// signal the existence of the JSEntry frame.
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
||||
isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate())));
|
||||
|
||||
__ StoreP(r3, MemOperand(ip));
|
||||
__ LoadRoot(r3, Heap::kExceptionRootIndex);
|
||||
@ -1194,7 +1195,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Restore the top frame descriptors from the stack.
|
||||
__ pop(r6);
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ StoreP(r6, MemOperand(ip));
|
||||
|
||||
// Reset the stack to the callee saved registers.
|
||||
|
@ -147,7 +147,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ StoreP(fp, MemOperand(ip));
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -1163,9 +1163,11 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
|
||||
StoreP(r8, MemOperand(fp, ExitFrameConstants::kCodeOffset));
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
mov(r8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
mov(r8, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
StoreP(fp, MemOperand(r8));
|
||||
mov(r8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(r8,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
StoreP(cp, MemOperand(r8));
|
||||
|
||||
// Optionally save all volatile double registers.
|
||||
@ -1228,16 +1230,19 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
|
||||
|
||||
// Clear top frame.
|
||||
li(r6, Operand::Zero());
|
||||
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
StoreP(r6, MemOperand(ip));
|
||||
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
if (restore_context) {
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
LoadP(cp, MemOperand(ip));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
StoreP(r6, MemOperand(ip));
|
||||
#endif
|
||||
|
||||
@ -1562,7 +1567,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
// Preserve r3-r7.
|
||||
mov(r8, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
mov(r8,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
LoadP(r0, MemOperand(r8));
|
||||
push(r0);
|
||||
|
||||
@ -1576,7 +1582,8 @@ void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
|
||||
pop(r4);
|
||||
mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
StoreP(r4, MemOperand(ip));
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <iosfwd>
|
||||
|
||||
#include "src/factory.h"
|
||||
#include "src/isolate.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
@ -935,7 +935,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
if (FLAG_debug_code) {
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ mov(r1, Operand(pending_exception_address));
|
||||
__ LoadP(r1, MemOperand(r1));
|
||||
__ CompareRoot(r1, Heap::kTheHoleValueRootIndex);
|
||||
@ -964,15 +964,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set r3 to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1074,7 +1074,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ Load(r9, Operand(StackFrame::TypeToMarker(marker)));
|
||||
__ Load(r8, Operand(StackFrame::TypeToMarker(marker)));
|
||||
// Save copies of the top frame descriptor on the stack.
|
||||
__ mov(r7, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(r7, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ LoadP(r7, MemOperand(r7));
|
||||
__ StoreMultipleP(r7, r10, MemOperand(sp, kPointerSize));
|
||||
// Set up frame pointer for the frame to be pushed.
|
||||
@ -1085,7 +1086,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
Label non_outermost_js;
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ mov(r7, Operand(ExternalReference(js_entry_sp)));
|
||||
__ LoadAndTestP(r8, MemOperand(r7));
|
||||
__ bne(&non_outermost_js, Label::kNear);
|
||||
@ -1109,8 +1110,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// field in the JSEnv and return a failure sentinel. Coming in here the
|
||||
// fp will be invalid because the PushStackHandler below sets it to 0 to
|
||||
// signal the existence of the JSEntry frame.
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
||||
isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate())));
|
||||
|
||||
__ StoreP(r2, MemOperand(ip));
|
||||
__ LoadRoot(r2, Heap::kExceptionRootIndex);
|
||||
@ -1170,7 +1171,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Restore the top frame descriptors from the stack.
|
||||
__ pop(r5);
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ StoreP(r5, MemOperand(ip));
|
||||
|
||||
// Reset the stack to the callee saved registers.
|
||||
|
@ -134,7 +134,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
__ lay(sp, MemOperand(sp, -kNumberOfRegisters * kPointerSize));
|
||||
__ StoreMultipleP(r0, sp, MemOperand(sp)); // Save all 16 registers
|
||||
|
||||
__ mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
__ mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
__ StoreP(fp, MemOperand(ip));
|
||||
|
||||
const int kSavedRegistersAreaSize =
|
||||
|
@ -1084,9 +1084,11 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space,
|
||||
StoreP(r1, MemOperand(fp, ExitFrameConstants::kCodeOffset));
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
mov(r1, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
mov(r1, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
StoreP(fp, MemOperand(r1));
|
||||
mov(r1, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(r1,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
StoreP(cp, MemOperand(r1));
|
||||
|
||||
// Optionally save all volatile double registers.
|
||||
@ -1145,16 +1147,19 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, Register argument_count,
|
||||
}
|
||||
|
||||
// Clear top frame.
|
||||
mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate())));
|
||||
StoreP(MemOperand(ip), Operand(0, kRelocInfo_NONEPTR), r0);
|
||||
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
if (restore_context) {
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip, Operand(ExternalReference(IsolateAddressId::kContextAddress,
|
||||
isolate())));
|
||||
LoadP(cp, MemOperand(ip));
|
||||
}
|
||||
#ifdef DEBUG
|
||||
mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kContextAddress, isolate())));
|
||||
StoreP(MemOperand(ip), Operand(0, kRelocInfo_NONEPTR), r0);
|
||||
#endif
|
||||
|
||||
@ -1473,7 +1478,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
mov(r7, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
mov(r7,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
|
||||
// Buy the full stack frame for 5 slots.
|
||||
lay(sp, MemOperand(sp, -StackHandlerConstants::kSize));
|
||||
@ -1491,7 +1497,8 @@ void MacroAssembler::PopStackHandler() {
|
||||
|
||||
// Pop the Next Handler into r3 and store it into Handler Address reference.
|
||||
Pop(r3);
|
||||
mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
|
||||
mov(ip,
|
||||
Operand(ExternalReference(IsolateAddressId::kHandlerAddress, isolate())));
|
||||
|
||||
StoreP(r3, MemOperand(ip));
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include "src/checks.h"
|
||||
#include "src/elements-kind.h"
|
||||
#include "src/isolate.h"
|
||||
#include "src/objects.h"
|
||||
#include "src/objects/descriptor-array.h"
|
||||
#include "src/objects/map.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include "src/allocation.h"
|
||||
#include "src/counters.h"
|
||||
#include "src/isolate.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
@ -957,7 +957,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
Label okay;
|
||||
__ LoadRoot(r14, Heap::kTheHoleValueRootIndex);
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
Operand pending_exception_operand =
|
||||
masm->ExternalOperand(pending_exception_address);
|
||||
__ cmpp(r14, pending_exception_operand);
|
||||
@ -974,15 +974,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set rax to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1032,7 +1032,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Push the stack frame type.
|
||||
__ Push(Immediate(StackFrame::TypeToMarker(type()))); // context slot
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
__ Load(kScratchRegister, context_address);
|
||||
__ Push(kScratchRegister); // context
|
||||
// Save callee-saved registers (X64/X32/Win64 calling conventions).
|
||||
@ -1067,14 +1068,14 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
}
|
||||
|
||||
// Save copies of the top frame descriptor on the stack.
|
||||
ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference c_entry_fp(IsolateAddressId::kCEntryFPAddress, isolate());
|
||||
{
|
||||
Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp);
|
||||
__ Push(c_entry_fp_operand);
|
||||
}
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ Load(rax, js_entry_sp);
|
||||
__ testp(rax, rax);
|
||||
__ j(not_zero, ¬_outermost_js);
|
||||
@ -1094,8 +1095,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
handler_offset_ = handler_entry.pos();
|
||||
// Caught exception: Store result (exception) in the pending exception
|
||||
// field in the JSEnv and return a failure sentinel.
|
||||
ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
|
||||
isolate());
|
||||
ExternalReference pending_exception(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ Store(pending_exception, rax);
|
||||
__ LoadRoot(rax, Heap::kExceptionRootIndex);
|
||||
__ jmp(&exit);
|
||||
|
@ -142,7 +142,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
const int kSavedRegistersAreaSize =
|
||||
kNumberOfRegisters * kRegisterSize + kDoubleRegsSize + kFloatRegsSize;
|
||||
|
||||
__ Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp);
|
||||
__ Store(ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate()),
|
||||
rbp);
|
||||
|
||||
// We use this to keep the value of the fifth argument temporarily.
|
||||
// Unfortunately we can't store it directly in r8 (used for passing
|
||||
|
@ -3435,7 +3435,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
||||
ExternalReference handler_address(IsolateAddressId::kHandlerAddress,
|
||||
isolate());
|
||||
Push(ExternalOperand(handler_address));
|
||||
|
||||
// Set this new handler as the current one.
|
||||
@ -3445,7 +3446,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
|
||||
void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
||||
ExternalReference handler_address(IsolateAddressId::kHandlerAddress,
|
||||
isolate());
|
||||
Pop(ExternalOperand(handler_address));
|
||||
addp(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize));
|
||||
}
|
||||
@ -4203,9 +4205,9 @@ void MacroAssembler::EnterExitFramePrologue(bool save_rax,
|
||||
movp(r14, rax); // Backup rax in callee-save register.
|
||||
}
|
||||
|
||||
Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp);
|
||||
Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi);
|
||||
Store(ExternalReference(Isolate::kCFunctionAddress, isolate()), rbx);
|
||||
Store(ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate()), rbp);
|
||||
Store(ExternalReference(IsolateAddressId::kContextAddress, isolate()), rsi);
|
||||
Store(ExternalReference(IsolateAddressId::kCFunctionAddress, isolate()), rbx);
|
||||
}
|
||||
|
||||
|
||||
@ -4304,7 +4306,8 @@ void MacroAssembler::LeaveApiExitFrame(bool restore_context) {
|
||||
|
||||
void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
Operand context_operand = ExternalOperand(context_address);
|
||||
if (restore_context) {
|
||||
movp(rsi, context_operand);
|
||||
@ -4314,7 +4317,7 @@ void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
|
||||
#endif
|
||||
|
||||
// Clear the top frame.
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
Operand c_entry_fp_operand = ExternalOperand(c_entry_fp_address);
|
||||
movp(c_entry_fp_operand, Immediate(0));
|
||||
|
@ -1094,7 +1094,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ mov(edx, Immediate(isolate()->factory()->the_hole_value()));
|
||||
Label okay;
|
||||
ExternalReference pending_exception_address(
|
||||
Isolate::kPendingExceptionAddress, isolate());
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ cmp(edx, Operand::StaticVariable(pending_exception_address));
|
||||
// Cannot use check here as it attempts to generate call into runtime.
|
||||
__ j(equal, &okay, Label::kNear);
|
||||
@ -1111,15 +1111,15 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(&exception_returned);
|
||||
|
||||
ExternalReference pending_handler_context_address(
|
||||
Isolate::kPendingHandlerContextAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerContextAddress, isolate());
|
||||
ExternalReference pending_handler_code_address(
|
||||
Isolate::kPendingHandlerCodeAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerCodeAddress, isolate());
|
||||
ExternalReference pending_handler_offset_address(
|
||||
Isolate::kPendingHandlerOffsetAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerOffsetAddress, isolate());
|
||||
ExternalReference pending_handler_fp_address(
|
||||
Isolate::kPendingHandlerFPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerFPAddress, isolate());
|
||||
ExternalReference pending_handler_sp_address(
|
||||
Isolate::kPendingHandlerSPAddress, isolate());
|
||||
IsolateAddressId::kPendingHandlerSPAddress, isolate());
|
||||
|
||||
// Ask the runtime for help to determine the handler. This will set eax to
|
||||
// contain the current pending exception, don't clobber it.
|
||||
@ -1179,7 +1179,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
// Push marker in two places.
|
||||
int marker = type();
|
||||
__ push(Immediate(Smi::FromInt(marker))); // marker
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
__ push(Operand::StaticVariable(context_address)); // context
|
||||
// Save callee-saved registers (C calling conventions).
|
||||
__ push(edi);
|
||||
@ -1187,11 +1188,11 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ push(ebx);
|
||||
|
||||
// Save copies of the top frame descriptor on the stack.
|
||||
ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference c_entry_fp(IsolateAddressId::kCEntryFPAddress, isolate());
|
||||
__ push(Operand::StaticVariable(c_entry_fp));
|
||||
|
||||
// If this is the outermost JS call, set js_entry_sp value.
|
||||
ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
|
||||
ExternalReference js_entry_sp(IsolateAddressId::kJSEntrySPAddress, isolate());
|
||||
__ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0));
|
||||
__ j(not_equal, ¬_outermost_js, Label::kNear);
|
||||
__ mov(Operand::StaticVariable(js_entry_sp), ebp);
|
||||
@ -1207,8 +1208,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
handler_offset_ = handler_entry.pos();
|
||||
// Caught exception: Store result (exception) in the pending exception
|
||||
// field in the JSEnv and return a failure sentinel.
|
||||
ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
|
||||
isolate());
|
||||
ExternalReference pending_exception(
|
||||
IsolateAddressId::kPendingExceptionAddress, isolate());
|
||||
__ mov(Operand::StaticVariable(pending_exception), eax);
|
||||
__ mov(eax, Immediate(isolate()->factory()->exception()));
|
||||
__ jmp(&exit);
|
||||
@ -1248,8 +1249,8 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
||||
__ bind(¬_outermost_js_2);
|
||||
|
||||
// Restore the top frame descriptor from the stack.
|
||||
__ pop(Operand::StaticVariable(ExternalReference(
|
||||
Isolate::kCEntryFPAddress, isolate())));
|
||||
__ pop(Operand::StaticVariable(
|
||||
ExternalReference(IsolateAddressId::kCEntryFPAddress, isolate())));
|
||||
|
||||
// Restore callee-saved registers (C calling conventions).
|
||||
__ pop(ebx);
|
||||
|
@ -198,7 +198,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
|
||||
__ pushad();
|
||||
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
__ mov(Operand::StaticVariable(c_entry_fp_address), ebp);
|
||||
|
||||
// GP registers are safe to use now.
|
||||
|
@ -919,9 +919,12 @@ void MacroAssembler::EnterExitFramePrologue(StackFrame::Type frame_type) {
|
||||
push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot.
|
||||
|
||||
// Save the frame pointer and the context in top.
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference c_function_address(Isolate::kCFunctionAddress, isolate());
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
ExternalReference c_function_address(IsolateAddressId::kCFunctionAddress,
|
||||
isolate());
|
||||
mov(Operand::StaticVariable(c_entry_fp_address), ebp);
|
||||
mov(Operand::StaticVariable(context_address), esi);
|
||||
mov(Operand::StaticVariable(c_function_address), ebx);
|
||||
@ -999,7 +1002,8 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, bool pop_arguments) {
|
||||
|
||||
void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
|
||||
// Restore current context from top and clear it in debug mode.
|
||||
ExternalReference context_address(Isolate::kContextAddress, isolate());
|
||||
ExternalReference context_address(IsolateAddressId::kContextAddress,
|
||||
isolate());
|
||||
if (restore_context) {
|
||||
mov(esi, Operand::StaticVariable(context_address));
|
||||
}
|
||||
@ -1008,7 +1012,7 @@ void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) {
|
||||
#endif
|
||||
|
||||
// Clear the top frame.
|
||||
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
|
||||
ExternalReference c_entry_fp_address(IsolateAddressId::kCEntryFPAddress,
|
||||
isolate());
|
||||
mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0));
|
||||
}
|
||||
@ -1028,7 +1032,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
|
||||
// Link the current handler as the next handler.
|
||||
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
||||
ExternalReference handler_address(IsolateAddressId::kHandlerAddress,
|
||||
isolate());
|
||||
push(Operand::StaticVariable(handler_address));
|
||||
|
||||
// Set this new handler as the current one.
|
||||
@ -1038,7 +1043,8 @@ void MacroAssembler::PushStackHandler() {
|
||||
|
||||
void MacroAssembler::PopStackHandler() {
|
||||
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
|
||||
ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
|
||||
ExternalReference handler_address(IsolateAddressId::kHandlerAddress,
|
||||
isolate());
|
||||
pop(Operand::StaticVariable(handler_address));
|
||||
add(esp, Immediate(StackHandlerConstants::kSize - kPointerSize));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user