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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 8347008: Address review comments of previously submitted cl 8329005. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 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 | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 522)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -1258,9 +1258,9 @@
const bool is_implicit_instance_closure =
func.IsImplicitInstanceClosureFunction();
const Class& cls = Class::ZoneHandle(func.signature_class());
- const bool is_cls_parameterized = cls.NumTypeArguments() > 0;
+ const bool has_type_arguments = cls.HasTypeArguments();
const intptr_t kTypeArgumentsOffset = 1 * kWordSize;
- const intptr_t kReceiverOffset = (is_cls_parameterized ? 2 : 1) * kWordSize;
+ const intptr_t kReceiverOffset = (has_type_arguments ? 2 : 1) * kWordSize;
const intptr_t closure_size = Closure::InstanceSize();
const intptr_t context_size = Context::InstanceSize(1); // Captured receiver.
if (FLAG_inline_alloc &&
@@ -1334,7 +1334,7 @@
}
// Set the type arguments field in the newly allocated closure.
- if (is_cls_parameterized) {
+ if (has_type_arguments) {
ASSERT(!is_implicit_static_closure);
// Use the passed-in type arguments.
__ movl(EDX, Address(ESP, kTypeArgumentsOffset));
@@ -1353,7 +1353,7 @@
__ Bind(&slow_case);
}
- if (is_cls_parameterized) {
+ if (has_type_arguments) {
__ movl(ECX, Address(ESP, kTypeArgumentsOffset));
}
if (is_implicit_instance_closure) {
@@ -1364,7 +1364,7 @@
const Closure& new_closure = Closure::ZoneHandle();
__ PushObject(new_closure); // Push Null closure for return value.
__ PushObject(func);
- if (is_cls_parameterized) {
+ if (has_type_arguments) {
__ pushl(ECX); // Push type arguments of closure to be allocated.
} else {
__ pushl(raw_null); // Push null type arguments.
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698