Index: src/interpreter/bytecode-generator.cc |
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc |
index c8b0eedbe204c9b748736512ed825cd3a7852103..1d6532c8eb5127ba1126bee3fb4e4673bf532b62 100644 |
--- a/src/interpreter/bytecode-generator.cc |
+++ b/src/interpreter/bytecode-generator.cc |
@@ -1783,13 +1783,10 @@ |
case VariableLocation::GLOBAL: |
case VariableLocation::UNALLOCATED: { |
// Global var, let, const or variables not explicitly declared. |
- Register native_context = execution_result()->NewRegister(); |
Register global_object = execution_result()->NewRegister(); |
builder() |
->LoadContextSlot(execution_context()->reg(), |
- Context::NATIVE_CONTEXT_INDEX) |
- .StoreAccumulatorInRegister(native_context) |
- .LoadContextSlot(native_context, Context::EXTENSION_INDEX) |
+ Context::GLOBAL_OBJECT_INDEX) |
.StoreAccumulatorInRegister(global_object) |
.LoadLiteral(variable->name()) |
.Delete(global_object, language_mode()); |