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 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2409 } | 2409 } |
2410 | 2410 |
2411 bool has_holder() { return !holder_.is_null(); } | 2411 bool has_holder() { return !holder_.is_null(); } |
2412 bool IsLoad() const { return access_type_ == LOAD; } | 2412 bool IsLoad() const { return access_type_ == LOAD; } |
2413 | 2413 |
2414 LookupResult* lookup() { return &lookup_; } | 2414 LookupResult* lookup() { return &lookup_; } |
2415 Handle<JSObject> holder() { return holder_; } | 2415 Handle<JSObject> holder() { return holder_; } |
2416 Handle<JSFunction> accessor() { return accessor_; } | 2416 Handle<JSFunction> accessor() { return accessor_; } |
2417 Handle<Object> constant() { return constant_; } | 2417 Handle<Object> constant() { return constant_; } |
2418 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } | 2418 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } |
2419 Handle<Map> field_map() { return field_map_; } | 2419 SmallMapList* field_maps() { return &field_maps_; } |
2420 HObjectAccess access() { return access_; } | 2420 HObjectAccess access() { return access_; } |
2421 | 2421 |
2422 private: | 2422 private: |
2423 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } | 2423 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } |
| 2424 Zone* zone() { return builder_->zone(); } |
2424 Isolate* isolate() { return lookup_.isolate(); } | 2425 Isolate* isolate() { return lookup_.isolate(); } |
2425 CompilationInfo* top_info() { return builder_->top_info(); } | 2426 CompilationInfo* top_info() { return builder_->top_info(); } |
2426 CompilationInfo* current_info() { return builder_->current_info(); } | 2427 CompilationInfo* current_info() { return builder_->current_info(); } |
2427 | 2428 |
2428 bool LoadResult(Handle<Map> map); | 2429 bool LoadResult(Handle<Map> map); |
2429 void LoadFieldMap(Handle<Map> map); | 2430 void LoadFieldMaps(Handle<Map> map); |
2430 bool LookupDescriptor(); | 2431 bool LookupDescriptor(); |
2431 bool LookupInPrototypes(); | 2432 bool LookupInPrototypes(); |
2432 bool IsCompatible(PropertyAccessInfo* other); | 2433 bool IsCompatible(PropertyAccessInfo* other); |
2433 | 2434 |
2434 void GeneralizeRepresentation(Representation r) { | 2435 void GeneralizeRepresentation(Representation r) { |
2435 access_ = access_.WithRepresentation( | 2436 access_ = access_.WithRepresentation( |
2436 access_.representation().generalize(r)); | 2437 access_.representation().generalize(r)); |
2437 } | 2438 } |
2438 | 2439 |
2439 LookupResult lookup_; | 2440 LookupResult lookup_; |
2440 HOptimizedGraphBuilder* builder_; | 2441 HOptimizedGraphBuilder* builder_; |
2441 PropertyAccessType access_type_; | 2442 PropertyAccessType access_type_; |
2442 Type* type_; | 2443 Type* type_; |
2443 Handle<String> name_; | 2444 Handle<String> name_; |
2444 Handle<JSObject> holder_; | 2445 Handle<JSObject> holder_; |
2445 Handle<JSFunction> accessor_; | 2446 Handle<JSFunction> accessor_; |
2446 Handle<JSObject> api_holder_; | 2447 Handle<JSObject> api_holder_; |
2447 Handle<Object> constant_; | 2448 Handle<Object> constant_; |
2448 Handle<Map> field_map_; | 2449 SmallMapList field_maps_; |
2449 HObjectAccess access_; | 2450 HObjectAccess access_; |
2450 }; | 2451 }; |
2451 | 2452 |
2452 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, | 2453 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, |
2453 HValue* object, | 2454 HValue* object, |
2454 HValue* checked_object, | 2455 HValue* checked_object, |
2455 HValue* value, | 2456 HValue* value, |
2456 BailoutId ast_id, | 2457 BailoutId ast_id, |
2457 BailoutId return_id, | 2458 BailoutId return_id, |
2458 bool can_inline_accessor = true); | 2459 bool can_inline_accessor = true); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2804 } | 2805 } |
2805 | 2806 |
2806 private: | 2807 private: |
2807 HGraphBuilder* builder_; | 2808 HGraphBuilder* builder_; |
2808 }; | 2809 }; |
2809 | 2810 |
2810 | 2811 |
2811 } } // namespace v8::internal | 2812 } } // namespace v8::internal |
2812 | 2813 |
2813 #endif // V8_HYDROGEN_H_ | 2814 #endif // V8_HYDROGEN_H_ |
OLD | NEW |