Commit 817a5c0a authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "[Interpreter] Unify approach to building interpreter handler and Turbofan stubs."

This reverts commit a79f9031.

Reason for revert: Need to revert:
https://chromium-review.googlesource.com/c/463287/

Original change's description:
> [Interpreter] Unify approach to building interpreter handler and Turbofan stubs.
> 
> Moves interpreter-generator.cc to a similar model of building handlers as
> Turbofan stubs elsewhere, to simplify moving code between stubs / builtins and
> bytecode handlers. This removes the "__" hack from the Interpreter generator
> code.
> 
> Also make SetBytecodeOffset private to InterpreterAssembler and make 
> LdaImmutable[Current]ContextSlot and Lda[Current]ContextSlot share
> handlers since they are identical.
> 
> Change-Id: I9e91e7d37c2ea75513e4dcc3b95b4bb6517f83da
> Reviewed-on: https://chromium-review.googlesource.com/471987
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44534}

TBR=rmcilroy@chromium.org,jkummerow@chromium.org,leszeks@chromium.org,ishell@chromium.org,cbruni@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5c72a8a20ab6b8fd862427e1703c883fa484a2c1
Reviewed-on: https://chromium-review.googlesource.com/474745Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44547}
parent f7b61ca6
......@@ -54,10 +54,6 @@ InterpreterAssembler::InterpreterAssembler(CodeAssemblerState* state,
}
RegisterCallGenerationCallbacks([this] { CallPrologue(); },
[this] { CallEpilogue(); });
if (Bytecodes::MakesCallAlongCriticalPath(bytecode)) {
SaveBytecodeOffset();
}
}
InterpreterAssembler::~InterpreterAssembler() {
......
......@@ -228,6 +228,9 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// Returns the offset from the BytecodeArrayPointer of the current bytecode.
compiler::Node* BytecodeOffset();
// Save the bytecode offset to the interpreter frame.
void SaveBytecodeOffset();
protected:
Bytecode bytecode() const { return bytecode_; }
static bool TargetSupportsUnalignedAccess();
......@@ -303,9 +306,6 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
// JumpIfWordNotEqual.
void JumpConditional(compiler::Node* condition, compiler::Node* jump_offset);
// Save the bytecode offset to the interpreter frame.
void SaveBytecodeOffset();
// Updates and returns BytecodeOffset() advanced by the current bytecode's
// size. Traces the exit of the current bytecode.
compiler::Node* Advance();
......
This diff is collapsed.
......@@ -52,24 +52,7 @@ void SetupInterpreter::InstallBytecodeHandlers(Interpreter* interpreter) {
bool SetupInterpreter::ReuseExistingHandler(Address* dispatch_table,
Bytecode bytecode,
OperandScale operand_scale) {
size_t index = Interpreter::GetDispatchTableIndex(bytecode, operand_scale);
switch (bytecode) {
case Bytecode::kLdaImmutableContextSlot:
STATIC_ASSERT(static_cast<int>(Bytecode::kLdaContextSlot) <
static_cast<int>(Bytecode::kLdaImmutableContextSlot));
dispatch_table[index] = dispatch_table[Interpreter::GetDispatchTableIndex(
Bytecode::kLdaContextSlot, operand_scale)];
return true;
case Bytecode::kLdaImmutableCurrentContextSlot:
STATIC_ASSERT(
static_cast<int>(Bytecode::kLdaCurrentContextSlot) <
static_cast<int>(Bytecode::kLdaImmutableCurrentContextSlot));
dispatch_table[index] = dispatch_table[Interpreter::GetDispatchTableIndex(
Bytecode::kLdaCurrentContextSlot, operand_scale)];
return true;
default:
return false;
}
// TODO(leszeks): reuse Lda[Immutable][Current]ContextSlot
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment