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

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: Support transitions in LookupResult. Created 6 years, 9 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
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 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 } 2397 }
2398 2398
2399 bool has_holder() { return !holder_.is_null(); } 2399 bool has_holder() { return !holder_.is_null(); }
2400 bool IsLoad() const { return access_type_ == LOAD; } 2400 bool IsLoad() const { return access_type_ == LOAD; }
2401 2401
2402 LookupResult* lookup() { return &lookup_; } 2402 LookupResult* lookup() { return &lookup_; }
2403 Handle<JSObject> holder() { return holder_; } 2403 Handle<JSObject> holder() { return holder_; }
2404 Handle<JSFunction> accessor() { return accessor_; } 2404 Handle<JSFunction> accessor() { return accessor_; }
2405 Handle<Object> constant() { return constant_; } 2405 Handle<Object> constant() { return constant_; }
2406 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } 2406 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); }
2407 Handle<Map> field_map() { return field_map_; }
2407 HObjectAccess access() { return access_; } 2408 HObjectAccess access() { return access_; }
2408 2409
2409 private: 2410 private:
2410 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } 2411 Type* ToType(Handle<Map> map) { return builder_->ToType(map); }
2411 Isolate* isolate() { return lookup_.isolate(); } 2412 Isolate* isolate() { return lookup_.isolate(); }
2413 CompilationInfo* top_info() { return builder_->top_info(); }
2412 CompilationInfo* current_info() { return builder_->current_info(); } 2414 CompilationInfo* current_info() { return builder_->current_info(); }
2413 2415
2414 bool LoadResult(Handle<Map> map); 2416 bool LoadResult(Handle<Map> map);
2415 bool LookupDescriptor(); 2417 bool LookupDescriptor();
2416 bool LookupInPrototypes(); 2418 bool LookupInPrototypes();
2417 bool IsCompatible(PropertyAccessInfo* other); 2419 bool IsCompatible(PropertyAccessInfo* other);
2418 2420
2419 void GeneralizeRepresentation(Representation r) { 2421 void GeneralizeRepresentation(Representation r) {
2420 access_ = access_.WithRepresentation( 2422 access_ = access_.WithRepresentation(
2421 access_.representation().generalize(r)); 2423 access_.representation().generalize(r));
2422 } 2424 }
2423 2425
2424 LookupResult lookup_; 2426 LookupResult lookup_;
2425 HOptimizedGraphBuilder* builder_; 2427 HOptimizedGraphBuilder* builder_;
2426 PropertyAccessType access_type_; 2428 PropertyAccessType access_type_;
2427 Type* type_; 2429 Type* type_;
2428 Handle<String> name_; 2430 Handle<String> name_;
2429 Handle<JSObject> holder_; 2431 Handle<JSObject> holder_;
2430 Handle<JSFunction> accessor_; 2432 Handle<JSFunction> accessor_;
2431 Handle<JSObject> api_holder_; 2433 Handle<JSObject> api_holder_;
2432 Handle<Object> constant_; 2434 Handle<Object> constant_;
2435 Handle<Map> field_map_;
2433 HObjectAccess access_; 2436 HObjectAccess access_;
2434 }; 2437 };
2435 2438
2436 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, 2439 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info,
2437 HValue* object, 2440 HValue* object,
2438 HValue* checked_object, 2441 HValue* checked_object,
2439 HValue* value, 2442 HValue* value,
2440 BailoutId ast_id, 2443 BailoutId ast_id,
2441 BailoutId return_id, 2444 BailoutId return_id,
2442 bool can_inline_accessor = true); 2445 bool can_inline_accessor = true);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 } 2791 }
2789 2792
2790 private: 2793 private:
2791 HGraphBuilder* builder_; 2794 HGraphBuilder* builder_;
2792 }; 2795 };
2793 2796
2794 2797
2795 } } // namespace v8::internal 2798 } } // namespace v8::internal
2796 2799
2797 #endif // V8_HYDROGEN_H_ 2800 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698