| 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); | |
| 94 | 92 |
| 95 Handle<Script> script = info->script(); | 93 Handle<Script> script = info->script(); |
| 96 if (!script->IsUndefined(isolate) && | 94 if (!script->IsUndefined(isolate) && |
| 97 !script->source()->IsUndefined(isolate)) { | 95 !script->source()->IsUndefined(isolate)) { |
| 98 int len = String::cast(script->source())->length(); | 96 int len = String::cast(script->source())->length(); |
| 99 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 97 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| 100 } | 98 } |
| 101 CodeGenerator::MakeCodePrologue(info, "full"); | 99 CodeGenerator::MakeCodePrologue(info, "full"); |
| 102 const int kInitialBufferSize = 4 * KB; | 100 const int kInitialBufferSize = 4 * KB; |
| 103 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, | 101 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 return info_->has_simple_parameters(); | 2006 return info_->has_simple_parameters(); |
| 2009 } | 2007 } |
| 2010 | 2008 |
| 2011 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 2009 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 2012 | 2010 |
| 2013 #undef __ | 2011 #undef __ |
| 2014 | 2012 |
| 2015 | 2013 |
| 2016 } // namespace internal | 2014 } // namespace internal |
| 2017 } // namespace v8 | 2015 } // namespace v8 |
| OLD | NEW |