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

Unified Diff: runtime/vm/object.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/heap.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 88ebd0e8e941309c6b21a740741755ce938ac85a..1b73107e7b4e7cf1811cafcbbdee8ece61e1b5d0 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -8500,18 +8500,20 @@ void Script::set_tokens(const TokenStream& value) const {
void Script::Tokenize(const String& private_key) const {
- Isolate* isolate = Isolate::Current();
- const TokenStream& tkns = TokenStream::Handle(isolate, tokens());
+ Thread* thread = Thread::Current();
+ Zone* zone = thread->zone();
+ Isolate* isolate = thread->isolate();
+ const TokenStream& tkns = TokenStream::Handle(zone, tokens());
if (!tkns.IsNull()) {
// Already tokenized.
return;
}
// Get the source, scan and allocate the token stream.
- VMTagScope tagScope(isolate, VMTag::kCompileScannerTagId);
+ VMTagScope tagScope(thread, VMTag::kCompileScannerTagId);
CSTAT_TIMER_SCOPE(isolate, scanner_timer);
- const String& src = String::Handle(isolate, Source());
+ const String& src = String::Handle(zone, Source());
Scanner scanner(src, private_key);
- set_tokens(TokenStream::Handle(isolate,
+ set_tokens(TokenStream::Handle(zone,
TokenStream::New(scanner.GetStream(),
private_key)));
INC_STAT(isolate, src_length, src.Length());
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698