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

Side by Side Diff: src/hydrogen.h

Issue 269353003: Fix constructors for HLoadNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deuglify code Created 6 years, 7 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 | « no previous file | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "accessors.h" 10 #include "accessors.h"
(...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 public: 2319 public:
2320 PropertyAccessInfo(HOptimizedGraphBuilder* builder, 2320 PropertyAccessInfo(HOptimizedGraphBuilder* builder,
2321 PropertyAccessType access_type, 2321 PropertyAccessType access_type,
2322 Type* type, 2322 Type* type,
2323 Handle<String> name) 2323 Handle<String> name)
2324 : lookup_(builder->isolate()), 2324 : lookup_(builder->isolate()),
2325 builder_(builder), 2325 builder_(builder),
2326 access_type_(access_type), 2326 access_type_(access_type),
2327 type_(type), 2327 type_(type),
2328 name_(name), 2328 name_(name),
2329 field_type_(HType::Tagged()),
2329 access_(HObjectAccess::ForMap()) { } 2330 access_(HObjectAccess::ForMap()) { }
2330 2331
2331 // Checkes whether this PropertyAccessInfo can be handled as a monomorphic 2332 // Checkes whether this PropertyAccessInfo can be handled as a monomorphic
2332 // load named. It additionally fills in the fields necessary to generate the 2333 // load named. It additionally fills in the fields necessary to generate the
2333 // lookup code. 2334 // lookup code.
2334 bool CanAccessMonomorphic(); 2335 bool CanAccessMonomorphic();
2335 2336
2336 // Checks whether all types behave uniform when loading name. If all maps 2337 // Checks whether all types behave uniform when loading name. If all maps
2337 // behave the same, a single monomorphic load instruction can be emitted, 2338 // behave the same, a single monomorphic load instruction can be emitted,
2338 // guarded by a single map-checks instruction that whether the receiver is 2339 // guarded by a single map-checks instruction that whether the receiver is
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 2386
2386 bool has_holder() { return !holder_.is_null(); } 2387 bool has_holder() { return !holder_.is_null(); }
2387 bool IsLoad() const { return access_type_ == LOAD; } 2388 bool IsLoad() const { return access_type_ == LOAD; }
2388 2389
2389 LookupResult* lookup() { return &lookup_; } 2390 LookupResult* lookup() { return &lookup_; }
2390 Handle<JSObject> holder() { return holder_; } 2391 Handle<JSObject> holder() { return holder_; }
2391 Handle<JSFunction> accessor() { return accessor_; } 2392 Handle<JSFunction> accessor() { return accessor_; }
2392 Handle<Object> constant() { return constant_; } 2393 Handle<Object> constant() { return constant_; }
2393 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); } 2394 Handle<Map> transition() { return handle(lookup_.GetTransitionTarget()); }
2394 SmallMapList* field_maps() { return &field_maps_; } 2395 SmallMapList* field_maps() { return &field_maps_; }
2396 HType field_type() const { return field_type_; }
2395 HObjectAccess access() { return access_; } 2397 HObjectAccess access() { return access_; }
2396 2398
2397 private: 2399 private:
2398 Type* ToType(Handle<Map> map) { return builder_->ToType(map); } 2400 Type* ToType(Handle<Map> map) { return builder_->ToType(map); }
2399 Zone* zone() { return builder_->zone(); } 2401 Zone* zone() { return builder_->zone(); }
2400 Isolate* isolate() { return lookup_.isolate(); } 2402 Isolate* isolate() { return lookup_.isolate(); }
2401 CompilationInfo* top_info() { return builder_->top_info(); } 2403 CompilationInfo* top_info() { return builder_->top_info(); }
2402 CompilationInfo* current_info() { return builder_->current_info(); } 2404 CompilationInfo* current_info() { return builder_->current_info(); }
2403 2405
2404 bool LoadResult(Handle<Map> map); 2406 bool LoadResult(Handle<Map> map);
(...skipping 10 matching lines...) Expand all
2415 LookupResult lookup_; 2417 LookupResult lookup_;
2416 HOptimizedGraphBuilder* builder_; 2418 HOptimizedGraphBuilder* builder_;
2417 PropertyAccessType access_type_; 2419 PropertyAccessType access_type_;
2418 Type* type_; 2420 Type* type_;
2419 Handle<String> name_; 2421 Handle<String> name_;
2420 Handle<JSObject> holder_; 2422 Handle<JSObject> holder_;
2421 Handle<JSFunction> accessor_; 2423 Handle<JSFunction> accessor_;
2422 Handle<JSObject> api_holder_; 2424 Handle<JSObject> api_holder_;
2423 Handle<Object> constant_; 2425 Handle<Object> constant_;
2424 SmallMapList field_maps_; 2426 SmallMapList field_maps_;
2427 HType field_type_;
2425 HObjectAccess access_; 2428 HObjectAccess access_;
2426 }; 2429 };
2427 2430
2428 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info, 2431 HInstruction* BuildMonomorphicAccess(PropertyAccessInfo* info,
2429 HValue* object, 2432 HValue* object,
2430 HValue* checked_object, 2433 HValue* checked_object,
2431 HValue* value, 2434 HValue* value,
2432 BailoutId ast_id, 2435 BailoutId ast_id,
2433 BailoutId return_id, 2436 BailoutId return_id,
2434 bool can_inline_accessor = true); 2437 bool can_inline_accessor = true);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2780 } 2783 }
2781 2784
2782 private: 2785 private:
2783 HGraphBuilder* builder_; 2786 HGraphBuilder* builder_;
2784 }; 2787 };
2785 2788
2786 2789
2787 } } // namespace v8::internal 2790 } } // namespace v8::internal
2788 2791
2789 #endif // V8_HYDROGEN_H_ 2792 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698