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

Side by Side Diff: src/lookup.h

Issue 480283003: Minor LookupIterator cleanups (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/ic/ic.cc ('k') | src/lookup.cc » ('j') | src/objects.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_LOOKUP_H_ 5 #ifndef V8_LOOKUP_H_
6 #define V8_LOOKUP_H_ 6 #define V8_LOOKUP_H_
7 7
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 enum PropertyKind { 46 enum PropertyKind {
47 DATA, 47 DATA,
48 ACCESSOR 48 ACCESSOR
49 }; 49 };
50 50
51 enum PropertyEncoding { 51 enum PropertyEncoding {
52 DICTIONARY, 52 DICTIONARY,
53 DESCRIPTOR 53 DESCRIPTOR
54 }; 54 };
55 55
56 explicit LookupIterator(const LookupIterator* other)
57 : configuration_(other->configuration_),
58 state_(other->state_),
59 property_kind_(other->property_kind_),
60 property_encoding_(other->property_encoding_),
61 property_details_(other->property_details_),
62 isolate_(other->isolate_),
63 name_(other->name_),
64 holder_map_(other->holder_map_),
65 maybe_receiver_(other->maybe_receiver_),
66 maybe_holder_(other->maybe_holder_) {}
67
68 LookupIterator(Handle<Object> receiver, Handle<Name> name, 56 LookupIterator(Handle<Object> receiver, Handle<Name> name,
69 Configuration configuration = CHECK_DERIVED) 57 Configuration configuration = CHECK_DERIVED)
70 : configuration_(ComputeConfiguration(configuration, name)), 58 : configuration_(ComputeConfiguration(configuration, name)),
71 state_(NOT_FOUND), 59 state_(NOT_FOUND),
72 property_kind_(DATA), 60 property_kind_(DATA),
73 property_encoding_(DESCRIPTOR), 61 property_encoding_(DESCRIPTOR),
74 property_details_(NONE, NORMAL, Representation::None()), 62 property_details_(NONE, NORMAL, Representation::None()),
75 isolate_(name->GetIsolate()), 63 isolate_(name->GetIsolate()),
76 name_(name), 64 name_(name),
77 maybe_receiver_(receiver), 65 maybe_receiver_(receiver),
78 number_(DescriptorArray::kNotFound) { 66 number_(DescriptorArray::kNotFound) {
79 Handle<JSReceiver> root = GetRoot(); 67 Handle<JSReceiver> root = GetRoot();
80 holder_map_ = handle(root->map()); 68 holder_map_ = handle(root->map(), isolate_);
81 maybe_holder_ = root; 69 maybe_holder_ = root;
82 Next(); 70 Next();
83 } 71 }
84 72
85 LookupIterator(Handle<Object> receiver, Handle<Name> name, 73 LookupIterator(Handle<Object> receiver, Handle<Name> name,
86 Handle<JSReceiver> holder, 74 Handle<JSReceiver> holder,
87 Configuration configuration = CHECK_DERIVED) 75 Configuration configuration = CHECK_DERIVED)
88 : configuration_(ComputeConfiguration(configuration, name)), 76 : configuration_(ComputeConfiguration(configuration, name)),
89 state_(NOT_FOUND), 77 state_(NOT_FOUND),
90 property_kind_(DATA), 78 property_kind_(DATA),
91 property_encoding_(DESCRIPTOR), 79 property_encoding_(DESCRIPTOR),
92 property_details_(NONE, NORMAL, Representation::None()), 80 property_details_(NONE, NORMAL, Representation::None()),
93 isolate_(name->GetIsolate()), 81 isolate_(name->GetIsolate()),
94 name_(name), 82 name_(name),
95 holder_map_(holder->map()), 83 holder_map_(holder->map(), isolate_),
96 maybe_receiver_(receiver), 84 maybe_receiver_(receiver),
97 maybe_holder_(holder), 85 maybe_holder_(holder),
98 number_(DescriptorArray::kNotFound) { 86 number_(DescriptorArray::kNotFound) {
99 Next(); 87 Next();
100 } 88 }
101 89
102 Isolate* isolate() const { return isolate_; } 90 Isolate* isolate() const { return isolate_; }
103 State state() const { return state_; } 91 State state() const { return state_; }
104 Handle<Name> name() const { return name_; } 92 Handle<Name> name() const { return name_; }
105 93
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 MaybeHandle<Object> maybe_receiver_; 238 MaybeHandle<Object> maybe_receiver_;
251 MaybeHandle<JSReceiver> maybe_holder_; 239 MaybeHandle<JSReceiver> maybe_holder_;
252 240
253 int number_; 241 int number_;
254 }; 242 };
255 243
256 244
257 } } // namespace v8::internal 245 } } // namespace v8::internal
258 246
259 #endif // V8_LOOKUP_H_ 247 #endif // V8_LOOKUP_H_
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/lookup.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698