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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 8329005: Replace calls to Class::IsParameterized() by either (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
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 502)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -859,7 +859,7 @@
// the type arguments of the instantiator.
const Class& cls = Class::Handle(function.signature_class());
ASSERT(!cls.IsNull());
- const bool is_cls_parameterized = cls.IsParameterized();
+ const bool is_cls_parameterized = cls.NumTypeArguments() > 0;
if (is_cls_parameterized) {
ASSERT(!function.IsImplicitStaticClosureFunction());
GenerateInstantiatorTypeArguments();
@@ -1379,7 +1379,7 @@
// checking whether the tested instance is a Smi.
if (type.IsInstantiated()) {
const Class& type_class = Class::ZoneHandle(type.type_class());
- const bool is_type_class_parameterized = type_class.IsParameterized();
+ const bool is_type_class_parameterized = type_class.NumTypeArguments() > 0;
// A Smi object cannot be the instance of a parameterized class.
// A class equality check is only applicable to a non-parameterized class.
// TODO(regis): Should we still inline a Smi type check when checking for a
@@ -1498,7 +1498,8 @@
// checking whether the assigned instance is a Smi.
if (dst_type.IsInstantiated()) {
const Class& dst_type_class = Class::ZoneHandle(dst_type.type_class());
- const bool is_dst_type_parameterized = dst_type_class.IsParameterized();
+ const bool is_dst_type_parameterized =
+ dst_type_class.NumTypeArguments() > 0;
// A Smi object cannot be the instance of a parameterized class.
// A class equality check is only applicable to a non-parameterized class.
if (!is_dst_type_parameterized) {
@@ -2266,7 +2267,7 @@
void CodeGenerator::VisitConstructorCallNode(ConstructorCallNode* node) {
const Class& cls = Class::ZoneHandle(node->constructor().owner());
- const bool is_cls_parameterized = cls.IsParameterized();
+ const bool is_cls_parameterized = cls.NumTypeArguments() > 0;
GenerateTypeArguments(node, is_cls_parameterized);
if (node->constructor().IsFactory()) {
// The top of stack is an instantiated TypeArguments object (or null).

Powered by Google App Engine
This is Rietveld 408576698