| 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 16 matching lines...) Expand all Loading... |
| 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 RuntimeCallTimerScope runtimeTimer(isolate, | 31 RuntimeCallTimerScope runtimeTimer(isolate, |
| 32 &RuntimeCallStats::CompileFullCode); | 32 &RuntimeCallStats::CompileFullCode); |
| 33 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 33 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
| 34 TRACE_EVENT0("v8", "V8.CompileFullCode"); | 34 TRACE_EVENT0("v8", "V8.CompileFullCode"); |
| 35 | 35 |
| 36 Handle<Script> script = info->script(); | 36 Handle<Script> script = info->script(); |
| 37 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 37 if (!script->IsUndefined(isolate) && |
| 38 !script->source()->IsUndefined(isolate)) { |
| 38 int len = String::cast(script->source())->length(); | 39 int len = String::cast(script->source())->length(); |
| 39 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 40 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| 40 } | 41 } |
| 41 CodeGenerator::MakeCodePrologue(info, "full"); | 42 CodeGenerator::MakeCodePrologue(info, "full"); |
| 42 const int kInitialBufferSize = 4 * KB; | 43 const int kInitialBufferSize = 4 * KB; |
| 43 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, | 44 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, |
| 44 CodeObjectRequired::kYes); | 45 CodeObjectRequired::kYes); |
| 45 if (info->will_serialize()) masm.enable_serializer(); | 46 if (info->will_serialize()) masm.enable_serializer(); |
| 46 | 47 |
| 47 LOG_CODE_EVENT(isolate, | 48 LOG_CODE_EVENT(isolate, |
| (...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 return var->scope()->is_nonlinear() || | 1974 return var->scope()->is_nonlinear() || |
| 1974 var->initializer_position() >= proxy->position(); | 1975 var->initializer_position() >= proxy->position(); |
| 1975 } | 1976 } |
| 1976 | 1977 |
| 1977 | 1978 |
| 1978 #undef __ | 1979 #undef __ |
| 1979 | 1980 |
| 1980 | 1981 |
| 1981 } // namespace internal | 1982 } // namespace internal |
| 1982 } // namespace v8 | 1983 } // namespace v8 |
| OLD | NEW |