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_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_H_ |
7 | 7 |
8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/ast/ast-type-bounds.h" | 10 #include "src/ast/ast-type-bounds.h" |
(...skipping 2605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 DCHECK(Name::Equals(isolate()->factory()->length_string(), name_)); | 2616 DCHECK(Name::Equals(isolate()->factory()->length_string(), name_)); |
2617 *access = HObjectAccess::ForArrayLength(map_->elements_kind()); | 2617 *access = HObjectAccess::ForArrayLength(map_->elements_kind()); |
2618 } else { | 2618 } else { |
2619 *access = HObjectAccess::ForMapAndOffset(map_, offset); | 2619 *access = HObjectAccess::ForMapAndOffset(map_, offset); |
2620 } | 2620 } |
2621 return true; | 2621 return true; |
2622 } | 2622 } |
2623 return false; | 2623 return false; |
2624 } | 2624 } |
2625 | 2625 |
2626 bool IsJSArrayBufferViewFieldAccessor() { | |
2627 int offset; // unused | |
2628 return Accessors::IsJSArrayBufferViewFieldAccessor(map_, name_, &offset); | |
2629 } | |
2630 | |
2631 bool GetJSArrayBufferViewFieldAccess(HObjectAccess* access) { | |
2632 int offset; | |
2633 if (Accessors::IsJSArrayBufferViewFieldAccessor(map_, name_, &offset)) { | |
2634 *access = HObjectAccess::ForMapAndOffset(map_, offset); | |
2635 return true; | |
2636 } | |
2637 return false; | |
2638 } | |
2639 | |
2640 bool has_holder() { return !holder_.is_null(); } | 2626 bool has_holder() { return !holder_.is_null(); } |
2641 bool IsLoad() const { return access_type_ == LOAD; } | 2627 bool IsLoad() const { return access_type_ == LOAD; } |
2642 | 2628 |
2643 Isolate* isolate() const { return builder_->isolate(); } | 2629 Isolate* isolate() const { return builder_->isolate(); } |
2644 Handle<JSObject> holder() { return holder_; } | 2630 Handle<JSObject> holder() { return holder_; } |
2645 Handle<Object> accessor() { return accessor_; } | 2631 Handle<Object> accessor() { return accessor_; } |
2646 Handle<Object> constant() { return constant_; } | 2632 Handle<Object> constant() { return constant_; } |
2647 Handle<Map> transition() { return transition_; } | 2633 Handle<Map> transition() { return transition_; } |
2648 SmallMapList* field_maps() { return &field_maps_; } | 2634 SmallMapList* field_maps() { return &field_maps_; } |
2649 HType field_type() const { return field_type_; } | 2635 HType field_type() const { return field_type_; } |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3118 } | 3104 } |
3119 | 3105 |
3120 private: | 3106 private: |
3121 HOptimizedGraphBuilder* builder_; | 3107 HOptimizedGraphBuilder* builder_; |
3122 }; | 3108 }; |
3123 | 3109 |
3124 } // namespace internal | 3110 } // namespace internal |
3125 } // namespace v8 | 3111 } // namespace v8 |
3126 | 3112 |
3127 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3113 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
OLD | NEW |