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

Unified Diff: runtime/vm/parser.cc

Issue 1914293002: Cleanup some handle creation code, was showing up in the CompileAll testing that we are doing with … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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') | runtime/vm/raw_object.h » ('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 14446d997566b961a762f96e7cb7dd5bff590864..6404df4bee3b3fa0947912b8d93a6fe28930b167 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -11832,7 +11832,7 @@ void Parser::ResolveTypeFromClass(const Class& scope_class,
}
// A type parameter cannot be parameterized, so make the type
// malformed if type arguments have previously been parsed.
- if (!TypeArguments::Handle(Z, type->arguments()).IsNull()) {
+ if (type->arguments() != TypeArguments::null()) {
*type = ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(Z), // No previous error.
script_,
@@ -11873,12 +11873,13 @@ void Parser::ResolveTypeFromClass(const Class& scope_class,
}
}
// Resolve type arguments, if any.
- const TypeArguments& arguments = TypeArguments::Handle(Z, type->arguments());
- if (!arguments.IsNull()) {
+ if (type->arguments() != TypeArguments::null()) {
+ const TypeArguments& arguments =
+ TypeArguments::Handle(Z, type->arguments());
const intptr_t num_arguments = arguments.Length();
+ AbstractType& type_argument = AbstractType::Handle(Z);
for (intptr_t i = 0; i < num_arguments; i++) {
- AbstractType& type_argument = AbstractType::Handle(Z,
- arguments.TypeAt(i));
+ type_argument ^= arguments.TypeAt(i);
ResolveTypeFromClass(scope_class, finalization, &type_argument);
arguments.SetTypeAt(i, type_argument);
}
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698