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

Unified Diff: src/codegen.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/code-stubs.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen.cc
diff --git a/src/codegen.cc b/src/codegen.cc
index 5a9927295933b677dd76e940bd57bbb9170fff2a..03f64a157f64100426f9446f860af79fe7946ad3 100644
--- a/src/codegen.cc
+++ b/src/codegen.cc
@@ -175,13 +175,17 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info) {
Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
Code::Flags flags,
CompilationInfo* info) {
+ Isolate* isolate = info->isolate();
+
// Allocate and install the code.
CodeDesc desc;
masm->GetCode(&desc);
- Handle<Code> code = FACTORY->NewCode(desc, flags, masm->CodeObject());
+ Handle<Code> code =
+ isolate->factory()->NewCode(desc, flags, masm->CodeObject());
if (!code.is_null()) {
- COUNTERS->total_compiled_code_size()->Increment(code->instruction_size());
+ isolate->counters()->total_compiled_code_size()->Increment(
+ code->instruction_size());
}
return code;
}
@@ -235,7 +239,8 @@ bool CodeGenerator::MakeCode(CompilationInfo* info) {
Handle<Script> script = info->script();
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
int len = String::cast(script->source())->length();
- COUNTERS->total_old_codegen_source_size()->Increment(len);
+ Counters* counters = info->isolate()->counters();
+ counters->total_old_codegen_source_size()->Increment(len);
}
if (FLAG_trace_codegen) {
PrintF("Classic Compiler - ");
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698