Revision f230a1cf deps/v8/src/ia32/lithium-ia32.h
deps/v8/src/ia32/lithium-ia32.h | ||
---|---|---|
107 | 107 |
V(InnerAllocatedObject) \ |
108 | 108 |
V(InstanceOf) \ |
109 | 109 |
V(InstanceOfKnownGlobal) \ |
110 |
V(InstanceSize) \ |
|
111 | 110 |
V(InstructionGap) \ |
112 | 111 |
V(Integer32ToDouble) \ |
113 | 112 |
V(Integer32ToSmi) \ |
... | ... | |
116 | 115 |
V(IsObjectAndBranch) \ |
117 | 116 |
V(IsStringAndBranch) \ |
118 | 117 |
V(IsSmiAndBranch) \ |
119 |
V(IsNumberAndBranch) \ |
|
120 | 118 |
V(IsUndetectableAndBranch) \ |
121 | 119 |
V(Label) \ |
122 | 120 |
V(LazyBailout) \ |
... | ... | |
130 | 128 |
V(LoadKeyedGeneric) \ |
131 | 129 |
V(LoadNamedField) \ |
132 | 130 |
V(LoadNamedGeneric) \ |
131 |
V(LoadRoot) \ |
|
133 | 132 |
V(MapEnumLength) \ |
134 | 133 |
V(MathAbs) \ |
135 | 134 |
V(MathCos) \ |
... | ... | |
184 | 183 |
V(Typeof) \ |
185 | 184 |
V(TypeofIsAndBranch) \ |
186 | 185 |
V(Uint32ToDouble) \ |
186 |
V(Uint32ToSmi) \ |
|
187 | 187 |
V(UnknownOSRValue) \ |
188 | 188 |
V(ValueOf) \ |
189 | 189 |
V(WrapReceiver) |
... | ... | |
215 | 215 |
: environment_(NULL), |
216 | 216 |
hydrogen_value_(NULL), |
217 | 217 |
bit_field_(IsCallBits::encode(false)) { |
218 |
set_position(RelocInfo::kNoPosition); |
|
219 | 218 |
} |
220 | 219 |
|
221 | 220 |
virtual ~LInstruction() {} |
... | ... | |
256 | 255 |
LPointerMap* pointer_map() const { return pointer_map_.get(); } |
257 | 256 |
bool HasPointerMap() const { return pointer_map_.is_set(); } |
258 | 257 |
|
259 |
// The 31 bits PositionBits is used to store the int position value. And the |
|
260 |
// position value may be RelocInfo::kNoPosition (-1). The accessor always |
|
261 |
// +1/-1 so that the encoded value of position in bit_field_ is always >= 0 |
|
262 |
// and can fit into the 31 bits PositionBits. |
|
263 |
void set_position(int pos) { |
|
264 |
bit_field_ = PositionBits::update(bit_field_, pos + 1); |
|
265 |
} |
|
266 |
int position() { return PositionBits::decode(bit_field_) - 1; } |
|
267 |
|
|
268 | 258 |
void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
269 | 259 |
HValue* hydrogen_value() const { return hydrogen_value_; } |
270 | 260 |
|
... | ... | |
310 | 300 |
virtual LOperand* TempAt(int i) = 0; |
311 | 301 |
|
312 | 302 |
class IsCallBits: public BitField<bool, 0, 1> {}; |
313 |
class PositionBits: public BitField<int, 1, 31> {}; |
|
314 | 303 |
|
315 | 304 |
LEnvironment* environment_; |
316 | 305 |
SetOncePointer<LPointerMap> pointer_map_; |
... | ... | |
922 | 911 |
}; |
923 | 912 |
|
924 | 913 |
|
925 |
class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> { |
|
926 |
public: |
|
927 |
explicit LIsNumberAndBranch(LOperand* value) { |
|
928 |
inputs_[0] = value; |
|
929 |
} |
|
930 |
|
|
931 |
LOperand* value() { return inputs_[0]; } |
|
932 |
|
|
933 |
DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch, "is-number-and-branch") |
|
934 |
DECLARE_HYDROGEN_ACCESSOR(IsNumberAndBranch) |
|
935 |
}; |
|
936 |
|
|
937 |
|
|
938 | 914 |
class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { |
939 | 915 |
public: |
940 | 916 |
LIsStringAndBranch(LOperand* value, LOperand* temp) { |
... | ... | |
1144 | 1120 |
}; |
1145 | 1121 |
|
1146 | 1122 |
|
1147 |
class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
|
1148 |
public: |
|
1149 |
explicit LInstanceSize(LOperand* object) { |
|
1150 |
inputs_[0] = object; |
|
1151 |
} |
|
1152 |
|
|
1153 |
LOperand* object() { return inputs_[0]; } |
|
1154 |
|
|
1155 |
DECLARE_CONCRETE_INSTRUCTION(InstanceSize, "instance-size") |
|
1156 |
DECLARE_HYDROGEN_ACCESSOR(InstanceSize) |
|
1157 |
}; |
|
1158 |
|
|
1159 |
|
|
1160 | 1123 |
class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> { |
1161 | 1124 |
public: |
1162 | 1125 |
LBoundsCheck(LOperand* index, LOperand* length) { |
... | ... | |
1309 | 1272 |
DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") |
1310 | 1273 |
DECLARE_HYDROGEN_ACCESSOR(CompareMap) |
1311 | 1274 |
|
1312 |
Handle<Map> map() const { return hydrogen()->map(); } |
|
1275 |
Handle<Map> map() const { return hydrogen()->map().handle(); }
|
|
1313 | 1276 |
}; |
1314 | 1277 |
|
1315 | 1278 |
|
... | ... | |
1605 | 1568 |
}; |
1606 | 1569 |
|
1607 | 1570 |
|
1571 |
class LLoadRoot V8_FINAL : public LTemplateInstruction<1, 0, 0> { |
|
1572 |
public: |
|
1573 |
DECLARE_CONCRETE_INSTRUCTION(LoadRoot, "load-root") |
|
1574 |
DECLARE_HYDROGEN_ACCESSOR(LoadRoot) |
|
1575 |
|
|
1576 |
Heap::RootListIndex index() const { return hydrogen()->index(); } |
|
1577 |
}; |
|
1578 |
|
|
1579 |
|
|
1608 | 1580 |
class LLoadExternalArrayPointer V8_FINAL |
1609 | 1581 |
: public LTemplateInstruction<1, 1, 0> { |
1610 | 1582 |
public: |
... | ... | |
1634 | 1606 |
return hydrogen()->is_external(); |
1635 | 1607 |
} |
1636 | 1608 |
|
1637 |
virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { |
|
1638 |
return !CpuFeatures::IsSupported(SSE2) && |
|
1639 |
!IsDoubleOrFloatElementsKind(hydrogen()->elements_kind()); |
|
1640 |
} |
|
1641 |
|
|
1642 | 1609 |
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") |
1643 | 1610 |
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) |
1644 | 1611 |
|
... | ... | |
2061 | 2028 |
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") |
2062 | 2029 |
DECLARE_HYDROGEN_ACCESSOR(CallRuntime) |
2063 | 2030 |
|
2031 |
virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { |
|
2032 |
return save_doubles() == kDontSaveFPRegs; |
|
2033 |
} |
|
2034 |
|
|
2064 | 2035 |
const Runtime::Function* function() const { return hydrogen()->function(); } |
2065 | 2036 |
int arity() const { return hydrogen()->argument_count(); } |
2037 |
SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } |
|
2066 | 2038 |
}; |
2067 | 2039 |
|
2068 | 2040 |
|
... | ... | |
2105 | 2077 |
}; |
2106 | 2078 |
|
2107 | 2079 |
|
2080 |
class LUint32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
|
2081 |
public: |
|
2082 |
explicit LUint32ToSmi(LOperand* value) { |
|
2083 |
inputs_[0] = value; |
|
2084 |
} |
|
2085 |
|
|
2086 |
LOperand* value() { return inputs_[0]; } |
|
2087 |
|
|
2088 |
DECLARE_CONCRETE_INSTRUCTION(Uint32ToSmi, "uint32-to-smi") |
|
2089 |
DECLARE_HYDROGEN_ACCESSOR(Change) |
|
2090 |
}; |
|
2091 |
|
|
2092 |
|
|
2108 | 2093 |
class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2109 | 2094 |
public: |
2110 | 2095 |
explicit LNumberTagI(LOperand* value) { |
... | ... | |
2189 | 2174 |
LOperand* temp() { return temps_[0]; } |
2190 | 2175 |
|
2191 | 2176 |
DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
2192 |
DECLARE_HYDROGEN_ACCESSOR(UnaryOperation)
|
|
2177 |
DECLARE_HYDROGEN_ACCESSOR(Change)
|
|
2193 | 2178 |
|
2194 | 2179 |
bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
2195 | 2180 |
}; |
... | ... | |
2364 | 2349 |
|
2365 | 2350 |
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2366 | 2351 |
|
2367 |
Handle<Map> original_map() { return hydrogen()->original_map(); } |
|
2368 |
Handle<Map> transitioned_map() { return hydrogen()->transitioned_map(); } |
|
2352 |
Handle<Map> original_map() { return hydrogen()->original_map().handle(); } |
|
2353 |
Handle<Map> transitioned_map() { |
|
2354 |
return hydrogen()->transitioned_map().handle(); |
|
2355 |
} |
|
2369 | 2356 |
ElementsKind from_kind() { return hydrogen()->from_kind(); } |
2370 | 2357 |
ElementsKind to_kind() { return hydrogen()->to_kind(); } |
2371 | 2358 |
}; |
... | ... | |
2515 | 2502 |
|
2516 | 2503 |
class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> { |
2517 | 2504 |
public: |
2518 |
LClampTToUint8(LOperand* value, LOperand* temp) { |
|
2505 |
LClampTToUint8(LOperand* value, LOperand* temp_xmm) {
|
|
2519 | 2506 |
inputs_[0] = value; |
2520 |
temps_[0] = temp; |
|
2507 |
temps_[0] = temp_xmm;
|
|
2521 | 2508 |
} |
2522 | 2509 |
|
2523 | 2510 |
LOperand* unclamped() { return inputs_[0]; } |
2511 |
LOperand* temp_xmm() { return temps_[0]; } |
|
2524 | 2512 |
|
2525 | 2513 |
DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") |
2526 | 2514 |
}; |
... | ... | |
2742 | 2730 |
: LChunk(info, graph), |
2743 | 2731 |
num_double_slots_(0) { } |
2744 | 2732 |
|
2745 |
int GetNextSpillIndex(bool is_double);
|
|
2746 |
LOperand* GetNextSpillSlot(bool is_double);
|
|
2733 |
int GetNextSpillIndex(RegisterKind kind);
|
|
2734 |
LOperand* GetNextSpillSlot(RegisterKind kind);
|
|
2747 | 2735 |
|
2748 | 2736 |
int num_double_slots() const { return num_double_slots_; } |
2749 | 2737 |
|
... | ... | |
2765 | 2753 |
next_block_(NULL), |
2766 | 2754 |
argument_count_(0), |
2767 | 2755 |
allocator_(allocator), |
2768 |
position_(RelocInfo::kNoPosition), |
|
2769 | 2756 |
instruction_pending_deoptimization_environment_(NULL), |
2770 | 2757 |
pending_deoptimization_ast_id_(BailoutId::None()) { } |
2771 | 2758 |
|
2772 | 2759 |
// Build the sequence for the graph. |
2773 | 2760 |
LPlatformChunk* Build(); |
2774 | 2761 |
|
2762 |
LInstruction* CheckElideControlInstruction(HControlInstruction* instr); |
|
2763 |
|
|
2775 | 2764 |
// Declare methods that deal with the individual node types. |
2776 | 2765 |
#define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2777 | 2766 |
HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
... | ... | |
2907 | 2896 |
LInstruction* DoArithmeticD(Token::Value op, |
2908 | 2897 |
HArithmeticBinaryOperation* instr); |
2909 | 2898 |
LInstruction* DoArithmeticT(Token::Value op, |
2910 |
HArithmeticBinaryOperation* instr);
|
|
2899 |
HBinaryOperation* instr); |
|
2911 | 2900 |
|
2912 | 2901 |
LOperand* GetStoreKeyedValueOperand(HStoreKeyed* instr); |
2913 | 2902 |
|
... | ... | |
2921 | 2910 |
HBasicBlock* next_block_; |
2922 | 2911 |
int argument_count_; |
2923 | 2912 |
LAllocator* allocator_; |
2924 |
int position_; |
|
2925 | 2913 |
LInstruction* instruction_pending_deoptimization_environment_; |
2926 | 2914 |
BailoutId pending_deoptimization_ast_id_; |
2927 | 2915 |
|
Also available in: Unified diff