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

Unified Diff: runtime/vm/parser.cc

Issue 1291803009: Enable concurrent optimization test after migrating scopes to Thread* (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update ASSERT in LongJumpScope. Created 5 years, 4 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/symbols.cc » ('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 a8d9795b1362a39303cd0b6c99f1a762c960d7bc..af66c87f5b20376d8a63c353b0fd4b745791b392 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -52,7 +52,8 @@ DECLARE_FLAG(bool, profile_vm);
DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
DECLARE_FLAG(bool, warn_on_javascript_compatibility);
-// Quick access to the current isolate and zone.
+// Quick access to the current thread, isolate and zone.
+#define T (thread())
#define I (isolate())
#define Z (zone())
@@ -447,7 +448,7 @@ void Parser::ParseCompilationUnit(const Library& library,
const Script& script) {
Thread* thread = Thread::Current();
ASSERT(thread->long_jump_base()->IsSafeToJump());
- CSTAT_TIMER_SCOPE(thread->isolate(), parser_timer);
+ CSTAT_TIMER_SCOPE(thread, parser_timer);
VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
Parser parser(script, library, 0);
parser.ParseTopLevel();
@@ -773,9 +774,8 @@ struct TopLevel {
void Parser::ParseClass(const Class& cls) {
if (!cls.is_synthesized_class()) {
Thread* thread = Thread::Current();
- Isolate* isolate = thread->isolate();
Zone* zone = thread->zone();
- CSTAT_TIMER_SCOPE(isolate, parser_timer);
+ CSTAT_TIMER_SCOPE(thread, parser_timer);
ASSERT(thread->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(zone, cls.script());
const Library& lib = Library::Handle(zone, cls.library());
@@ -783,9 +783,8 @@ void Parser::ParseClass(const Class& cls) {
parser.ParseClassDefinition(cls);
} else if (cls.is_enum_class()) {
Thread* thread = Thread::Current();
- Isolate* isolate = thread->isolate();
Zone* zone = thread->zone();
- CSTAT_TIMER_SCOPE(isolate, parser_timer);
+ CSTAT_TIMER_SCOPE(thread, parser_timer);
ASSERT(thread->long_jump_base()->IsSafeToJump());
const Script& script = Script::Handle(zone, cls.script());
const Library& lib = Library::Handle(zone, cls.library());
@@ -880,7 +879,7 @@ void Parser::ParseFunction(ParsedFunction* parsed_function) {
ASSERT(thread == Thread::Current());
Isolate* isolate = thread->isolate();
Zone* zone = thread->zone();
- CSTAT_TIMER_SCOPE(isolate, parser_timer);
+ CSTAT_TIMER_SCOPE(thread, parser_timer);
INC_STAT(isolate, num_functions_compiled, 1);
VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
FLAG_profile_vm);
@@ -11941,7 +11940,7 @@ StaticGetterNode* Parser::RunStaticFieldInitializer(const Field& field,
ASSERT(func.kind() == RawFunction::kImplicitStaticFinalGetter);
Object& const_value = Object::Handle(Z);
{
- PAUSETIMERSCOPE(I, time_compilation);
+ PAUSETIMERSCOPE(T, time_compilation);
const_value = DartEntry::InvokeFunction(func, Object::empty_array());
}
if (const_value.IsError()) {
@@ -12022,7 +12021,7 @@ RawObject* Parser::EvaluateConstConstructorCall(
ArgumentsDescriptor::New(num_arguments, arguments->names()));
Object& result = Object::Handle(Z);
{
- PAUSETIMERSCOPE(I, time_compilation);
+ PAUSETIMERSCOPE(T, time_compilation);
result = DartEntry::InvokeFunction(
constructor, arg_values, args_descriptor);
}
@@ -13483,7 +13482,7 @@ String& Parser::Interpolate(const GrowableArray<AstNode*>& values) {
// Call interpolation function.
Object& result = Object::Handle(Z);
{
- PAUSETIMERSCOPE(I, time_compilation);
+ PAUSETIMERSCOPE(T, time_compilation);
result = DartEntry::InvokeFunction(func, interpolate_arg);
}
if (result.IsUnhandledException()) {
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698