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

Unified Diff: src/compiler/raw-machine-assembler.h

Issue 1477413002: Move RMA::Label out of the class, so it can be forward declared. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: RawLabel -> RawMachineLabel Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/raw-machine-assembler.h
diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h
index d48c24d616f16e9a9b984d9e1eafe05d992b6305..9b9a836d58adb4c2b228e439b993319d8175ebc1 100644
--- a/src/compiler/raw-machine-assembler.h
+++ b/src/compiler/raw-machine-assembler.h
@@ -19,8 +19,10 @@ namespace internal {
namespace compiler {
class BasicBlock;
+class RawMachineLabel;
class Schedule;
+
// The RawMachineAssembler produces a low-level IR graph. All nodes are wired
// into a graph and also placed into a schedule immediately, hence subsequent
// code generation can happen without the need for scheduling.
@@ -34,19 +36,6 @@ class Schedule;
// non-schedulable due to missing control and effect dependencies.
class RawMachineAssembler {
public:
- class Label {
- public:
- Label() : block_(NULL), used_(false), bound_(false) {}
- ~Label() { DCHECK(bound_ || !used_); }
-
- private:
- BasicBlock* block_;
- bool used_;
- bool bound_;
- friend class RawMachineAssembler;
- DISALLOW_COPY_AND_ASSIGN(Label);
- };
-
RawMachineAssembler(Isolate* isolate, Graph* graph,
CallDescriptor* call_descriptor,
MachineType word = kMachPtr,
@@ -584,14 +573,15 @@ class RawMachineAssembler {
// the current basic block or create new basic blocks for labels.
// Control flow.
- void Goto(Label* label);
- void Branch(Node* condition, Label* true_val, Label* false_val);
- void Switch(Node* index, Label* default_label, int32_t* case_values,
- Label** case_labels, size_t case_count);
+ void Goto(RawMachineLabel* label);
+ void Branch(Node* condition, RawMachineLabel* true_val,
+ RawMachineLabel* false_val);
+ void Switch(Node* index, RawMachineLabel* default_label, int32_t* case_values,
+ RawMachineLabel** case_labels, size_t case_count);
void Return(Node* value);
void Return(Node* v1, Node* v2);
void Return(Node* v1, Node* v2, Node* v3);
- void Bind(Label* label);
+ void Bind(RawMachineLabel* label);
void Deoptimize(Node* state);
// Variables.
@@ -624,8 +614,8 @@ class RawMachineAssembler {
private:
Node* MakeNode(const Operator* op, int input_count, Node** inputs);
- BasicBlock* Use(Label* label);
- BasicBlock* EnsureBlock(Label* label);
+ BasicBlock* Use(RawMachineLabel* label);
+ BasicBlock* EnsureBlock(RawMachineLabel* label);
BasicBlock* CurrentBlock();
Schedule* schedule() { return schedule_; }
@@ -646,6 +636,20 @@ class RawMachineAssembler {
DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler);
};
+
+class RawMachineLabel final {
+ public:
+ RawMachineLabel();
+ ~RawMachineLabel();
+
+ private:
+ BasicBlock* block_;
+ bool used_;
+ bool bound_;
+ friend class RawMachineAssembler;
+ DISALLOW_COPY_AND_ASSIGN(RawMachineLabel);
+};
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698