diff options
Diffstat (limited to 'deps/v8/src/compiler/instruction-selector.h')
-rw-r--r-- | deps/v8/src/compiler/instruction-selector.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/deps/v8/src/compiler/instruction-selector.h b/deps/v8/src/compiler/instruction-selector.h index fcf205a8d9..9a0744720a 100644 --- a/deps/v8/src/compiler/instruction-selector.h +++ b/deps/v8/src/compiler/instruction-selector.h @@ -28,15 +28,19 @@ typedef ZoneVector<InstructionOperand> InstructionOperandVector; // Instruction selection generates an InstructionSequence for a given Schedule. -class InstructionSelector FINAL { +class InstructionSelector final { public: // Forward declarations. class Features; - InstructionSelector(Zone* zone, size_t node_count, Linkage* linkage, - InstructionSequence* sequence, Schedule* schedule, - SourcePositionTable* source_positions, - Features features = SupportedFeatures()); + enum SourcePositionMode { kCallSourcePositions, kAllSourcePositions }; + + InstructionSelector( + Zone* zone, size_t node_count, Linkage* linkage, + InstructionSequence* sequence, Schedule* schedule, + SourcePositionTable* source_positions, + SourcePositionMode source_position_mode = kCallSourcePositions, + Features features = SupportedFeatures()); // Visit code for the entire graph with the included schedule. void SelectInstructions(); @@ -81,7 +85,7 @@ class InstructionSelector FINAL { // ============== Architecture-independent CPU feature methods. ============== // =========================================================================== - class Features FINAL { + class Features final { public: Features() : bits_(0) {} explicit Features(unsigned bits) : bits_(bits) {} @@ -146,21 +150,14 @@ class InstructionSelector FINAL { // will need to generate code for it. void MarkAsUsed(Node* node); - // Checks if {node} is marked as double. - bool IsDouble(const Node* node) const; - - // Inform the register allocator of a double result. - void MarkAsDouble(Node* node); - - // Checks if {node} is marked as reference. - bool IsReference(const Node* node) const; - - // Inform the register allocator of a reference result. - void MarkAsReference(Node* node); - // Inform the register allocation of the representation of the value produced // by {node}. void MarkAsRepresentation(MachineType rep, Node* node); + void MarkAsWord32(Node* node) { MarkAsRepresentation(kRepWord32, node); } + void MarkAsWord64(Node* node) { MarkAsRepresentation(kRepWord64, node); } + void MarkAsFloat32(Node* node) { MarkAsRepresentation(kRepFloat32, node); } + void MarkAsFloat64(Node* node) { MarkAsRepresentation(kRepFloat64, node); } + void MarkAsReference(Node* node) { MarkAsRepresentation(kRepTagged, node); } // Inform the register allocation of the representation of the unallocated // operand {op}. @@ -199,11 +196,13 @@ class InstructionSelector FINAL { void VisitFinish(Node* node); void VisitParameter(Node* node); + void VisitIfException(Node* node); void VisitOsrValue(Node* node); void VisitPhi(Node* node); void VisitProjection(Node* node); void VisitConstant(Node* node); - void VisitCall(Node* call, BasicBlock* handler); + void VisitCall(Node* call, BasicBlock* handler = nullptr); + void VisitTailCall(Node* call); void VisitGoto(BasicBlock* target); void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch); void VisitSwitch(Node* node, const SwitchInfo& sw); @@ -225,6 +224,7 @@ class InstructionSelector FINAL { Linkage* const linkage_; InstructionSequence* const sequence_; SourcePositionTable* const source_positions_; + SourcePositionMode const source_position_mode_; Features features_; Schedule* const schedule_; BasicBlock* current_block_; |