| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 V(ClassOfTestAndBranch) \ | 98 V(ClassOfTestAndBranch) \ |
| 99 V(CompareNumericAndBranch) \ | 99 V(CompareNumericAndBranch) \ |
| 100 V(CompareGeneric) \ | 100 V(CompareGeneric) \ |
| 101 V(CompareObjectEqAndBranch) \ | 101 V(CompareObjectEqAndBranch) \ |
| 102 V(CompareMap) \ | 102 V(CompareMap) \ |
| 103 V(CompareConstantEqAndBranch) \ | 103 V(CompareConstantEqAndBranch) \ |
| 104 V(Constant) \ | 104 V(Constant) \ |
| 105 V(Context) \ | 105 V(Context) \ |
| 106 V(DebugBreak) \ | 106 V(DebugBreak) \ |
| 107 V(DeclareGlobals) \ | 107 V(DeclareGlobals) \ |
| 108 V(DeleteProperty) \ | |
| 109 V(Deoptimize) \ | 108 V(Deoptimize) \ |
| 110 V(Div) \ | 109 V(Div) \ |
| 111 V(DummyUse) \ | 110 V(DummyUse) \ |
| 112 V(ElementsKind) \ | 111 V(ElementsKind) \ |
| 113 V(EnterInlined) \ | 112 V(EnterInlined) \ |
| 114 V(EnvironmentMarker) \ | 113 V(EnvironmentMarker) \ |
| 115 V(ForceRepresentation) \ | 114 V(ForceRepresentation) \ |
| 116 V(FunctionLiteral) \ | 115 V(FunctionLiteral) \ |
| 117 V(GetCachedArrayIndex) \ | 116 V(GetCachedArrayIndex) \ |
| 118 V(GlobalObject) \ | 117 V(GlobalObject) \ |
| 119 V(GlobalReceiver) \ | 118 V(GlobalReceiver) \ |
| 120 V(Goto) \ | 119 V(Goto) \ |
| 121 V(HasCachedArrayIndexAndBranch) \ | 120 V(HasCachedArrayIndexAndBranch) \ |
| 122 V(HasInstanceTypeAndBranch) \ | 121 V(HasInstanceTypeAndBranch) \ |
| 123 V(InductionVariableAnnotation) \ | 122 V(InductionVariableAnnotation) \ |
| 124 V(In) \ | |
| 125 V(InnerAllocatedObject) \ | 123 V(InnerAllocatedObject) \ |
| 126 V(InstanceOf) \ | 124 V(InstanceOf) \ |
| 127 V(InstanceOfKnownGlobal) \ | 125 V(InstanceOfKnownGlobal) \ |
| 128 V(InstanceSize) \ | 126 V(InstanceSize) \ |
| 129 V(InvokeFunction) \ | 127 V(InvokeFunction) \ |
| 130 V(IsConstructCallAndBranch) \ | 128 V(IsConstructCallAndBranch) \ |
| 131 V(IsObjectAndBranch) \ | 129 V(IsObjectAndBranch) \ |
| 132 V(IsNumberAndBranch) \ | 130 V(IsNumberAndBranch) \ |
| 133 V(IsStringAndBranch) \ | 131 V(IsStringAndBranch) \ |
| 134 V(IsSmiAndBranch) \ | 132 V(IsSmiAndBranch) \ |
| (...skipping 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 SetFlag(kUseGVN); | 2829 SetFlag(kUseGVN); |
| 2832 target_in_new_space_ = Isolate::Current()->heap()->InNewSpace(*function); | 2830 target_in_new_space_ = Isolate::Current()->heap()->InNewSpace(*function); |
| 2833 } | 2831 } |
| 2834 | 2832 |
| 2835 virtual Representation RequiredInputRepresentation(int index) { | 2833 virtual Representation RequiredInputRepresentation(int index) { |
| 2836 return Representation::Tagged(); | 2834 return Representation::Tagged(); |
| 2837 } | 2835 } |
| 2838 virtual void PrintDataTo(StringStream* stream); | 2836 virtual void PrintDataTo(StringStream* stream); |
| 2839 virtual HType CalculateInferredType(); | 2837 virtual HType CalculateInferredType(); |
| 2840 | 2838 |
| 2841 virtual HValue* Canonicalize(); | |
| 2842 | |
| 2843 #ifdef DEBUG | 2839 #ifdef DEBUG |
| 2844 virtual void Verify(); | 2840 virtual void Verify(); |
| 2845 #endif | 2841 #endif |
| 2846 | 2842 |
| 2847 virtual void FinalizeUniqueValueId() { | 2843 virtual void FinalizeUniqueValueId() { |
| 2848 target_unique_id_ = UniqueValueId(target_); | 2844 target_unique_id_ = UniqueValueId(target_); |
| 2849 } | 2845 } |
| 2850 | 2846 |
| 2851 Handle<JSFunction> target() const { return target_; } | 2847 Handle<JSFunction> target() const { return target_; } |
| 2852 bool target_in_new_space() const { return target_in_new_space_; } | 2848 bool target_in_new_space() const { return target_in_new_space_; } |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3406 } | 3402 } |
| 3407 } | 3403 } |
| 3408 | 3404 |
| 3409 virtual void FinalizeUniqueValueId() { | 3405 virtual void FinalizeUniqueValueId() { |
| 3410 if (!has_double_value_) { | 3406 if (!has_double_value_) { |
| 3411 ASSERT(!handle_.is_null()); | 3407 ASSERT(!handle_.is_null()); |
| 3412 unique_id_ = UniqueValueId(handle_); | 3408 unique_id_ = UniqueValueId(handle_); |
| 3413 } | 3409 } |
| 3414 } | 3410 } |
| 3415 | 3411 |
| 3416 bool UniqueValueIdsMatch(UniqueValueId other) { | |
| 3417 if (!has_double_value_) return unique_id_ == other; | |
| 3418 return false; | |
| 3419 } | |
| 3420 | |
| 3421 #ifdef DEBUG | 3412 #ifdef DEBUG |
| 3422 virtual void Verify() { } | 3413 virtual void Verify() { } |
| 3423 #endif | 3414 #endif |
| 3424 | 3415 |
| 3425 DECLARE_CONCRETE_INSTRUCTION(Constant) | 3416 DECLARE_CONCRETE_INSTRUCTION(Constant) |
| 3426 | 3417 |
| 3427 protected: | 3418 protected: |
| 3428 virtual Range* InferRange(Zone* zone); | 3419 virtual Range* InferRange(Zone* zone); |
| 3429 | 3420 |
| 3430 virtual bool DataEquals(HValue* other) { | 3421 virtual bool DataEquals(HValue* other) { |
| (...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5340 } | 5331 } |
| 5341 | 5332 |
| 5342 static HObjectAccess ForElementsPointer() { | 5333 static HObjectAccess ForElementsPointer() { |
| 5343 return HObjectAccess(kElementsPointer, JSObject::kElementsOffset); | 5334 return HObjectAccess(kElementsPointer, JSObject::kElementsOffset); |
| 5344 } | 5335 } |
| 5345 | 5336 |
| 5346 static HObjectAccess ForArrayLength() { | 5337 static HObjectAccess ForArrayLength() { |
| 5347 return HObjectAccess(kArrayLengths, JSArray::kLengthOffset); | 5338 return HObjectAccess(kArrayLengths, JSArray::kLengthOffset); |
| 5348 } | 5339 } |
| 5349 | 5340 |
| 5350 static HObjectAccess ForAllocationSitePayload() { | 5341 static HObjectAccess ForAllocationSiteTransitionInfo() { |
| 5351 return HObjectAccess(kInobject, AllocationSite::kPayloadOffset); | 5342 return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset); |
| 5352 } | 5343 } |
| 5353 | 5344 |
| 5354 static HObjectAccess ForFixedArrayLength() { | 5345 static HObjectAccess ForFixedArrayLength() { |
| 5355 return HObjectAccess(kArrayLengths, FixedArray::kLengthOffset); | 5346 return HObjectAccess(kArrayLengths, FixedArray::kLengthOffset); |
| 5356 } | 5347 } |
| 5357 | 5348 |
| 5358 static HObjectAccess ForPropertiesPointer() { | 5349 static HObjectAccess ForPropertiesPointer() { |
| 5359 return HObjectAccess(kInobject, JSObject::kPropertiesOffset); | 5350 return HObjectAccess(kInobject, JSObject::kPropertiesOffset); |
| 5360 } | 5351 } |
| 5361 | 5352 |
| (...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6525 : Representation::Integer32(); | 6516 : Representation::Integer32(); |
| 6526 } | 6517 } |
| 6527 | 6518 |
| 6528 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) | 6519 DECLARE_CONCRETE_INSTRUCTION(SeqStringSetChar) |
| 6529 | 6520 |
| 6530 private: | 6521 private: |
| 6531 String::Encoding encoding_; | 6522 String::Encoding encoding_; |
| 6532 }; | 6523 }; |
| 6533 | 6524 |
| 6534 | 6525 |
| 6535 class HDeleteProperty: public HBinaryOperation { | |
| 6536 public: | |
| 6537 HDeleteProperty(HValue* context, HValue* obj, HValue* key) | |
| 6538 : HBinaryOperation(context, obj, key) { | |
| 6539 set_representation(Representation::Tagged()); | |
| 6540 SetAllSideEffects(); | |
| 6541 } | |
| 6542 | |
| 6543 virtual Representation RequiredInputRepresentation(int index) { | |
| 6544 return Representation::Tagged(); | |
| 6545 } | |
| 6546 | |
| 6547 virtual HType CalculateInferredType(); | |
| 6548 | |
| 6549 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty) | |
| 6550 | |
| 6551 HValue* object() { return left(); } | |
| 6552 HValue* key() { return right(); } | |
| 6553 }; | |
| 6554 | |
| 6555 | |
| 6556 class HIn: public HTemplateInstruction<3> { | |
| 6557 public: | |
| 6558 HIn(HValue* context, HValue* key, HValue* object) { | |
| 6559 SetOperandAt(0, context); | |
| 6560 SetOperandAt(1, key); | |
| 6561 SetOperandAt(2, object); | |
| 6562 set_representation(Representation::Tagged()); | |
| 6563 SetAllSideEffects(); | |
| 6564 } | |
| 6565 | |
| 6566 HValue* context() { return OperandAt(0); } | |
| 6567 HValue* key() { return OperandAt(1); } | |
| 6568 HValue* object() { return OperandAt(2); } | |
| 6569 | |
| 6570 virtual Representation RequiredInputRepresentation(int index) { | |
| 6571 return Representation::Tagged(); | |
| 6572 } | |
| 6573 | |
| 6574 virtual HType CalculateInferredType() { | |
| 6575 return HType::Boolean(); | |
| 6576 } | |
| 6577 | |
| 6578 virtual void PrintDataTo(StringStream* stream); | |
| 6579 | |
| 6580 DECLARE_CONCRETE_INSTRUCTION(In) | |
| 6581 }; | |
| 6582 | |
| 6583 | |
| 6584 class HCheckMapValue: public HTemplateInstruction<2> { | 6526 class HCheckMapValue: public HTemplateInstruction<2> { |
| 6585 public: | 6527 public: |
| 6586 HCheckMapValue(HValue* value, | 6528 HCheckMapValue(HValue* value, |
| 6587 HValue* map) { | 6529 HValue* map) { |
| 6588 SetOperandAt(0, value); | 6530 SetOperandAt(0, value); |
| 6589 SetOperandAt(1, map); | 6531 SetOperandAt(1, map); |
| 6590 set_representation(Representation::Tagged()); | 6532 set_representation(Representation::Tagged()); |
| 6591 SetFlag(kUseGVN); | 6533 SetFlag(kUseGVN); |
| 6592 SetGVNFlag(kDependsOnMaps); | 6534 SetGVNFlag(kDependsOnMaps); |
| 6593 SetGVNFlag(kDependsOnElementsKind); | 6535 SetGVNFlag(kDependsOnElementsKind); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6710 virtual bool IsDeletable() const { return true; } | 6652 virtual bool IsDeletable() const { return true; } |
| 6711 }; | 6653 }; |
| 6712 | 6654 |
| 6713 | 6655 |
| 6714 #undef DECLARE_INSTRUCTION | 6656 #undef DECLARE_INSTRUCTION |
| 6715 #undef DECLARE_CONCRETE_INSTRUCTION | 6657 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6716 | 6658 |
| 6717 } } // namespace v8::internal | 6659 } } // namespace v8::internal |
| 6718 | 6660 |
| 6719 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6661 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |