| 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.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.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 12 matching lines...) Expand all Loading... |
| 23 namespace internal { | 23 namespace internal { |
| 24 | 24 |
| 25 #define __ ACCESS_MASM(masm()) | 25 #define __ ACCESS_MASM(masm()) |
| 26 | 26 |
| 27 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { | 27 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
| 28 Isolate* isolate = info->isolate(); | 28 Isolate* isolate = info->isolate(); |
| 29 | 29 |
| 30 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 30 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
| 31 TRACE_EVENT0("v8", "V8.CompileFullCode"); | 31 TRACE_EVENT0("v8", "V8.CompileFullCode"); |
| 32 | 32 |
| 33 // Ensure that the feedback vector is large enough. | |
| 34 info->EnsureFeedbackVector(); | |
| 35 | |
| 36 Handle<Script> script = info->script(); | 33 Handle<Script> script = info->script(); |
| 37 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 34 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
| 38 int len = String::cast(script->source())->length(); | 35 int len = String::cast(script->source())->length(); |
| 39 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 36 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| 40 } | 37 } |
| 41 CodeGenerator::MakeCodePrologue(info, "full"); | 38 CodeGenerator::MakeCodePrologue(info, "full"); |
| 42 const int kInitialBufferSize = 4 * KB; | 39 const int kInitialBufferSize = 4 * KB; |
| 43 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, | 40 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, |
| 44 CodeObjectRequired::kYes); | 41 CodeObjectRequired::kYes); |
| 45 if (info->will_serialize()) masm.enable_serializer(); | 42 if (info->will_serialize()) masm.enable_serializer(); |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1948 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1945 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1949 var->initializer_position() >= proxy->position(); | 1946 var->initializer_position() >= proxy->position(); |
| 1950 } | 1947 } |
| 1951 | 1948 |
| 1952 | 1949 |
| 1953 #undef __ | 1950 #undef __ |
| 1954 | 1951 |
| 1955 | 1952 |
| 1956 } // namespace internal | 1953 } // namespace internal |
| 1957 } // namespace v8 | 1954 } // namespace v8 |
| OLD | NEW |