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

Unified Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1259963002: [stubs] Don't pass name to Load/StoreGlobalViaContext stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix rebase Created 5 years, 5 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/mips64/full-codegen-mips64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/x64/full-codegen-x64.cc
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc
index 3e1897806eaeb355ea83f438754c6d89c523359b..1839d2c22219417d0f26e865c2866ebe1c514e87 100644
--- a/src/full-codegen/x64/full-codegen-x64.cc
+++ b/src/full-codegen/x64/full-codegen-x64.cc
@@ -1369,18 +1369,15 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
if (var->IsGlobalSlot()) {
DCHECK(var->index() > 0);
DCHECK(var->IsStaticGlobalObjectProperty());
- // Each var occupies two slots in the context: for reads and writes.
int const slot = var->index();
int const depth = scope()->ContextChainLength(var->scope());
if (depth <= LoadGlobalViaContextStub::kMaximumDepth) {
__ Set(LoadGlobalViaContextDescriptor::SlotRegister(), slot);
- __ Move(LoadGlobalViaContextDescriptor::NameRegister(), var->name());
LoadGlobalViaContextStub stub(isolate(), depth);
__ CallStub(&stub);
} else {
__ Push(Smi::FromInt(slot));
- __ Push(var->name());
- __ CallRuntime(Runtime::kLoadGlobalViaContext, 2);
+ __ CallRuntime(Runtime::kLoadGlobalViaContext, 1);
}
} else {
@@ -2622,18 +2619,16 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
int const depth = scope()->ContextChainLength(var->scope());
if (depth <= StoreGlobalViaContextStub::kMaximumDepth) {
__ Set(StoreGlobalViaContextDescriptor::SlotRegister(), slot);
- __ Move(StoreGlobalViaContextDescriptor::NameRegister(), var->name());
DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(rax));
StoreGlobalViaContextStub stub(isolate(), depth, language_mode());
__ CallStub(&stub);
} else {
__ Push(Smi::FromInt(slot));
- __ Push(var->name());
__ Push(rax);
__ CallRuntime(is_strict(language_mode())
? Runtime::kStoreGlobalViaContext_Strict
: Runtime::kStoreGlobalViaContext_Sloppy,
- 3);
+ 2);
}
} else if (var->mode() == LET && op != Token::INIT_LET) {
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698