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

Unified Diff: runtime/vm/parser.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/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 502)
+++ runtime/vm/parser.cc (working copy)
@@ -579,7 +579,7 @@
// The instantiator may be required at run time for generic type checks or
// allocation of generic types.
- if (parser.current_class().IsParameterized() &&
+ if ((parser.current_class().NumTypeParameters() > 0) &&
(!parser.current_function().is_static() ||
parser.current_function().IsInFactoryScope())) {
// In the case of a local function, only set the instantiator if the
@@ -1128,7 +1128,7 @@
// instantiator.
if (current_block_->scope->function_level() > 0) {
const Class& signature_class = Class::Handle(func.signature_class());
- if (signature_class.IsParameterized()) {
+ if (signature_class.NumTypeParameters() > 0) {
CaptureReceiver();
}
}
@@ -1605,7 +1605,7 @@
(current_block_->scope->function_level() > 0)) {
// We are parsing, but not compiling, a local function.
// The instantiator may be required at run time for generic type checks.
- if (current_class().IsParameterized() &&
+ if ((current_class().NumTypeParameters() > 0) &&
(!current_function().is_static() ||
current_function().IsInFactoryScope())) {
// Make sure that the receiver of the enclosing instance function
@@ -3436,7 +3436,7 @@
ASSERT(current_class().is_finalized());
// Make sure that the instantiator is captured.
- if (signature_class.IsParameterized() &&
+ if ((signature_class.NumTypeParameters() > 0) &&
(current_block_->scope->function_level() > 0)) {
CaptureReceiver();
}
« runtime/vm/object.h ('K') | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698