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/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #define __ ACCESS_MASM(masm()) | 27 #define __ ACCESS_MASM(masm()) |
28 | 28 |
29 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { | 29 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
30 Isolate* isolate = info->isolate(); | 30 Isolate* isolate = info->isolate(); |
31 | 31 |
32 DCHECK(!FLAG_minimal); | 32 DCHECK(!FLAG_minimal); |
33 RuntimeCallTimerScope runtimeTimer(isolate, | 33 RuntimeCallTimerScope runtimeTimer(isolate, |
34 &RuntimeCallStats::CompileFullCode); | 34 &RuntimeCallStats::CompileFullCode); |
35 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 35 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
36 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileFullCode"); | 36 TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED( |
| 37 isolate, &tracing::TraceEventStatsTable::CompileFullCode); |
37 | 38 |
38 Handle<Script> script = info->script(); | 39 Handle<Script> script = info->script(); |
39 if (!script->IsUndefined(isolate) && | 40 if (!script->IsUndefined(isolate) && |
40 !script->source()->IsUndefined(isolate)) { | 41 !script->source()->IsUndefined(isolate)) { |
41 int len = String::cast(script->source())->length(); | 42 int len = String::cast(script->source())->length(); |
42 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 43 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
43 } | 44 } |
44 CodeGenerator::MakeCodePrologue(info, "full"); | 45 CodeGenerator::MakeCodePrologue(info, "full"); |
45 const int kInitialBufferSize = 4 * KB; | 46 const int kInitialBufferSize = 4 * KB; |
46 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, | 47 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, |
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 return var->scope()->is_nonlinear() || | 1933 return var->scope()->is_nonlinear() || |
1933 var->initializer_position() >= proxy->position(); | 1934 var->initializer_position() >= proxy->position(); |
1934 } | 1935 } |
1935 | 1936 |
1936 | 1937 |
1937 #undef __ | 1938 #undef __ |
1938 | 1939 |
1939 | 1940 |
1940 } // namespace internal | 1941 } // namespace internal |
1941 } // namespace v8 | 1942 } // namespace v8 |
OLD | NEW |