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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 2061173002: [cleanup] Remove dead code from DeclareLookupSlot and rename it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Extend context DCHECK Created 4 years, 6 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/full-codegen/x64/full-codegen-x64.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 2b9357144eac55bc94072230d6080db0fb275d60..a5e1dfb387822d2f35482fe1012653ab739e3166 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -763,16 +763,12 @@ void BytecodeGenerator::VisitVariableDeclaration(VariableDeclaration* decl) {
register_allocator()->PrepareForConsecutiveAllocations(3);
Michael Starzinger 2016/06/14 11:11:37 nit: s/3/2/ here, only two consecutive register ne
adamk 2016/06/14 11:23:07 Done.
Register name = register_allocator()->NextConsecutiveRegister();
Register init_value = register_allocator()->NextConsecutiveRegister();
- Register attributes = register_allocator()->NextConsecutiveRegister();
builder()->LoadLiteral(variable->name()).StoreAccumulatorInRegister(name);
builder()
->LoadLiteral(Smi::FromInt(0))
- .StoreAccumulatorInRegister(init_value);
- builder()
- ->LoadLiteral(Smi::FromInt(variable->DeclarationPropertyAttributes()))
- .StoreAccumulatorInRegister(attributes)
- .CallRuntime(Runtime::kDeclareLookupSlot, name, 3);
+ .StoreAccumulatorInRegister(init_value)
+ .CallRuntime(Runtime::kDeclareLookupSlot, name, 2);
break;
}
}
@@ -811,15 +807,11 @@ void BytecodeGenerator::VisitFunctionDeclaration(FunctionDeclaration* decl) {
register_allocator()->PrepareForConsecutiveAllocations(3);
Michael Starzinger 2016/06/14 11:11:37 nit: Likewise s/3/2/ here.
adamk 2016/06/14 11:23:07 Done.
Register name = register_allocator()->NextConsecutiveRegister();
Register literal = register_allocator()->NextConsecutiveRegister();
- Register attributes = register_allocator()->NextConsecutiveRegister();
builder()->LoadLiteral(variable->name()).StoreAccumulatorInRegister(name);
VisitForAccumulatorValue(decl->fun());
- builder()
- ->StoreAccumulatorInRegister(literal)
- .LoadLiteral(Smi::FromInt(variable->DeclarationPropertyAttributes()))
- .StoreAccumulatorInRegister(attributes)
- .CallRuntime(Runtime::kDeclareLookupSlot, name, 3);
+ builder()->StoreAccumulatorInRegister(literal).CallRuntime(
+ Runtime::kDeclareLookupSlot, name, 2);
}
}
}
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698