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