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

Unified Diff: runtime/vm/parser.cc

Issue 2755723003: Make sure the signature of the call method is finalized before involving it (Closed)
Patch Set: Created 3 years, 9 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') | tests/language/language_analyzer2.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 210e9a6642b58f6bec4fa48902dbb57e8eca3b5b..a1b5c73528b189f07185d76fe5aa556489569503 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -12503,11 +12503,9 @@ RawAbstractType* Parser::CanonicalizeType(const AbstractType& type) {
// use the class scope of the class from which the function originates.
if (current_class().IsMixinApplication()) {
return ClassFinalizer::FinalizeType(
- Class::Handle(Z, parsed_function()->function().origin()), type,
- ClassFinalizer::kCanonicalize);
+ Class::Handle(Z, parsed_function()->function().origin()), type);
}
- return ClassFinalizer::FinalizeType(current_class(), type,
- ClassFinalizer::kCanonicalize);
+ return ClassFinalizer::FinalizeType(current_class(), type);
}
@@ -12556,8 +12554,7 @@ const AbstractType* Parser::ReceiverType(const Class& cls) {
type = Type::New(cls, TypeArguments::Handle(Z, cls.type_parameters()),
cls.token_pos(), Heap::kOld);
if (cls.is_type_finalized()) {
- type ^= ClassFinalizer::FinalizeType(
- cls, type, ClassFinalizer::kCanonicalizeWellFormed);
+ type ^= ClassFinalizer::FinalizeType(cls, type);
// Note that the receiver type may now be a malbounded type.
cls.SetCanonicalType(type);
}
@@ -13955,7 +13952,7 @@ void Parser::ParseConstructorClosurization(Function* constructor,
(la3 == Token::kLT) || (la3 == Token::kPERIOD) || (la3 == Token::kHASH);
LibraryPrefix& prefix = LibraryPrefix::ZoneHandle(Z);
AbstractType& type =
- AbstractType::Handle(Z, ParseType(ClassFinalizer::kCanonicalizeWellFormed,
+ AbstractType::Handle(Z, ParseType(ClassFinalizer::kCanonicalize,
true, // allow deferred type
consume_unresolved_prefix, &prefix));
// A constructor tear-off closure can only have been created for a
@@ -14018,7 +14015,7 @@ AstNode* Parser::ParseNewOperator(Token::Kind op_kind) {
LibraryPrefix& prefix = LibraryPrefix::ZoneHandle(Z);
AbstractType& type = AbstractType::ZoneHandle(
- Z, ParseType(ClassFinalizer::kCanonicalizeWellFormed, allow_deferred_type,
+ Z, ParseType(ClassFinalizer::kCanonicalize, allow_deferred_type,
consume_unresolved_prefix, &prefix));
if (FLAG_load_deferred_eagerly && !prefix.IsNull() &&
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/language/language_analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698