OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 for (auto const block : code()->instruction_blocks()) { | 77 for (auto const block : code()->instruction_blocks()) { |
78 if (block->IsDeferred() == (deferred == 0)) { | 78 if (block->IsDeferred() == (deferred == 0)) { |
79 continue; | 79 continue; |
80 } | 80 } |
81 // Align loop headers on 16-byte boundaries. | 81 // Align loop headers on 16-byte boundaries. |
82 if (block->IsLoopHeader()) masm()->Align(16); | 82 if (block->IsLoopHeader()) masm()->Align(16); |
83 // Bind a label for a block. | 83 // Bind a label for a block. |
84 current_block_ = block->rpo_number(); | 84 current_block_ = block->rpo_number(); |
85 if (FLAG_code_comments) { | 85 if (FLAG_code_comments) { |
86 // TODO(titzer): these code comments are a giant memory leak. | 86 // TODO(titzer): these code comments are a giant memory leak. |
87 Vector<char> buffer = Vector<char>::New(32); | 87 Vector<char> buffer = Vector<char>::New(200); |
88 SNPrintF(buffer, "-- B%d start --", block->rpo_number().ToInt()); | 88 SNPrintF(buffer, "-- B%d start%s%s%s%s --", block->rpo_number().ToInt(), |
| 89 block->IsDeferred() ? " (deferred)" : "", |
| 90 block->needs_frame() ? "" : " (no frame)", |
| 91 block->must_construct_frame() ? " (construct frame)" : "", |
| 92 block->must_deconstruct_frame() ? " (deconstruct frame)" : ""); |
89 masm()->RecordComment(buffer.start()); | 93 masm()->RecordComment(buffer.start()); |
90 } | 94 } |
91 masm()->bind(GetLabel(current_block_)); | 95 masm()->bind(GetLabel(current_block_)); |
92 for (int i = block->code_start(); i < block->code_end(); ++i) { | 96 for (int i = block->code_start(); i < block->code_end(); ++i) { |
93 AssembleInstruction(code()->InstructionAt(i)); | 97 AssembleInstruction(code()->InstructionAt(i)); |
94 } | 98 } |
95 } | 99 } |
96 } | 100 } |
97 | 101 |
98 // Assemble all out-of-line code. | 102 // Assemble all out-of-line code. |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 : masm_(gen->masm()), next_(gen->ools_) { | 662 : masm_(gen->masm()), next_(gen->ools_) { |
659 gen->ools_ = this; | 663 gen->ools_ = this; |
660 } | 664 } |
661 | 665 |
662 | 666 |
663 OutOfLineCode::~OutOfLineCode() {} | 667 OutOfLineCode::~OutOfLineCode() {} |
664 | 668 |
665 } // namespace compiler | 669 } // namespace compiler |
666 } // namespace internal | 670 } // namespace internal |
667 } // namespace v8 | 671 } // namespace v8 |
OLD | NEW |