Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: src/compiler/code-generator.cc

Issue 606403003: Refactor BasicBlock, no inheritance from GenericNode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Attempt n+1 to address the size_t madness Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 101
102 void CodeGenerator::AssembleInstruction(Instruction* instr) { 102 void CodeGenerator::AssembleInstruction(Instruction* instr) {
103 if (instr->IsBlockStart()) { 103 if (instr->IsBlockStart()) {
104 // Bind a label for a block start and handle parallel moves. 104 // Bind a label for a block start and handle parallel moves.
105 BlockStartInstruction* block_start = BlockStartInstruction::cast(instr); 105 BlockStartInstruction* block_start = BlockStartInstruction::cast(instr);
106 current_block_ = block_start->block(); 106 current_block_ = block_start->block();
107 if (FLAG_code_comments) { 107 if (FLAG_code_comments) {
108 // TODO(titzer): these code comments are a giant memory leak. 108 // TODO(titzer): these code comments are a giant memory leak.
109 Vector<char> buffer = Vector<char>::New(32); 109 Vector<char> buffer = Vector<char>::New(32);
110 SNPrintF(buffer, "-- B%d start --", block_start->block()->id()); 110 SNPrintF(buffer, "-- B%d start --", block_start->block()->id().ToInt());
111 masm()->RecordComment(buffer.start()); 111 masm()->RecordComment(buffer.start());
112 } 112 }
113 masm()->bind(block_start->label()); 113 masm()->bind(block_start->label());
114 } 114 }
115 if (instr->IsGapMoves()) { 115 if (instr->IsGapMoves()) {
116 // Handle parallel moves associated with the gap instruction. 116 // Handle parallel moves associated with the gap instruction.
117 AssembleGap(GapInstruction::cast(instr)); 117 AssembleGap(GapInstruction::cast(instr));
118 } else if (instr->IsSourcePosition()) { 118 } else if (instr->IsSourcePosition()) {
119 AssembleSourcePosition(SourcePositionInstruction::cast(instr)); 119 AssembleSourcePosition(SourcePositionInstruction::cast(instr));
120 } else { 120 } else {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 451 }
452 452
453 453
454 void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); } 454 void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); }
455 455
456 #endif // !V8_TURBOFAN_BACKEND 456 #endif // !V8_TURBOFAN_BACKEND
457 457
458 } // namespace compiler 458 } // namespace compiler
459 } // namespace internal 459 } // namespace internal
460 } // namespace v8 460 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698