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

Side by Side Diff: src/compiler/raw-machine-assembler.cc

Issue 1248263003: [turbofan] Add some documenting comments to RawMachineAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-graph-builder-base
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/pipeline.h" 6 #include "src/compiler/pipeline.h"
7 #include "src/compiler/raw-machine-assembler.h" 7 #include "src/compiler/raw-machine-assembler.h"
8 #include "src/compiler/scheduler.h" 8 #include "src/compiler/scheduler.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 21 matching lines...) Expand all
32 parameters_[i] = 32 parameters_[i] =
33 NewNode(common()->Parameter(static_cast<int>(i)), graph->start()); 33 NewNode(common()->Parameter(static_cast<int>(i)), graph->start());
34 } 34 }
35 } 35 }
36 36
37 37
38 Schedule* RawMachineAssembler::Export() { 38 Schedule* RawMachineAssembler::Export() {
39 // Compute the correct codegen order. 39 // Compute the correct codegen order.
40 DCHECK(schedule_->rpo_order()->empty()); 40 DCHECK(schedule_->rpo_order()->empty());
41 Scheduler::ComputeSpecialRPO(zone(), schedule_); 41 Scheduler::ComputeSpecialRPO(zone(), schedule_);
42 // Invalidate MachineAssembler. 42 // Invalidate RawMachineAssembler.
43 Schedule* schedule = schedule_; 43 Schedule* schedule = schedule_;
44 schedule_ = NULL; 44 schedule_ = NULL;
45 return schedule; 45 return schedule;
46 } 46 }
47 47
48 48
49 Node* RawMachineAssembler::Parameter(size_t index) { 49 Node* RawMachineAssembler::Parameter(size_t index) {
50 DCHECK(index < parameter_count()); 50 DCHECK(index < parameter_count());
51 return parameters_[index]; 51 return parameters_[index];
52 } 52 }
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 237
238 BasicBlock* RawMachineAssembler::CurrentBlock() { 238 BasicBlock* RawMachineAssembler::CurrentBlock() {
239 DCHECK(current_block_); 239 DCHECK(current_block_);
240 return current_block_; 240 return current_block_;
241 } 241 }
242 242
243 243
244 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, 244 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count,
245 Node** inputs) { 245 Node** inputs) {
246 DCHECK(ScheduleValid()); 246 DCHECK_NOT_NULL(schedule_);
247 DCHECK(current_block_ != NULL); 247 DCHECK(current_block_ != NULL);
248 Node* node = graph()->NewNode(op, input_count, inputs); 248 Node* node = graph()->NewNode(op, input_count, inputs);
249 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() 249 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start()
250 : CurrentBlock(); 250 : CurrentBlock();
251 if (op->opcode() != IrOpcode::kReturn) { 251 if (op->opcode() != IrOpcode::kReturn) {
252 schedule()->AddNode(block, node); 252 schedule()->AddNode(block, node);
253 } 253 }
254 return node; 254 return node;
255 } 255 }
256 256
257 } // namespace compiler 257 } // namespace compiler
258 } // namespace internal 258 } // namespace internal
259 } // namespace v8 259 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698