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

Unified Diff: src/interpreter/interpreter-assembler.cc

Issue 1887493004: [Interpreter] No longer require context machine register in bytecode handlers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_dispatch
Patch Set: Fix x87 Created 4 years, 8 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/interpreter/interpreter-assembler.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter-assembler.cc
diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc
index f5961b7e53a0d83aa2474b564f4cd63dcf8f0d48..75db96a9dc16643d2ee7726b3f25b9fa7c5b8dc6 100644
--- a/src/interpreter/interpreter-assembler.cc
+++ b/src/interpreter/interpreter-assembler.cc
@@ -33,13 +33,11 @@ InterpreterAssembler::InterpreterAssembler(Isolate* isolate, Zone* zone,
operand_scale_(operand_scale),
accumulator_(this, MachineRepresentation::kTagged),
accumulator_use_(AccumulatorUse::kNone),
- context_(this, MachineRepresentation::kTagged),
bytecode_array_(this, MachineRepresentation::kTagged),
disable_stack_check_across_call_(false),
stack_pointer_before_call_(nullptr) {
accumulator_.Bind(
Parameter(InterpreterDispatchDescriptor::kAccumulatorParameter));
- context_.Bind(Parameter(InterpreterDispatchDescriptor::kContextParameter));
bytecode_array_.Bind(
Parameter(InterpreterDispatchDescriptor::kBytecodeArrayParameter));
if (FLAG_trace_ignition) {
@@ -70,11 +68,12 @@ void InterpreterAssembler::SetAccumulator(Node* value) {
accumulator_.Bind(value);
}
-Node* InterpreterAssembler::GetContext() { return context_.value(); }
+Node* InterpreterAssembler::GetContext() {
+ return LoadRegister(Register::current_context());
+}
void InterpreterAssembler::SetContext(Node* value) {
StoreRegister(value, Register::current_context());
- context_.Bind(value);
}
Node* InterpreterAssembler::BytecodeOffset() {
@@ -103,7 +102,7 @@ Node* InterpreterAssembler::LoadRegister(int offset) {
}
Node* InterpreterAssembler::LoadRegister(Register reg) {
- return LoadRegister(IntPtrConstant(-reg.index()));
+ return LoadRegister(-reg.index() << kPointerSizeLog2);
}
Node* InterpreterAssembler::RegisterFrameOffset(Node* index) {
@@ -581,8 +580,8 @@ void InterpreterAssembler::DispatchToBytecodeHandlerEntry(
InterpreterDispatchDescriptor descriptor(isolate());
Node* args[] = {GetAccumulatorUnchecked(), RegisterFileRawPointer(),
- bytecode_offset, BytecodeArrayTaggedPointer(),
- DispatchTableRawPointer(), GetContext()};
+ bytecode_offset, BytecodeArrayTaggedPointer(),
+ DispatchTableRawPointer()};
TailCallBytecodeDispatch(descriptor, handler_entry, args);
}
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698