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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 10448079: Address review comments in commited cl (issue 10460002). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 8143)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -792,6 +792,8 @@
void CodeGenerator::VisitClosureNode(ClosureNode* node) {
+ const Immediate raw_null =
+ Immediate(reinterpret_cast<intptr_t>(Object::null()));
const Function& function = node->function();
if (function.IsNonImplicitClosureFunction()) {
// The context scope may have already been set by the new non-optimizing
@@ -803,8 +805,11 @@
ASSERT(!function.HasCode());
function.set_context_scope(context_scope);
}
+ __ pushl(raw_null); // No receiver.
} else if (function.IsImplicitInstanceClosureFunction()) {
node->receiver()->Visit(this);
+ } else {
+ __ pushl(raw_null); // No receiver.
}
ASSERT(function.context_scope() != ContextScope::null());
@@ -817,17 +822,15 @@
ASSERT(!function.IsImplicitStaticClosureFunction());
const bool kPushInstantiator = false;
GenerateInstantiatorTypeArguments(node->token_index(), kPushInstantiator);
+ } else {
+ __ pushl(raw_null); // No type arguments.
}
const Code& stub = Code::Handle(
StubCode::GetAllocationStubForClosure(function));
const ExternalLabel label(function.ToCString(), stub.EntryPoint());
GenerateCall(node->token_index(), &label, PcDescriptors::kOther);
- if (requires_type_arguments) {
- __ popl(ECX); // Pop type arguments.
- }
- if (function.IsImplicitInstanceClosureFunction()) {
- __ popl(ECX); // Pop receiver.
- }
+ __ popl(ECX); // Pop type arguments.
+ __ popl(ECX); // Pop receiver.
if (IsResultNeeded(node)) {
__ pushl(EAX);
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698