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 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 return false; | 2401 return false; |
2402 } | 2402 } |
2403 | 2403 |
2404 bool has_holder() { return !holder_.is_null(); } | 2404 bool has_holder() { return !holder_.is_null(); } |
2405 bool IsLoad() const { return access_type_ == LOAD; } | 2405 bool IsLoad() const { return access_type_ == LOAD; } |
2406 | 2406 |
2407 LookupResult* lookup() { return &lookup_; } | 2407 LookupResult* lookup() { return &lookup_; } |
2408 Handle<JSObject> holder() { return holder_; } | 2408 Handle<JSObject> holder() { return holder_; } |
2409 Handle<JSFunction> accessor() { return accessor_; } | 2409 Handle<JSFunction> accessor() { return accessor_; } |
2410 Handle<Object> constant() { return constant_; } | 2410 Handle<Object> constant() { return constant_; } |
2411 Handle<Object> transition() { return transition_; } | 2411 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } |
2412 HObjectAccess access() { return access_; } | 2412 HObjectAccess access() { return access_; } |
2413 | 2413 |
2414 private: | 2414 private: |
2415 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } | 2415 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } |
2416 Isolate* isolate() { return lookup_.isolate(); } | 2416 Isolate* isolate() { return lookup_.isolate(); } |
2417 CompilationInfo* current_info() { return builder_->current_info(); } | 2417 CompilationInfo* current_info() { return builder_->current_info(); } |
2418 | 2418 |
2419 bool LoadResult(Handle<Map> map); | 2419 bool LoadResult(Handle<Map> map); |
2420 bool LookupDescriptor(); | 2420 bool LookupDescriptor(); |
2421 bool LookupInPrototypes(); | 2421 bool LookupInPrototypes(); |
2422 bool IsCompatible(PropertyAccessInfo* other); | 2422 bool IsCompatible(PropertyAccessInfo* other); |
2423 | 2423 |
2424 void GeneralizeRepresentation(Representation r) { | 2424 void GeneralizeRepresentation(Representation r) { |
2425 access_ = access_.WithRepresentation( | 2425 access_ = access_.WithRepresentation( |
2426 access_.representation().generalize(r)); | 2426 access_.representation().generalize(r)); |
2427 } | 2427 } |
2428 | 2428 |
2429 LookupResult lookup_; | 2429 LookupResult lookup_; |
2430 HOptimizedGraphBuilder* builder_; | 2430 HOptimizedGraphBuilder* builder_; |
2431 PropertyAccessType access_type_; | 2431 PropertyAccessType access_type_; |
2432 Type* type_; | 2432 Type* type_; |
2433 Handle<String> name_; | 2433 Handle<String> name_; |
2434 Handle<JSObject> holder_; | 2434 Handle<JSObject> holder_; |
2435 Handle<JSFunction> accessor_; | 2435 Handle<JSFunction> accessor_; |
2436 Handle<JSObject> api_holder_; | 2436 Handle<JSObject> api_holder_; |
2437 Handle<Object> constant_; | 2437 Handle<Object> constant_; |
2438 Handle<Map> transition_; | |
2439 HObjectAccess access_; | 2438 HObjectAccess access_; |
2440 }; | 2439 }; |
2441 | 2440 |
2442 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, | 2441 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, |
2443 HValue* object, | 2442 HValue* object, |
2444 HValue* checked_object, | 2443 HValue* checked_object, |
2445 HValue* value, | 2444 HValue* value, |
2446 BailoutId ast_id, | 2445 BailoutId ast_id, |
2447 BailoutId return_id, | 2446 BailoutId return_id, |
2448 bool can_inline_accessor = true); | 2447 bool can_inline_accessor = true); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 } | 2793 } |
2795 | 2794 |
2796 private: | 2795 private: |
2797 HGraphBuilder* builder_; | 2796 HGraphBuilder* builder_; |
2798 }; | 2797 }; |
2799 | 2798 |
2800 | 2799 |
2801 } } // namespace v8::internal | 2800 } } // namespace v8::internal |
2802 | 2801 |
2803 #endif // V8_HYDROGEN_H_ | 2802 #endif // V8_HYDROGEN_H_ |
OLD | NEW |