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

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

Issue 1419823003: Remove support for "loads and stores to global vars through property cell shortcuts inst… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@disable-shortcuts
Patch Set: Addressing comments Created 5 years, 2 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/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('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 351b4750c63c7dafcec123f85c6f43c9fff9b8a6..9c82b4702eaa19846bfe820fd38734d8b6eab5fc 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -937,16 +937,7 @@ void BytecodeGenerator::VisitVariableLoad(Variable* variable,
execution_result()->SetResultInRegister(source);
break;
}
- case VariableLocation::GLOBAL: {
- // Global var, const, or let variable.
- // TODO(rmcilroy): If context chain depth is short enough, do this using
- // a generic version of LoadGlobalViaContextStub rather than calling the
- // runtime.
- DCHECK(variable->IsStaticGlobalObjectProperty());
- builder()->LoadGlobal(variable->index());
- execution_result()->SetResultInAccumulator();
- break;
- }
+ case VariableLocation::GLOBAL:
case VariableLocation::UNALLOCATED: {
TemporaryRegisterScope temporary_register_scope(builder());
Register obj = temporary_register_scope.NewRegister();
@@ -994,15 +985,7 @@ void BytecodeGenerator::VisitVariableAssignment(Variable* variable,
RecordStoreToRegister(destination);
break;
}
- case VariableLocation::GLOBAL: {
- // Global var, const, or let variable.
- // TODO(rmcilroy): If context chain depth is short enough, do this using
- // a generic version of LoadGlobalViaContextStub rather than calling the
- // runtime.
- DCHECK(variable->IsStaticGlobalObjectProperty());
- builder()->StoreGlobal(variable->index(), language_mode());
- break;
- }
+ case VariableLocation::GLOBAL:
case VariableLocation::UNALLOCATED: {
Register value = execution_result()->NewRegister();
Register obj = execution_result()->NewRegister();
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698