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

Unified Diff: src/prototype.h

Issue 2466553002: [ic] Simplify handling of primitive maps. (Closed)
Patch Set: Now with enabled data-drived ICs Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/prototype.h
diff --git a/src/prototype.h b/src/prototype.h
index 032d9b6b347614422c5e42af284c5be8d650e744..e52d20efd8f143a55f9b02b615fecd7065b9e79b 100644
--- a/src/prototype.h
+++ b/src/prototype.h
@@ -32,9 +32,9 @@ class PrototypeIterator {
PrototypeIterator(Isolate* isolate, Handle<JSReceiver> receiver,
WhereToStart where_to_start = kStartAtPrototype,
WhereToEnd where_to_end = END_AT_NULL)
- : object_(NULL),
+ : isolate_(isolate),
+ object_(NULL),
handle_(receiver),
- isolate_(isolate),
where_to_end_(where_to_end),
is_at_end_(false),
seen_proxies_(0) {
@@ -45,8 +45,8 @@ class PrototypeIterator {
PrototypeIterator(Isolate* isolate, JSReceiver* receiver,
WhereToStart where_to_start = kStartAtPrototype,
WhereToEnd where_to_end = END_AT_NULL)
- : object_(receiver),
- isolate_(isolate),
+ : isolate_(isolate),
+ object_(receiver),
where_to_end_(where_to_end),
is_at_end_(false),
seen_proxies_(0) {
@@ -54,16 +54,17 @@ class PrototypeIterator {
}
explicit PrototypeIterator(Map* receiver_map)
- : object_(receiver_map->prototype()),
- isolate_(receiver_map->GetIsolate()),
+ : isolate_(receiver_map->GetIsolate()),
+ object_(receiver_map->GetPrototypeChainRootMap(isolate_)->prototype()),
where_to_end_(END_AT_NULL),
is_at_end_(object_->IsNull(isolate_)),
seen_proxies_(0) {}
explicit PrototypeIterator(Handle<Map> receiver_map)
- : object_(NULL),
- handle_(handle(receiver_map->prototype(), receiver_map->GetIsolate())),
- isolate_(receiver_map->GetIsolate()),
+ : isolate_(receiver_map->GetIsolate()),
+ object_(NULL),
+ handle_(receiver_map->GetPrototypeChainRootMap(isolate_)->prototype(),
+ isolate_),
where_to_end_(END_AT_NULL),
is_at_end_(handle_->IsNull(isolate_)),
seen_proxies_(0) {}
@@ -161,9 +162,9 @@ class PrototypeIterator {
bool IsAtEnd() const { return is_at_end_; }
private:
+ Isolate* isolate_;
Object* object_;
Handle<Object> handle_;
- Isolate* isolate_;
WhereToEnd where_to_end_;
bool is_at_end_;
int seen_proxies_;
« no previous file with comments | « src/objects.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698