| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 // static | 83 // static |
| 84 bool FullCodeGenerator::MakeCode(CompilationInfo* info, uintptr_t stack_limit) { | 84 bool FullCodeGenerator::MakeCode(CompilationInfo* info, uintptr_t stack_limit) { |
| 85 Isolate* isolate = info->isolate(); | 85 Isolate* isolate = info->isolate(); |
| 86 | 86 |
| 87 DCHECK(!FLAG_minimal); | 87 DCHECK(!FLAG_minimal); |
| 88 RuntimeCallTimerScope runtimeTimer(isolate, | 88 RuntimeCallTimerScope runtimeTimer(isolate, |
| 89 &RuntimeCallStats::CompileFullCode); | 89 &RuntimeCallStats::CompileFullCode); |
| 90 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 90 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
| 91 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileFullCode"); | 91 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileFullCode"); |
| 92 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 93 isolate, &tracing::TraceEventStatsTable::CompileFullCode); |
| 92 | 94 |
| 93 Handle<Script> script = info->script(); | 95 Handle<Script> script = info->script(); |
| 94 if (!script->IsUndefined(isolate) && | 96 if (!script->IsUndefined(isolate) && |
| 95 !script->source()->IsUndefined(isolate)) { | 97 !script->source()->IsUndefined(isolate)) { |
| 96 int len = String::cast(script->source())->length(); | 98 int len = String::cast(script->source())->length(); |
| 97 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 99 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| 98 } | 100 } |
| 99 CodeGenerator::MakeCodePrologue(info, "full"); | 101 CodeGenerator::MakeCodePrologue(info, "full"); |
| 100 const int kInitialBufferSize = 4 * KB; | 102 const int kInitialBufferSize = 4 * KB; |
| 101 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, | 103 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 return info_->has_simple_parameters(); | 2008 return info_->has_simple_parameters(); |
| 2007 } | 2009 } |
| 2008 | 2010 |
| 2009 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 2011 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 2010 | 2012 |
| 2011 #undef __ | 2013 #undef __ |
| 2012 | 2014 |
| 2013 | 2015 |
| 2014 } // namespace internal | 2016 } // namespace internal |
| 2015 } // namespace v8 | 2017 } // namespace v8 |
| OLD | NEW |