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

Unified Diff: src/compiler/bytecode-graph-builder.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/compiler/bytecode-graph-builder.h ('k') | src/interpreter/bytecode-peephole-optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index b5b077e6ed7491c25091d1638ce1d0ed132748c2..93df3799c5b89ec97af403c857e037af62f4fa70 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -708,11 +708,6 @@ void BytecodeGraphBuilder::VisitLdaUndefined() {
environment()->BindAccumulator(node);
}
-void BytecodeGraphBuilder::VisitLdrUndefined() {
- Node* node = jsgraph()->UndefinedConstant();
- environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), node);
-}
-
void BytecodeGraphBuilder::VisitLdaNull() {
Node* node = jsgraph()->NullConstant();
environment()->BindAccumulator(node);
@@ -767,14 +762,6 @@ void BytecodeGraphBuilder::VisitLdaGlobal() {
environment()->BindAccumulator(node, Environment::kAttachFrameState);
}
-void BytecodeGraphBuilder::VisitLdrGlobal() {
- PrepareEagerCheckpoint();
- Node* node = BuildLoadGlobal(bytecode_iterator().GetIndexOperand(0),
- TypeofMode::NOT_INSIDE_TYPEOF);
- environment()->BindRegister(bytecode_iterator().GetRegisterOperand(1), node,
- Environment::kAttachFrameState);
-}
-
void BytecodeGraphBuilder::VisitLdaGlobalInsideTypeof() {
PrepareEagerCheckpoint();
Node* node = BuildLoadGlobal(bytecode_iterator().GetIndexOperand(0),
@@ -803,7 +790,7 @@ void BytecodeGraphBuilder::VisitStaGlobalStrict() {
BuildStoreGlobal(LanguageMode::STRICT);
}
-Node* BytecodeGraphBuilder::BuildLoadContextSlot() {
+void BytecodeGraphBuilder::VisitLdaContextSlot() {
// TODO(mythria): immutable flag is also set to false. This information is not
// available in bytecode array. update this code when the implementation
// changes.
@@ -812,39 +799,21 @@ Node* BytecodeGraphBuilder::BuildLoadContextSlot() {
bytecode_iterator().GetIndexOperand(1), false);
Node* context =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
- return NewNode(op, context);
+ Node* node = NewNode(op, context);
+ environment()->BindAccumulator(node);
}
-Node* BytecodeGraphBuilder::BuildLoadCurrentContextSlot() {
+void BytecodeGraphBuilder::VisitLdaCurrentContextSlot() {
// TODO(mythria): immutable flag is also set to false. This information is not
// available in bytecode array. update this code when the implementation
// changes.
const Operator* op = javascript()->LoadContext(
0, bytecode_iterator().GetIndexOperand(0), false);
Node* context = environment()->Context();
- return NewNode(op, context);
-}
-
-void BytecodeGraphBuilder::VisitLdaContextSlot() {
- Node* node = BuildLoadContextSlot();
+ Node* node = NewNode(op, context);
environment()->BindAccumulator(node);
}
-void BytecodeGraphBuilder::VisitLdaCurrentContextSlot() {
- Node* node = BuildLoadCurrentContextSlot();
- environment()->BindAccumulator(node);
-}
-
-void BytecodeGraphBuilder::VisitLdrContextSlot() {
- Node* node = BuildLoadContextSlot();
- environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3), node);
-}
-
-void BytecodeGraphBuilder::VisitLdrCurrentContextSlot() {
- Node* node = BuildLoadCurrentContextSlot();
- environment()->BindRegister(bytecode_iterator().GetRegisterOperand(1), node);
-}
-
void BytecodeGraphBuilder::VisitStaContextSlot() {
const Operator* op = javascript()->StoreContext(
bytecode_iterator().GetUnsignedImmediateOperand(2),
« no previous file with comments | « src/compiler/bytecode-graph-builder.h ('k') | src/interpreter/bytecode-peephole-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698