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

Unified Diff: runtime/vm/parser.cc

Issue 294943008: - Landing https://codereview.chromium.org/293963008/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/tags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 36443)
+++ runtime/vm/parser.cc (working copy)
@@ -381,7 +381,7 @@
Isolate* isolate = Isolate::Current();
ASSERT(isolate->long_jump_base()->IsSafeToJump());
TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
- VMTagScope tagScope(isolate, VMTag::kCompileTagId);
+ VMTagScope tagScope(isolate, VMTag::kCompileTopLevelTagId);
Parser parser(script, library, 0);
parser.ParseTopLevel();
}
@@ -730,7 +730,6 @@
void Parser::ParseClass(const Class& cls) {
if (!cls.is_synthesized_class()) {
Isolate* isolate = Isolate::Current();
- VMTagScope tagScope(isolate, VMTag::kCompileTagId);
TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(isolate, cls.script());
@@ -789,7 +788,6 @@
void Parser::ParseFunction(ParsedFunction* parsed_function) {
Isolate* isolate = Isolate::Current();
- VMTagScope tagScope(isolate, VMTag::kCompileTagId);
TimerScope timer(FLAG_compiler_stats, &CompilerStats::parser_timer);
CompilerStats::num_functions_compiled++;
ASSERT(isolate->long_jump_base()->IsSafeToJump());
@@ -8777,14 +8775,15 @@
// Resolve class.
if (!type->HasResolvedTypeClass()) {
const UnresolvedClass& unresolved_class =
- UnresolvedClass::Handle(type->unresolved_class());
+ UnresolvedClass::Handle(isolate(), type->unresolved_class());
const String& unresolved_class_name =
- String::Handle(unresolved_class.ident());
- Class& resolved_type_class = Class::Handle();
+ String::Handle(isolate(), unresolved_class.ident());
+ Class& resolved_type_class = Class::Handle(isolate());
if (unresolved_class.library_prefix() == LibraryPrefix::null()) {
if (!scope_class.IsNull()) {
// First check if the type is a type parameter of the given scope class.
const TypeParameter& type_parameter = TypeParameter::Handle(
+ isolate(),
scope_class.LookupTypeParameter(unresolved_class_name));
if (!type_parameter.IsNull()) {
// A type parameter is considered to be a malformed type when
@@ -8792,23 +8791,23 @@
if (ParsingStaticMember()) {
ASSERT(scope_class.raw() == current_class().raw());
*type = ClassFinalizer::NewFinalizedMalformedType(
- Error::Handle(), // No previous error.
+ Error::Handle(isolate()), // No previous error.
script_,
type->token_pos(),
"type parameter '%s' cannot be referenced "
"from static member",
- String::Handle(type_parameter.name()).ToCString());
+ String::Handle(isolate(), type_parameter.name()).ToCString());
return;
}
// A type parameter cannot be parameterized, so make the type
// malformed if type arguments have previously been parsed.
- if (!TypeArguments::Handle(type->arguments()).IsNull()) {
+ if (!TypeArguments::Handle(isolate(), type->arguments()).IsNull()) {
*type = ClassFinalizer::NewFinalizedMalformedType(
- Error::Handle(), // No previous error.
+ Error::Handle(isolate()), // No previous error.
script_,
type_parameter.token_pos(),
"type parameter '%s' cannot be parameterized",
- String::Handle(type_parameter.name()).ToCString());
+ String::Handle(isolate(), type_parameter.name()).ToCString());
return;
}
*type = type_parameter.raw();
@@ -8824,7 +8823,7 @@
}
} else {
LibraryPrefix& lib_prefix =
- LibraryPrefix::Handle(unresolved_class.library_prefix());
+ LibraryPrefix::Handle(isolate(), unresolved_class.library_prefix());
// Resolve class name in the scope of the library prefix.
resolved_type_class =
ResolveClassInPrefixScope(lib_prefix, unresolved_class_name);
@@ -8836,21 +8835,24 @@
parameterized_type.set_type_class(resolved_type_class);
} else if (finalization >= ClassFinalizer::kCanonicalize) {
ClassFinalizer::FinalizeMalformedType(
- Error::Handle(), // No previous error.
+ Error::Handle(isolate()), // No previous error.
script_,
parameterized_type,
"type '%s' is not loaded",
- String::Handle(parameterized_type.UserVisibleName()).ToCString());
+ String::Handle(isolate(),
+ parameterized_type.UserVisibleName()).ToCString());
return;
}
}
// Resolve type arguments, if any.
- const TypeArguments& arguments = TypeArguments::Handle(type->arguments());
- TypeArguments::Handle(type->arguments());
+ const TypeArguments& arguments = TypeArguments::Handle(isolate(),
+ type->arguments());
+ TypeArguments::Handle(isolate(), type->arguments());
if (!arguments.IsNull()) {
const intptr_t num_arguments = arguments.Length();
for (intptr_t i = 0; i < num_arguments; i++) {
- AbstractType& type_argument = AbstractType::Handle(arguments.TypeAt(i));
+ AbstractType& type_argument = AbstractType::Handle(isolate(),
+ 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/tags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698