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

Unified Diff: runtime/vm/parser.cc

Issue 1284713003: Refactor VMTagScope to Thread* rather than Isolate*. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/parser.h ('k') | runtime/vm/regexp_parser.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 419cd4e151de9abb07b46e48f1f77701f1ae317e..23c22c3f3fc03cff02cb1eb625772e0568201306 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -445,10 +445,10 @@ void Parser::SetPosition(intptr_t position) {
void Parser::ParseCompilationUnit(const Library& library,
const Script& script) {
- Isolate* isolate = Isolate::Current();
- ASSERT(isolate->long_jump_base()->IsSafeToJump());
- CSTAT_TIMER_SCOPE(isolate, parser_timer);
- VMTagScope tagScope(isolate, VMTag::kCompileTopLevelTagId);
+ Thread* thread = Thread::Current();
+ ASSERT(thread->isolate()->long_jump_base()->IsSafeToJump());
+ CSTAT_TIMER_SCOPE(thread->isolate(), parser_timer);
+ VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
Parser parser(script, library, 0);
parser.ParseTopLevel();
}
@@ -872,11 +872,13 @@ bool Parser::ParseFormalParameters(const Function& func, ParamList* params) {
void Parser::ParseFunction(ParsedFunction* parsed_function) {
- Isolate* isolate = parsed_function->isolate();
- Zone* zone = parsed_function->zone();
+ Thread* thread = parsed_function->thread();
+ ASSERT(thread == Thread::Current());
+ Isolate* isolate = thread->isolate();
+ Zone* zone = thread->zone();
CSTAT_TIMER_SCOPE(isolate, parser_timer);
INC_STAT(isolate, num_functions_compiled, 1);
- VMTagScope tagScope(isolate, VMTag::kCompileParseFunctionTagId,
+ VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
FLAG_profile_vm);
ASSERT(isolate->long_jump_base()->IsSafeToJump());
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/regexp_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698