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

Unified Diff: src/interpreter/interpreter.cc

Issue 2489513005: [Interpreter] Remove all Ldr style bytecodes and replace with Star lookahead. (Closed)
Patch Set: Created 4 years, 1 month 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.h ('k') | src/interpreter/mkpeephole.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 9b6662eeba69b99a80accd162fe29957611e5f86..81aecafecfdfbba9b465c7f54b6f1b685f6bf5e7 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -352,17 +352,6 @@ void Interpreter::DoLdaUndefined(InterpreterAssembler* assembler) {
__ Dispatch();
}
-// LdrUndefined <reg>
-//
-// Loads undefined into the accumulator and |reg|.
-void Interpreter::DoLdrUndefined(InterpreterAssembler* assembler) {
- Node* undefined_value =
- __ HeapConstant(isolate_->factory()->undefined_value());
- Node* destination = __ BytecodeOperandReg(0);
- __ StoreRegister(undefined_value, destination);
- __ Dispatch();
-}
-
// LdaNull
//
// Load Null into the accumulator.
@@ -460,23 +449,6 @@ void Interpreter::DoLdaGlobal(InterpreterAssembler* assembler) {
__ Dispatch();
}
-// LdrGlobal <slot> <reg>
-//
-// Load the global with name in constant pool entry <name_index> into
-// register <reg> using FeedBackVector slot <slot> outside of a typeof.
-void Interpreter::DoLdrGlobal(InterpreterAssembler* assembler) {
- Callable ic =
- CodeFactory::LoadGlobalICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF);
-
- Node* context = __ GetContext();
-
- Node* raw_slot = __ BytecodeOperandIdx(0);
- Node* result = BuildLoadGlobal(ic, context, raw_slot, assembler);
- Node* destination = __ BytecodeOperandReg(1);
- __ StoreRegister(result, destination);
- __ Dispatch();
-}
-
// LdaGlobalInsideTypeof <slot>
//
// Load the global with name in constant pool entry <name_index> into the
@@ -534,29 +506,17 @@ void Interpreter::DoStaGlobalStrict(InterpreterAssembler* assembler) {
DoStaGlobal(ic, assembler);
}
-compiler::Node* Interpreter::BuildLoadContextSlot(
- InterpreterAssembler* assembler) {
- Node* reg_index = __ BytecodeOperandReg(0);
- Node* context = __ LoadRegister(reg_index);
- Node* slot_index = __ BytecodeOperandIdx(1);
- Node* depth = __ BytecodeOperandUImm(2);
- Node* slot_context = __ GetContextAtDepth(context, depth);
- return __ LoadContextElement(slot_context, slot_index);
-}
-
-compiler::Node* Interpreter::BuildLoadCurrentContextSlot(
- InterpreterAssembler* assembler) {
- Node* slot_index = __ BytecodeOperandIdx(0);
- Node* slot_context = __ GetContext();
- return __ LoadContextElement(slot_context, slot_index);
-}
-
// LdaContextSlot <context> <slot_index> <depth>
//
// Load the object in |slot_index| of the context at |depth| in the context
// chain starting at |context| into the accumulator.
void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) {
- Node* result = BuildLoadContextSlot(assembler);
+ Node* reg_index = __ BytecodeOperandReg(0);
+ Node* context = __ LoadRegister(reg_index);
+ Node* slot_index = __ BytecodeOperandIdx(1);
+ Node* depth = __ BytecodeOperandUImm(2);
+ Node* slot_context = __ GetContextAtDepth(context, depth);
+ Node* result = __ LoadContextElement(slot_context, slot_index);
__ SetAccumulator(result);
__ Dispatch();
}
@@ -565,32 +525,13 @@ void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) {
//
// Load the object in |slot_index| of the current context into the accumulator.
void Interpreter::DoLdaCurrentContextSlot(InterpreterAssembler* assembler) {
- Node* result = BuildLoadCurrentContextSlot(assembler);
+ Node* slot_index = __ BytecodeOperandIdx(0);
+ Node* slot_context = __ GetContext();
+ Node* result = __ LoadContextElement(slot_context, slot_index);
__ SetAccumulator(result);
__ Dispatch();
}
-// LdrContextSlot <context> <slot_index> <depth> <reg>
-//
-// Load the object in |slot_index| of the context at |depth| in the context
-// chain of |context| into register |reg|.
-void Interpreter::DoLdrContextSlot(InterpreterAssembler* assembler) {
- Node* result = BuildLoadContextSlot(assembler);
- Node* destination = __ BytecodeOperandReg(3);
- __ StoreRegister(result, destination);
- __ Dispatch();
-}
-
-// LdrCurrentContextSlot <slot_index> <reg>
-//
-// Load the object in |slot_index| of the current context into register |reg|.
-void Interpreter::DoLdrCurrentContextSlot(InterpreterAssembler* assembler) {
- Node* result = BuildLoadCurrentContextSlot(assembler);
- Node* destination = __ BytecodeOperandReg(1);
- __ StoreRegister(result, destination);
- __ Dispatch();
-}
-
// StaContextSlot <context> <slot_index> <depth>
//
// Stores the object in the accumulator into |slot_index| of the context at
« no previous file with comments | « src/interpreter/interpreter.h ('k') | src/interpreter/mkpeephole.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698