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

Unified Diff: src/parser.cc

Issue 6723014: Avoid TLS access for counters. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix lint Created 9 years, 9 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 | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 7dbb09dae7419173104400b9301502c8a7c9f326..eefe7cf5415e0ec3dc92a5b3c3c4444d082492fa 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -284,7 +284,7 @@ Handle<String> Parser::LookupCachedSymbol(int symbol_id) {
symbol_cache_.at(symbol_id) = result;
return result;
}
- COUNTERS->total_preparse_symbols_skipped()->Increment();
+ isolate()->counters()->total_preparse_symbols_skipped()->Increment();
return result;
}
@@ -599,8 +599,8 @@ FunctionLiteral* Parser::ParseProgram(Handle<String> source,
StrictModeFlag strict_mode) {
CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);
- HistogramTimerScope timer(COUNTERS->parse());
- COUNTERS->total_parse_size()->Increment(source->length());
+ HistogramTimerScope timer(isolate()->counters()->parse());
+ isolate()->counters()->total_parse_size()->Increment(source->length());
fni_ = new FuncNameInferrer();
// Initialize parser state.
@@ -681,9 +681,9 @@ FunctionLiteral* Parser::DoParseProgram(Handle<String> source,
FunctionLiteral* Parser::ParseLazy(CompilationInfo* info) {
CompilationZoneScope zone_scope(DONT_DELETE_ON_EXIT);
- HistogramTimerScope timer(COUNTERS->parse_lazy());
+ HistogramTimerScope timer(isolate()->counters()->parse_lazy());
Handle<String> source(String::cast(script_->source()));
- COUNTERS->total_parse_size()->Increment(source->length());
+ isolate()->counters()->total_parse_size()->Increment(source->length());
Handle<SharedFunctionInfo> shared_info = info->shared_info();
// Initialize parser state.
@@ -3608,7 +3608,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
// End position greater than end of stream is safe, and hard to check.
ReportInvalidPreparseData(name, CHECK_OK);
}
- COUNTERS->total_preparse_skipped()->Increment(
+ isolate()->counters()->total_preparse_skipped()->Increment(
end_pos - function_block_pos);
// Seek to position just before terminal '}'.
scanner().SeekForward(end_pos - 1);
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698