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

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

Issue 1261863002: [runtime] DeclareGlobals and DeclareLookupSlot don't need context parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix x64 typo. 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/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ia32/full-codegen-ia32.cc
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc
index 6652c92e9fd2f0a9dbdf1d48bab44a3ae11031bb..d14939b337d95c9271fae5baf1549a8c9da3bfc1 100644
--- a/src/full-codegen/ia32/full-codegen-ia32.cc
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc
@@ -809,13 +809,9 @@ void FullCodeGenerator::VisitVariableDeclaration(
case VariableLocation::LOOKUP: {
Comment cmnt(masm_, "[ VariableDeclaration");
- __ push(esi);
__ push(Immediate(variable->name()));
// VariableDeclaration nodes are always introduced in one of four modes.
DCHECK(IsDeclaredVariableMode(mode));
- PropertyAttributes attr =
- IsImmutableVariableMode(mode) ? READ_ONLY : NONE;
- __ push(Immediate(Smi::FromInt(attr)));
// Push initial value, if any.
// Note: For variables we must not push an initial value (such as
// 'undefined') because we may have a (legal) redeclaration and we
@@ -825,7 +821,10 @@ void FullCodeGenerator::VisitVariableDeclaration(
} else {
__ push(Immediate(Smi::FromInt(0))); // Indicates no initial value.
}
- __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
+ __ CallRuntime(IsImmutableVariableMode(mode)
+ ? Runtime::kDeclareReadOnlyLookupSlot
+ : Runtime::kDeclareLookupSlot,
+ 2);
break;
}
}
@@ -875,11 +874,9 @@ void FullCodeGenerator::VisitFunctionDeclaration(
case VariableLocation::LOOKUP: {
Comment cmnt(masm_, "[ FunctionDeclaration");
- __ push(esi);
__ push(Immediate(variable->name()));
- __ push(Immediate(Smi::FromInt(NONE)));
VisitForStackValue(declaration->fun());
- __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
+ __ CallRuntime(Runtime::kDeclareLookupSlot, 2);
break;
}
}
@@ -888,10 +885,9 @@ void FullCodeGenerator::VisitFunctionDeclaration(
void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
// Call the runtime to declare the globals.
- __ push(esi); // The context is the first argument.
__ Push(pairs);
__ Push(Smi::FromInt(DeclareGlobalsFlags()));
- __ CallRuntime(Runtime::kDeclareGlobals, 3);
+ __ CallRuntime(Runtime::kDeclareGlobals, 2);
// Return value is ignored.
}
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698