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

Side by Side Diff: src/hydrogen.h

Issue 167303005: Track field types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments 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);
2425 bool LookupDescriptor(); 2427 bool LookupDescriptor();
2426 bool LookupInPrototypes(); 2428 bool LookupInPrototypes();
2427 bool IsCompatible(PropertyAccessInfo* other); 2429 bool IsCompatible(PropertyAccessInfo* other);
2428 2430
2429 void GeneralizeRepresentation(Representation r) { 2431 void GeneralizeRepresentation(Representation r) {
2430 access_ = access_.WithRepresentation( 2432 access_ = access_.WithRepresentation(
2431 access_.representation().generalize(r)); 2433 access_.representation().generalize(r));
2432 } 2434 }
2433 2435
2434 LookupResult lookup_; 2436 LookupResult lookup_;
2435 HOptimizedGraphBuilder* builder_; 2437 HOptimizedGraphBuilder* builder_;
2436 PropertyAccessType access_type_; 2438 PropertyAccessType access_type_;
2437 Type* type_; 2439 Type* type_;
2438 Handle<String> name_; 2440 Handle<String> name_;
2439 Handle<JSObject> holder_; 2441 Handle<JSObject> holder_;
2440 Handle<JSFunction> accessor_; 2442 Handle<JSFunction> accessor_;
2441 Handle<JSObject> api_holder_; 2443 Handle<JSObject> api_holder_;
2442 Handle<Object> constant_; 2444 Handle<Object> constant_;
2445 Handle<Map> field_map_;
2443 HObjectAccess access_; 2446 HObjectAccess access_;
2444 }; 2447 };
2445 2448
2446 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, 2449 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info,
2447 HValue* object, 2450 HValue* object,
2448 HValue* checked_object, 2451 HValue* checked_object,
2449 HValue* value, 2452 HValue* value,
2450 BailoutId ast_id, 2453 BailoutId ast_id,
2451 BailoutId return_id, 2454 BailoutId return_id,
2452 bool can_inline_accessor = true); 2455 bool can_inline_accessor = true);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 } 2801 }
2799 2802
2800 private: 2803 private:
2801 HGraphBuilder* builder_; 2804 HGraphBuilder* builder_;
2802 }; 2805 };
2803 2806
2804 2807
2805 } } // namespace v8::internal 2808 } } // namespace v8::internal
2806 2809
2807 #endif // V8_HYDROGEN_H_ 2810 #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