| 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_H_ | 5 #ifndef V8_HYDROGEN_H_ |
| 6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 *access = HObjectAccess::ForMapAndOffset(map(), offset); | 2488 *access = HObjectAccess::ForMapAndOffset(map(), offset); |
| 2489 } | 2489 } |
| 2490 return true; | 2490 return true; |
| 2491 } | 2491 } |
| 2492 return false; | 2492 return false; |
| 2493 } | 2493 } |
| 2494 | 2494 |
| 2495 bool has_holder() { return !holder_.is_null(); } | 2495 bool has_holder() { return !holder_.is_null(); } |
| 2496 bool IsLoad() const { return access_type_ == LOAD; } | 2496 bool IsLoad() const { return access_type_ == LOAD; } |
| 2497 | 2497 |
| 2498 LookupResult* lookup() { return &lookup_; } | |
| 2499 Handle<JSObject> holder() { return holder_; } | 2498 Handle<JSObject> holder() { return holder_; } |
| 2500 Handle<JSFunction> accessor() { return accessor_; } | 2499 Handle<JSFunction> accessor() { return accessor_; } |
| 2501 Handle<Object> constant() { return constant_; } | 2500 Handle<Object> constant() { return constant_; } |
| 2502 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } | 2501 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } |
| 2503 SmallMapList* field_maps() { return &field_maps_; } | 2502 SmallMapList* field_maps() { return &field_maps_; } |
| 2504 HType field_type() const { return field_type_; } | 2503 HType field_type() const { return field_type_; } |
| 2505 HObjectAccess access() { return access_; } | 2504 HObjectAccess access() { return access_; } |
| 2506 | 2505 |
| 2506 bool IsFound() const { return lookup_.IsFound(); } |
| 2507 bool IsProperty() const { return lookup_.IsProperty(); } |
| 2508 bool IsField() const { return lookup_.IsField(); } |
| 2509 bool IsConstant() const { return lookup_.IsConstant(); } |
| 2510 bool IsAccessor() const { return lookup_.IsPropertyCallbacks(); } |
| 2511 bool IsTransition() const { return lookup_.IsTransition(); } |
| 2512 |
| 2513 bool IsConfigurable() const { return !lookup_.IsDontDelete(); } |
| 2514 bool IsReadOnly() const { return lookup_.IsReadOnly(); } |
| 2515 bool IsCacheable() const { return lookup_.IsCacheable(); } |
| 2516 |
| 2507 private: | 2517 private: |
| 2518 Handle<Object> GetAccessorsFromMap(Handle<Map> map) const { |
| 2519 return handle(lookup_.GetValueFromMap(*map), isolate()); |
| 2520 } |
| 2521 Handle<Object> GetConstantFromMap(Handle<Map> map) const { |
| 2522 return handle(lookup_.GetConstantFromMap(*map), isolate()); |
| 2523 } |
| 2524 Handle<HeapType> GetFieldTypeFromMap(Handle<Map> map) const { |
| 2525 return handle(lookup_.GetFieldTypeFromMap(*map), isolate()); |
| 2526 } |
| 2527 Handle<Map> GetFieldOwnerFromMap(Handle<Map> map) const { |
| 2528 return handle(lookup_.GetFieldOwnerFromMap(*map)); |
| 2529 } |
| 2530 int GetLocalFieldIndexFromMap(Handle<Map> map) const { |
| 2531 return lookup_.GetLocalFieldIndexFromMap(*map); |
| 2532 } |
| 2533 Representation representation() const { return lookup_.representation(); } |
| 2534 |
| 2508 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } | 2535 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } |
| 2509 Zone* zone() { return builder_->zone(); } | 2536 Zone* zone() { return builder_->zone(); } |
| 2510 Isolate* isolate() { return lookup_.isolate(); } | 2537 Isolate* isolate() const { return lookup_.isolate(); } |
| 2511 CompilationInfo* top_info() { return builder_->top_info(); } | 2538 CompilationInfo* top_info() { return builder_->top_info(); } |
| 2512 CompilationInfo* current_info() { return builder_->current_info(); } | 2539 CompilationInfo* current_info() { return builder_->current_info(); } |
| 2513 | 2540 |
| 2514 bool LoadResult(Handle<Map> map); | 2541 bool LoadResult(Handle<Map> map); |
| 2515 void LoadFieldMaps(Handle<Map> map); | 2542 void LoadFieldMaps(Handle<Map> map); |
| 2516 bool LookupDescriptor(); | 2543 bool LookupDescriptor(); |
| 2517 bool LookupInPrototypes(); | 2544 bool LookupInPrototypes(); |
| 2518 bool IsCompatible(PropertyAccessInfo* other); | 2545 bool IsCompatible(PropertyAccessInfo* other); |
| 2519 | 2546 |
| 2520 void GeneralizeRepresentation(Representation r) { | 2547 void GeneralizeRepresentation(Representation r) { |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2902 } | 2929 } |
| 2903 | 2930 |
| 2904 private: | 2931 private: |
| 2905 HGraphBuilder* builder_; | 2932 HGraphBuilder* builder_; |
| 2906 }; | 2933 }; |
| 2907 | 2934 |
| 2908 | 2935 |
| 2909 } } // namespace v8::internal | 2936 } } // namespace v8::internal |
| 2910 | 2937 |
| 2911 #endif // V8_HYDROGEN_H_ | 2938 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |