Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: src/hydrogen.h

Issue 238773002: Reland "Track field types.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Properly handlified... Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 } 2407 }
2408 2408
2409 bool has_holder() { return !holder_.is_null(); } 2409 bool has_holder() { return !holder_.is_null(); }
2410 bool IsLoad() const { return access_type_ == LOAD; } 2410 bool IsLoad() const { return access_type_ == LOAD; }
2411 2411
2412 LookupResult* lookup() { return &lookup_; } 2412 LookupResult* lookup() { return &lookup_; }
2413 Handle<JSObject> holder() { return holder_; } 2413 Handle<JSObject> holder() { return holder_; }
2414 Handle<JSFunction> accessor() { return accessor_; } 2414 Handle<JSFunction> accessor() { return accessor_; }
2415 Handle<Object> constant() { return constant_; } 2415 Handle<Object> constant() { return constant_; }
2416 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } 2416 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); }
2417 Handle<Map> field_map() { return field_map_; }
2417 HObjectAccess access() { return access_; } 2418 HObjectAccess access() { return access_; }
2418 2419
2419 private: 2420 private:
2420 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } 2421 Type* ToType(Handle<Map> map) { return builder_->ToType(map); }
2421 Isolate* isolate() { return lookup_.isolate(); } 2422 Isolate* isolate() { return lookup_.isolate(); }
2423 CompilationInfo* top_info() { return builder_->top_info(); }
2422 CompilationInfo* current_info() { return builder_->current_info(); } 2424 CompilationInfo* current_info() { return builder_->current_info(); }
2423 2425
2424 bool LoadResult(Handle<Map> map); 2426 bool LoadResult(Handle<Map> map);
2427 void LoadFieldMap(Handle<Map> map);
2425 bool LookupDescriptor(); 2428 bool LookupDescriptor();
2426 bool LookupInPrototypes(); 2429 bool LookupInPrototypes();
2427 bool IsCompatible(PropertyAccessInfo* other); 2430 bool IsCompatible(PropertyAccessInfo* other);
2428 2431
2429 void GeneralizeRepresentation(Representation r) { 2432 void GeneralizeRepresentation(Representation r) {
2430 access_ = access_.WithRepresentation( 2433 access_ = access_.WithRepresentation(
2431 access_.representation().generalize(r)); 2434 access_.representation().generalize(r));
2432 } 2435 }
2433 2436
2434 LookupResult lookup_; 2437 LookupResult lookup_;
2435 HOptimizedGraphBuilder* builder_; 2438 HOptimizedGraphBuilder* builder_;
2436 PropertyAccessType access_type_; 2439 PropertyAccessType access_type_;
2437 Type* type_; 2440 Type* type_;
2438 Handle<String> name_; 2441 Handle<String> name_;
2439 Handle<JSObject> holder_; 2442 Handle<JSObject> holder_;
2440 Handle<JSFunction> accessor_; 2443 Handle<JSFunction> accessor_;
2441 Handle<JSObject> api_holder_; 2444 Handle<JSObject> api_holder_;
2442 Handle<Object> constant_; 2445 Handle<Object> constant_;
2446 Handle<Map> field_map_;
2443 HObjectAccess access_; 2447 HObjectAccess access_;
2444 }; 2448 };
2445 2449
2446 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, 2450 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info,
2447 HValue* object, 2451 HValue* object,
2448 HValue* checked_object, 2452 HValue* checked_object,
2449 HValue* value, 2453 HValue* value,
2450 BailoutId ast_id, 2454 BailoutId ast_id,
2451 BailoutId return_id, 2455 BailoutId return_id,
2452 bool can_inline_accessor = true); 2456 bool can_inline_accessor = true);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 } 2802 }
2799 2803
2800 private: 2804 private:
2801 HGraphBuilder* builder_; 2805 HGraphBuilder* builder_;
2802 }; 2806 };
2803 2807
2804 2808
2805 } } // namespace v8::internal 2809 } } // namespace v8::internal
2806 2810
2807 #endif // V8_HYDROGEN_H_ 2811 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698