| 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.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Ensure that the feedback vector is large enough. | 31 // Ensure that the feedback vector is large enough. |
| 32 info->EnsureFeedbackVector(); | 32 info->EnsureFeedbackVector(); |
| 33 | 33 |
| 34 Handle<Script> script = info->script(); | 34 Handle<Script> script = info->script(); |
| 35 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 35 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
| 36 int len = String::cast(script->source())->length(); | 36 int len = String::cast(script->source())->length(); |
| 37 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 37 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| 38 } | 38 } |
| 39 CodeGenerator::MakeCodePrologue(info, "full"); | 39 CodeGenerator::MakeCodePrologue(info, "full"); |
| 40 const int kInitialBufferSize = 4 * KB; | 40 const int kInitialBufferSize = 4 * KB; |
| 41 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); | 41 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize, |
| 42 CodeObjectRequired::kYes); |
| 42 if (info->will_serialize()) masm.enable_serializer(); | 43 if (info->will_serialize()) masm.enable_serializer(); |
| 43 | 44 |
| 44 LOG_CODE_EVENT(isolate, | 45 LOG_CODE_EVENT(isolate, |
| 45 CodeStartLinePosInfoRecordEvent(masm.positions_recorder())); | 46 CodeStartLinePosInfoRecordEvent(masm.positions_recorder())); |
| 46 | 47 |
| 47 FullCodeGenerator cgen(&masm, info); | 48 FullCodeGenerator cgen(&masm, info); |
| 48 cgen.Generate(); | 49 cgen.Generate(); |
| 49 if (cgen.HasStackOverflow()) { | 50 if (cgen.HasStackOverflow()) { |
| 50 DCHECK(!isolate->has_pending_exception()); | 51 DCHECK(!isolate->has_pending_exception()); |
| 51 return false; | 52 return false; |
| (...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1736 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1737 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1737 var->initializer_position() >= proxy->position(); | 1738 var->initializer_position() >= proxy->position(); |
| 1738 } | 1739 } |
| 1739 | 1740 |
| 1740 | 1741 |
| 1741 #undef __ | 1742 #undef __ |
| 1742 | 1743 |
| 1743 | 1744 |
| 1744 } // namespace internal | 1745 } // namespace internal |
| 1745 } // namespace v8 | 1746 } // namespace v8 |
| OLD | NEW |