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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2782 }; | 2782 }; |
2783 | 2783 |
2784 | 2784 |
2785 class HCheckValue final : public HUnaryOperation { | 2785 class HCheckValue final : public HUnaryOperation { |
2786 public: | 2786 public: |
2787 static HCheckValue* New(Isolate* isolate, Zone* zone, HValue* context, | 2787 static HCheckValue* New(Isolate* isolate, Zone* zone, HValue* context, |
2788 HValue* value, Handle<JSFunction> func) { | 2788 HValue* value, Handle<JSFunction> func) { |
2789 bool in_new_space = isolate->heap()->InNewSpace(*func); | 2789 bool in_new_space = isolate->heap()->InNewSpace(*func); |
2790 // NOTE: We create an uninitialized Unique and initialize it later. | 2790 // NOTE: We create an uninitialized Unique and initialize it later. |
2791 // This is because a JSFunction can move due to GC during graph creation. | 2791 // This is because a JSFunction can move due to GC during graph creation. |
2792 // TODO(titzer): This is a migration crutch. Replace with some kind of | |
2793 // Uniqueness scope later. | |
2794 Unique<JSFunction> target = Unique<JSFunction>::CreateUninitialized(func); | 2792 Unique<JSFunction> target = Unique<JSFunction>::CreateUninitialized(func); |
2795 HCheckValue* check = new(zone) HCheckValue(value, target, in_new_space); | 2793 HCheckValue* check = new(zone) HCheckValue(value, target, in_new_space); |
2796 return check; | 2794 return check; |
2797 } | 2795 } |
2798 static HCheckValue* New(Isolate* isolate, Zone* zone, HValue* context, | 2796 static HCheckValue* New(Isolate* isolate, Zone* zone, HValue* context, |
2799 HValue* value, Unique<HeapObject> target, | 2797 HValue* value, Unique<HeapObject> target, |
2800 bool object_in_new_space) { | 2798 bool object_in_new_space) { |
2801 return new(zone) HCheckValue(value, target, object_in_new_space); | 2799 return new(zone) HCheckValue(value, target, object_in_new_space); |
2802 } | 2800 } |
2803 | 2801 |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3313 ZoneList<HValue*> inputs_; | 3311 ZoneList<HValue*> inputs_; |
3314 int merged_index_ = 0; | 3312 int merged_index_ = 0; |
3315 | 3313 |
3316 int phi_id_ = -1; | 3314 int phi_id_ = -1; |
3317 InductionVariableData* induction_variable_data_ = nullptr; | 3315 InductionVariableData* induction_variable_data_ = nullptr; |
3318 | 3316 |
3319 Representation representation_from_indirect_uses_ = Representation::None(); | 3317 Representation representation_from_indirect_uses_ = Representation::None(); |
3320 Representation representation_from_non_phi_uses_ = Representation::None(); | 3318 Representation representation_from_non_phi_uses_ = Representation::None(); |
3321 bool has_type_feedback_from_uses_ = false; | 3319 bool has_type_feedback_from_uses_ = false; |
3322 | 3320 |
3323 // TODO(titzer): we can't eliminate the receiver for generating backtraces | |
3324 bool IsDeletable() const override { return !IsReceiver(); } | 3321 bool IsDeletable() const override { return !IsReceiver(); } |
3325 }; | 3322 }; |
3326 | 3323 |
3327 | 3324 |
3328 // Common base class for HArgumentsObject and HCapturedObject. | 3325 // Common base class for HArgumentsObject and HCapturedObject. |
3329 class HDematerializedObject : public HInstruction { | 3326 class HDematerializedObject : public HInstruction { |
3330 public: | 3327 public: |
3331 HDematerializedObject(int count, Zone* zone) : values_(count, zone) {} | 3328 HDematerializedObject(int count, Zone* zone) : values_(count, zone) {} |
3332 | 3329 |
3333 int OperandCount() const final { return values_.length(); } | 3330 int OperandCount() const final { return values_.length(); } |
(...skipping 4438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7772 | 7769 |
7773 | 7770 |
7774 | 7771 |
7775 #undef DECLARE_INSTRUCTION | 7772 #undef DECLARE_INSTRUCTION |
7776 #undef DECLARE_CONCRETE_INSTRUCTION | 7773 #undef DECLARE_CONCRETE_INSTRUCTION |
7777 | 7774 |
7778 } // namespace internal | 7775 } // namespace internal |
7779 } // namespace v8 | 7776 } // namespace v8 |
7780 | 7777 |
7781 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7778 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |