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

Unified Diff: src/lookup.h

Issue 2294093008: Add another LookupIterator constructor, and switch to delegating constructors. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.h
diff --git a/src/lookup.h b/src/lookup.h
index ffc7904b2add60da6463943b49ca5175487b448d..736cebc0900ef9464db1affcace11d59fdfc0af8 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -43,30 +43,26 @@ class LookupIterator final BASE_EMBEDDED {
LookupIterator(Handle<Object> receiver, Handle<Name> name,
Configuration configuration = DEFAULT)
- : configuration_(ComputeConfiguration(configuration, name)),
- interceptor_state_(InterceptorState::kUninitialized),
- property_details_(PropertyDetails::Empty()),
- isolate_(name->GetIsolate()),
- name_(isolate_->factory()->InternalizeName(name)),
- receiver_(receiver),
- initial_holder_(GetRoot(isolate_, receiver)),
- // kMaxUInt32 isn't a valid index.
- index_(kMaxUInt32),
- number_(DescriptorArray::kNotFound) {
-#ifdef DEBUG
- uint32_t index; // Assert that the name is not an array index.
- DCHECK(!name->AsArrayIndex(&index));
-#endif // DEBUG
- Start<false>();
- }
+ : LookupIterator(name->GetIsolate(), receiver, name, configuration) {}
+
+ LookupIterator(Isolate* isolate, Handle<Object> receiver, Handle<Name> name,
+ Configuration configuration = DEFAULT)
+ : LookupIterator(isolate, receiver, name, GetRoot(isolate, receiver),
+ configuration) {}
LookupIterator(Handle<Object> receiver, Handle<Name> name,
Handle<JSReceiver> holder,
Configuration configuration = DEFAULT)
+ : LookupIterator(name->GetIsolate(), receiver, name, holder,
+ configuration) {}
+
+ LookupIterator(Isolate* isolate, Handle<Object> receiver, Handle<Name> name,
+ Handle<JSReceiver> holder,
+ Configuration configuration = DEFAULT)
: configuration_(ComputeConfiguration(configuration, name)),
interceptor_state_(InterceptorState::kUninitialized),
property_details_(PropertyDetails::Empty()),
- isolate_(name->GetIsolate()),
+ isolate_(isolate),
name_(isolate_->factory()->InternalizeName(name)),
receiver_(receiver),
initial_holder_(holder),
@@ -82,18 +78,8 @@ class LookupIterator final BASE_EMBEDDED {
LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index,
Configuration configuration = DEFAULT)
- : configuration_(configuration),
- interceptor_state_(InterceptorState::kUninitialized),
- property_details_(PropertyDetails::Empty()),
- isolate_(isolate),
- receiver_(receiver),
- initial_holder_(GetRoot(isolate, receiver, index)),
- index_(index),
- number_(DescriptorArray::kNotFound) {
- // kMaxUInt32 isn't a valid index.
- DCHECK_NE(kMaxUInt32, index_);
- Start<true>();
- }
+ : LookupIterator(isolate, receiver, index,
+ GetRoot(isolate, receiver, index), configuration) {}
LookupIterator(Isolate* isolate, Handle<Object> receiver, uint32_t index,
Handle<JSReceiver> holder,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698