| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero(); | 252 return lower_ == kMinInt && upper_ == kMaxInt && CanBeMinusZero(); |
| 253 } | 253 } |
| 254 bool IsInSmiRange() const { | 254 bool IsInSmiRange() const { |
| 255 return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue; | 255 return lower_ >= Smi::kMinValue && upper_ <= Smi::kMaxValue; |
| 256 } | 256 } |
| 257 void ClampToSmi() { | 257 void ClampToSmi() { |
| 258 lower_ = Max(lower_, Smi::kMinValue); | 258 lower_ = Max(lower_, Smi::kMinValue); |
| 259 upper_ = Min(upper_, Smi::kMaxValue); | 259 upper_ = Min(upper_, Smi::kMaxValue); |
| 260 } | 260 } |
| 261 void KeepOrder(); | 261 void KeepOrder(); |
| 262 #ifdef DEBUG | 262 #if DCHECK_IS_ON |
| 263 void Verify() const; | 263 void Verify() const; |
| 264 #endif | 264 #endif |
| 265 | 265 |
| 266 void StackUpon(Range* other) { | 266 void StackUpon(Range* other) { |
| 267 Intersect(other); | 267 Intersect(other); |
| 268 next_ = other; | 268 next_ = other; |
| 269 } | 269 } |
| 270 | 270 |
| 271 void Intersect(Range* other); | 271 void Intersect(Range* other); |
| 272 void Union(Range* other); | 272 void Union(Range* other); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 bool IsBitwiseBinaryShift() { | 552 bool IsBitwiseBinaryShift() { |
| 553 return IsShl() || IsShr() || IsSar(); | 553 return IsShl() || IsShr() || IsSar(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 explicit HValue(HType type = HType::Tagged()) | 556 explicit HValue(HType type = HType::Tagged()) |
| 557 : block_(NULL), | 557 : block_(NULL), |
| 558 id_(kNoNumber), | 558 id_(kNoNumber), |
| 559 type_(type), | 559 type_(type), |
| 560 use_list_(NULL), | 560 use_list_(NULL), |
| 561 range_(NULL), | 561 range_(NULL), |
| 562 #ifdef DEBUG | 562 #if DCHECK_IS_ON |
| 563 range_poisoned_(false), | 563 range_poisoned_(false), |
| 564 #endif | 564 #endif |
| 565 flags_(0) {} | 565 flags_(0) {} |
| 566 virtual ~HValue() {} | 566 virtual ~HValue() {} |
| 567 | 567 |
| 568 virtual HSourcePosition position() const { | 568 virtual HSourcePosition position() const { |
| 569 return HSourcePosition::Unknown(); | 569 return HSourcePosition::Unknown(); |
| 570 } | 570 } |
| 571 virtual HSourcePosition operand_position(int index) const { | 571 virtual HSourcePosition operand_position(int index) const { |
| 572 return position(); | 572 return position(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 } | 732 } |
| 733 | 733 |
| 734 Range* range() const { | 734 Range* range() const { |
| 735 DCHECK(!range_poisoned_); | 735 DCHECK(!range_poisoned_); |
| 736 return range_; | 736 return range_; |
| 737 } | 737 } |
| 738 bool HasRange() const { | 738 bool HasRange() const { |
| 739 DCHECK(!range_poisoned_); | 739 DCHECK(!range_poisoned_); |
| 740 return range_ != NULL; | 740 return range_ != NULL; |
| 741 } | 741 } |
| 742 #ifdef DEBUG | 742 #if DCHECK_IS_ON |
| 743 void PoisonRange() { range_poisoned_ = true; } | 743 void PoisonRange() { range_poisoned_ = true; } |
| 744 #endif | 744 #endif |
| 745 void AddNewRange(Range* r, Zone* zone); | 745 void AddNewRange(Range* r, Zone* zone); |
| 746 void RemoveLastAddedRange(); | 746 void RemoveLastAddedRange(); |
| 747 void ComputeInitialRange(Zone* zone); | 747 void ComputeInitialRange(Zone* zone); |
| 748 | 748 |
| 749 // Escape analysis helpers. | 749 // Escape analysis helpers. |
| 750 virtual bool HasEscapingOperandAt(int index) { return true; } | 750 virtual bool HasEscapingOperandAt(int index) { return true; } |
| 751 virtual bool HasOutOfBoundsAccess(int size) { return false; } | 751 virtual bool HasOutOfBoundsAccess(int size) { return false; } |
| 752 | 752 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 HValue* dominator) { | 796 HValue* dominator) { |
| 797 UNREACHABLE(); | 797 UNREACHABLE(); |
| 798 return false; | 798 return false; |
| 799 } | 799 } |
| 800 | 800 |
| 801 // Check if this instruction has some reason that prevents elimination. | 801 // Check if this instruction has some reason that prevents elimination. |
| 802 bool CannotBeEliminated() const { | 802 bool CannotBeEliminated() const { |
| 803 return HasObservableSideEffects() || !IsDeletable(); | 803 return HasObservableSideEffects() || !IsDeletable(); |
| 804 } | 804 } |
| 805 | 805 |
| 806 #ifdef DEBUG | 806 #if DCHECK_IS_ON |
| 807 virtual void Verify() = 0; | 807 virtual void Verify() = 0; |
| 808 #endif | 808 #endif |
| 809 | 809 |
| 810 virtual bool TryDecompose(DecompositionResult* decomposition) { | 810 virtual bool TryDecompose(DecompositionResult* decomposition) { |
| 811 if (RedefinedOperand() != NULL) { | 811 if (RedefinedOperand() != NULL) { |
| 812 return RedefinedOperand()->TryDecompose(decomposition); | 812 return RedefinedOperand()->TryDecompose(decomposition); |
| 813 } else { | 813 } else { |
| 814 return false; | 814 return false; |
| 815 } | 815 } |
| 816 } | 816 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 HBasicBlock* block_; | 909 HBasicBlock* block_; |
| 910 | 910 |
| 911 // The id of this instruction in the hydrogen graph, assigned when first | 911 // The id of this instruction in the hydrogen graph, assigned when first |
| 912 // added to the graph. Reflects creation order. | 912 // added to the graph. Reflects creation order. |
| 913 int id_; | 913 int id_; |
| 914 | 914 |
| 915 Representation representation_; | 915 Representation representation_; |
| 916 HType type_; | 916 HType type_; |
| 917 HUseListNode* use_list_; | 917 HUseListNode* use_list_; |
| 918 Range* range_; | 918 Range* range_; |
| 919 #ifdef DEBUG | 919 #if DCHECK_IS_ON |
| 920 bool range_poisoned_; | 920 bool range_poisoned_; |
| 921 #endif | 921 #endif |
| 922 int flags_; | 922 int flags_; |
| 923 GVNFlagSet changes_flags_; | 923 GVNFlagSet changes_flags_; |
| 924 GVNFlagSet depends_on_flags_; | 924 GVNFlagSet depends_on_flags_; |
| 925 | 925 |
| 926 private: | 926 private: |
| 927 virtual bool IsDeletable() const { return false; } | 927 virtual bool IsDeletable() const { return false; } |
| 928 | 928 |
| 929 DISALLOW_COPY_AND_ASSIGN(HValue); | 929 DISALLOW_COPY_AND_ASSIGN(HValue); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 position_.ensure_storage_for_operand_positions(zone, OperandCount()); | 1189 position_.ensure_storage_for_operand_positions(zone, OperandCount()); |
| 1190 position_.set_operand_position(index, pos); | 1190 position_.set_operand_position(index, pos); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 bool Dominates(HInstruction* other); | 1193 bool Dominates(HInstruction* other); |
| 1194 bool CanTruncateToSmi() const { return CheckFlag(kTruncatingToSmi); } | 1194 bool CanTruncateToSmi() const { return CheckFlag(kTruncatingToSmi); } |
| 1195 bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } | 1195 bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } |
| 1196 | 1196 |
| 1197 virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; | 1197 virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; |
| 1198 | 1198 |
| 1199 #ifdef DEBUG | 1199 #if DCHECK_IS_ON |
| 1200 virtual void Verify() OVERRIDE; | 1200 virtual void Verify() OVERRIDE; |
| 1201 #endif | 1201 #endif |
| 1202 | 1202 |
| 1203 bool CanDeoptimize(); | 1203 bool CanDeoptimize(); |
| 1204 | 1204 |
| 1205 virtual bool HasStackCheck() { return false; } | 1205 virtual bool HasStackCheck() { return false; } |
| 1206 | 1206 |
| 1207 DECLARE_ABSTRACT_INSTRUCTION(Instruction) | 1207 DECLARE_ABSTRACT_INSTRUCTION(Instruction) |
| 1208 | 1208 |
| 1209 protected: | 1209 protected: |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1868 void MergeWith(ZoneList<HSimulate*>* list); | 1868 void MergeWith(ZoneList<HSimulate*>* list); |
| 1869 bool is_candidate_for_removal() { | 1869 bool is_candidate_for_removal() { |
| 1870 return RemovableField::decode(bit_field_) == REMOVABLE_SIMULATE; | 1870 return RemovableField::decode(bit_field_) == REMOVABLE_SIMULATE; |
| 1871 } | 1871 } |
| 1872 | 1872 |
| 1873 // Replay effects of this instruction on the given environment. | 1873 // Replay effects of this instruction on the given environment. |
| 1874 void ReplayEnvironment(HEnvironment* env); | 1874 void ReplayEnvironment(HEnvironment* env); |
| 1875 | 1875 |
| 1876 DECLARE_CONCRETE_INSTRUCTION(Simulate) | 1876 DECLARE_CONCRETE_INSTRUCTION(Simulate) |
| 1877 | 1877 |
| 1878 #ifdef DEBUG | 1878 #if DCHECK_IS_ON |
| 1879 virtual void Verify() OVERRIDE; | 1879 virtual void Verify() OVERRIDE; |
| 1880 void set_closure(Handle<JSFunction> closure) { closure_ = closure; } | 1880 void set_closure(Handle<JSFunction> closure) { closure_ = closure; } |
| 1881 Handle<JSFunction> closure() const { return closure_; } | 1881 Handle<JSFunction> closure() const { return closure_; } |
| 1882 #endif | 1882 #endif |
| 1883 | 1883 |
| 1884 protected: | 1884 protected: |
| 1885 virtual void InternalSetOperandAt(int index, HValue* value) OVERRIDE { | 1885 virtual void InternalSetOperandAt(int index, HValue* value) OVERRIDE { |
| 1886 values_[index] = value; | 1886 values_[index] = value; |
| 1887 } | 1887 } |
| 1888 | 1888 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1912 class RemovableField : public BitField<RemovableSimulate, 0, 1> {}; | 1912 class RemovableField : public BitField<RemovableSimulate, 0, 1> {}; |
| 1913 class DoneWithReplayField : public BitField<bool, 1, 1> {}; | 1913 class DoneWithReplayField : public BitField<bool, 1, 1> {}; |
| 1914 | 1914 |
| 1915 BailoutId ast_id_; | 1915 BailoutId ast_id_; |
| 1916 int pop_count_; | 1916 int pop_count_; |
| 1917 ZoneList<HValue*> values_; | 1917 ZoneList<HValue*> values_; |
| 1918 ZoneList<int> assigned_indexes_; | 1918 ZoneList<int> assigned_indexes_; |
| 1919 Zone* zone_; | 1919 Zone* zone_; |
| 1920 uint32_t bit_field_; | 1920 uint32_t bit_field_; |
| 1921 | 1921 |
| 1922 #ifdef DEBUG | 1922 #if DCHECK_IS_ON |
| 1923 Handle<JSFunction> closure_; | 1923 Handle<JSFunction> closure_; |
| 1924 #endif | 1924 #endif |
| 1925 }; | 1925 }; |
| 1926 | 1926 |
| 1927 | 1927 |
| 1928 class HEnvironmentMarker FINAL : public HTemplateInstruction<1> { | 1928 class HEnvironmentMarker FINAL : public HTemplateInstruction<1> { |
| 1929 public: | 1929 public: |
| 1930 enum Kind { BIND, LOOKUP }; | 1930 enum Kind { BIND, LOOKUP }; |
| 1931 | 1931 |
| 1932 DECLARE_INSTRUCTION_FACTORY_P2(HEnvironmentMarker, Kind, int); | 1932 DECLARE_INSTRUCTION_FACTORY_P2(HEnvironmentMarker, Kind, int); |
| 1933 | 1933 |
| 1934 Kind kind() const { return kind_; } | 1934 Kind kind() const { return kind_; } |
| 1935 int index() const { return index_; } | 1935 int index() const { return index_; } |
| 1936 HSimulate* next_simulate() { return next_simulate_; } | 1936 HSimulate* next_simulate() { return next_simulate_; } |
| 1937 void set_next_simulate(HSimulate* simulate) { | 1937 void set_next_simulate(HSimulate* simulate) { |
| 1938 next_simulate_ = simulate; | 1938 next_simulate_ = simulate; |
| 1939 } | 1939 } |
| 1940 | 1940 |
| 1941 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { | 1941 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 1942 return Representation::None(); | 1942 return Representation::None(); |
| 1943 } | 1943 } |
| 1944 | 1944 |
| 1945 virtual std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 1945 virtual std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 1946 | 1946 |
| 1947 #ifdef DEBUG | 1947 #if DCHECK_IS_ON |
| 1948 void set_closure(Handle<JSFunction> closure) { | 1948 void set_closure(Handle<JSFunction> closure) { |
| 1949 DCHECK(closure_.is_null()); | 1949 DCHECK(closure_.is_null()); |
| 1950 DCHECK(!closure.is_null()); | 1950 DCHECK(!closure.is_null()); |
| 1951 closure_ = closure; | 1951 closure_ = closure; |
| 1952 } | 1952 } |
| 1953 Handle<JSFunction> closure() const { return closure_; } | 1953 Handle<JSFunction> closure() const { return closure_; } |
| 1954 #endif | 1954 #endif |
| 1955 | 1955 |
| 1956 DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker); | 1956 DECLARE_CONCRETE_INSTRUCTION(EnvironmentMarker); |
| 1957 | 1957 |
| 1958 private: | 1958 private: |
| 1959 HEnvironmentMarker(Kind kind, int index) | 1959 HEnvironmentMarker(Kind kind, int index) |
| 1960 : kind_(kind), index_(index), next_simulate_(NULL) { } | 1960 : kind_(kind), index_(index), next_simulate_(NULL) { } |
| 1961 | 1961 |
| 1962 Kind kind_; | 1962 Kind kind_; |
| 1963 int index_; | 1963 int index_; |
| 1964 HSimulate* next_simulate_; | 1964 HSimulate* next_simulate_; |
| 1965 | 1965 |
| 1966 #ifdef DEBUG | 1966 #if DCHECK_IS_ON |
| 1967 Handle<JSFunction> closure_; | 1967 Handle<JSFunction> closure_; |
| 1968 #endif | 1968 #endif |
| 1969 }; | 1969 }; |
| 1970 | 1970 |
| 1971 | 1971 |
| 1972 class HStackCheck FINAL : public HTemplateInstruction<1> { | 1972 class HStackCheck FINAL : public HTemplateInstruction<1> { |
| 1973 public: | 1973 public: |
| 1974 enum Type { | 1974 enum Type { |
| 1975 kFunctionEntry, | 1975 kFunctionEntry, |
| 1976 kBackwardsBranch | 1976 kBackwardsBranch |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2903 object_ = Unique<HeapObject>(object_.handle()); | 2903 object_ = Unique<HeapObject>(object_.handle()); |
| 2904 } | 2904 } |
| 2905 | 2905 |
| 2906 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { | 2906 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 2907 return Representation::Tagged(); | 2907 return Representation::Tagged(); |
| 2908 } | 2908 } |
| 2909 virtual std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT | 2909 virtual std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 2910 | 2910 |
| 2911 virtual HValue* Canonicalize() OVERRIDE; | 2911 virtual HValue* Canonicalize() OVERRIDE; |
| 2912 | 2912 |
| 2913 #ifdef DEBUG | 2913 #if DCHECK_IS_ON |
| 2914 virtual void Verify() OVERRIDE; | 2914 virtual void Verify() OVERRIDE; |
| 2915 #endif | 2915 #endif |
| 2916 | 2916 |
| 2917 Unique<HeapObject> object() const { return object_; } | 2917 Unique<HeapObject> object() const { return object_; } |
| 2918 bool object_in_new_space() const { return object_in_new_space_; } | 2918 bool object_in_new_space() const { return object_in_new_space_; } |
| 2919 | 2919 |
| 2920 DECLARE_CONCRETE_INSTRUCTION(CheckValue) | 2920 DECLARE_CONCRETE_INSTRUCTION(CheckValue) |
| 2921 | 2921 |
| 2922 protected: | 2922 protected: |
| 2923 virtual bool DataEquals(HValue* other) OVERRIDE { | 2923 virtual bool DataEquals(HValue* other) OVERRIDE { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3039 virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } | 3039 virtual bool HasEscapingOperandAt(int index) OVERRIDE { return false; } |
| 3040 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { | 3040 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { |
| 3041 return Representation::Tagged(); | 3041 return Representation::Tagged(); |
| 3042 } | 3042 } |
| 3043 | 3043 |
| 3044 virtual HType CalculateInferredType() OVERRIDE { | 3044 virtual HType CalculateInferredType() OVERRIDE { |
| 3045 if (value()->type().IsHeapObject()) return value()->type(); | 3045 if (value()->type().IsHeapObject()) return value()->type(); |
| 3046 return HType::HeapObject(); | 3046 return HType::HeapObject(); |
| 3047 } | 3047 } |
| 3048 | 3048 |
| 3049 #ifdef DEBUG | 3049 #if DCHECK_IS_ON |
| 3050 virtual void Verify() OVERRIDE; | 3050 virtual void Verify() OVERRIDE; |
| 3051 #endif | 3051 #endif |
| 3052 | 3052 |
| 3053 virtual HValue* Canonicalize() OVERRIDE { | 3053 virtual HValue* Canonicalize() OVERRIDE { |
| 3054 return value()->type().IsHeapObject() ? NULL : this; | 3054 return value()->type().IsHeapObject() ? NULL : this; |
| 3055 } | 3055 } |
| 3056 | 3056 |
| 3057 DECLARE_CONCRETE_INSTRUCTION(CheckHeapObject) | 3057 DECLARE_CONCRETE_INSTRUCTION(CheckHeapObject) |
| 3058 | 3058 |
| 3059 protected: | 3059 protected: |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3340 return IsInductionVariable() && | 3340 return IsInductionVariable() && |
| 3341 induction_variable_data_->limit() != NULL; | 3341 induction_variable_data_->limit() != NULL; |
| 3342 } | 3342 } |
| 3343 void DetectInductionVariable() { | 3343 void DetectInductionVariable() { |
| 3344 DCHECK(induction_variable_data_ == NULL); | 3344 DCHECK(induction_variable_data_ == NULL); |
| 3345 induction_variable_data_ = InductionVariableData::ExaminePhi(this); | 3345 induction_variable_data_ = InductionVariableData::ExaminePhi(this); |
| 3346 } | 3346 } |
| 3347 | 3347 |
| 3348 virtual std::ostream& PrintTo(std::ostream& os) const OVERRIDE; // NOLINT | 3348 virtual std::ostream& PrintTo(std::ostream& os) const OVERRIDE; // NOLINT |
| 3349 | 3349 |
| 3350 #ifdef DEBUG | 3350 #if DCHECK_IS_ON |
| 3351 virtual void Verify() OVERRIDE; | 3351 virtual void Verify() OVERRIDE; |
| 3352 #endif | 3352 #endif |
| 3353 | 3353 |
| 3354 void InitRealUses(int id); | 3354 void InitRealUses(int id); |
| 3355 void AddNonPhiUsesFrom(HPhi* other); | 3355 void AddNonPhiUsesFrom(HPhi* other); |
| 3356 void AddIndirectUsesTo(int* use_count); | 3356 void AddIndirectUsesTo(int* use_count); |
| 3357 | 3357 |
| 3358 int tagged_non_phi_uses() const { | 3358 int tagged_non_phi_uses() const { |
| 3359 return non_phi_uses_[Representation::kTagged]; | 3359 return non_phi_uses_[Representation::kTagged]; |
| 3360 } | 3360 } |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3732 if (other_constant->HasInteger32Value() || | 3732 if (other_constant->HasInteger32Value() || |
| 3733 other_constant->HasDoubleValue() || | 3733 other_constant->HasDoubleValue() || |
| 3734 other_constant->HasExternalReferenceValue()) { | 3734 other_constant->HasExternalReferenceValue()) { |
| 3735 return false; | 3735 return false; |
| 3736 } | 3736 } |
| 3737 DCHECK(!object_.handle().is_null()); | 3737 DCHECK(!object_.handle().is_null()); |
| 3738 return other_constant->object_ == object_; | 3738 return other_constant->object_ == object_; |
| 3739 } | 3739 } |
| 3740 } | 3740 } |
| 3741 | 3741 |
| 3742 #ifdef DEBUG | 3742 #if DCHECK_IS_ON |
| 3743 virtual void Verify() OVERRIDE { } | 3743 virtual void Verify() OVERRIDE { } |
| 3744 #endif | 3744 #endif |
| 3745 | 3745 |
| 3746 DECLARE_CONCRETE_INSTRUCTION(Constant) | 3746 DECLARE_CONCRETE_INSTRUCTION(Constant) |
| 3747 | 3747 |
| 3748 protected: | 3748 protected: |
| 3749 virtual Range* InferRange(Zone* zone) OVERRIDE; | 3749 virtual Range* InferRange(Zone* zone) OVERRIDE; |
| 3750 | 3750 |
| 3751 private: | 3751 private: |
| 3752 friend class HGraph; | 3752 friend class HGraph; |
| (...skipping 3917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7670 | 7670 |
| 7671 private: | 7671 private: |
| 7672 explicit HToFastProperties(HValue* value) : HUnaryOperation(value) { | 7672 explicit HToFastProperties(HValue* value) : HUnaryOperation(value) { |
| 7673 set_representation(Representation::Tagged()); | 7673 set_representation(Representation::Tagged()); |
| 7674 SetChangesFlag(kNewSpacePromotion); | 7674 SetChangesFlag(kNewSpacePromotion); |
| 7675 | 7675 |
| 7676 // This instruction is not marked as kChangesMaps, but does | 7676 // This instruction is not marked as kChangesMaps, but does |
| 7677 // change the map of the input operand. Use it only when creating | 7677 // change the map of the input operand. Use it only when creating |
| 7678 // object literals via a runtime call. | 7678 // object literals via a runtime call. |
| 7679 DCHECK(value->IsCallRuntime()); | 7679 DCHECK(value->IsCallRuntime()); |
| 7680 #ifdef DEBUG | 7680 #if DCHECK_IS_ON |
| 7681 const Runtime::Function* function = HCallRuntime::cast(value)->function(); | 7681 const Runtime::Function* function = HCallRuntime::cast(value)->function(); |
| 7682 DCHECK(function->function_id == Runtime::kCreateObjectLiteral); | 7682 DCHECK(function->function_id == Runtime::kCreateObjectLiteral); |
| 7683 #endif | 7683 #endif |
| 7684 } | 7684 } |
| 7685 | 7685 |
| 7686 virtual bool IsDeletable() const OVERRIDE { return true; } | 7686 virtual bool IsDeletable() const OVERRIDE { return true; } |
| 7687 }; | 7687 }; |
| 7688 | 7688 |
| 7689 | 7689 |
| 7690 class HDateField FINAL : public HUnaryOperation { | 7690 class HDateField FINAL : public HUnaryOperation { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7996 }; | 7996 }; |
| 7997 | 7997 |
| 7998 | 7998 |
| 7999 | 7999 |
| 8000 #undef DECLARE_INSTRUCTION | 8000 #undef DECLARE_INSTRUCTION |
| 8001 #undef DECLARE_CONCRETE_INSTRUCTION | 8001 #undef DECLARE_CONCRETE_INSTRUCTION |
| 8002 | 8002 |
| 8003 } } // namespace v8::internal | 8003 } } // namespace v8::internal |
| 8004 | 8004 |
| 8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |