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

Side by Side Diff: src/lookup.cc

Issue 872723003: Load getter from map descriptor instead of embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add mips, mips64, x87 Created 5 years, 11 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
« no previous file with comments | « src/lookup.h ('k') | no next file » | no next file with comments »
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/lookup-inl.h" 10 #include "src/lookup-inl.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_); 231 FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_);
232 return JSObject::FastPropertyAt(holder, property_details_.representation(), 232 return JSObject::FastPropertyAt(holder, property_details_.representation(),
233 field_index); 233 field_index);
234 } else { 234 } else {
235 result = holder_map_->instance_descriptors()->GetValue(number_); 235 result = holder_map_->instance_descriptors()->GetValue(number_);
236 } 236 }
237 return handle(result, isolate_); 237 return handle(result, isolate_);
238 } 238 }
239 239
240 240
241 int LookupIterator::GetAccessorIndex() const {
242 DCHECK(has_property_);
243 DCHECK(!holder_map_->is_dictionary_map());
244 DCHECK_EQ(v8::internal::ACCESSOR_CONSTANT, property_details_.type());
245 return descriptor_number();
246 }
247
248
241 int LookupIterator::GetConstantIndex() const { 249 int LookupIterator::GetConstantIndex() const {
242 DCHECK(has_property_); 250 DCHECK(has_property_);
243 DCHECK(!holder_map_->is_dictionary_map()); 251 DCHECK(!holder_map_->is_dictionary_map());
244 DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type()); 252 DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type());
245 return descriptor_number(); 253 return descriptor_number();
246 } 254 }
247 255
248 256
249 FieldIndex LookupIterator::GetFieldIndex() const { 257 FieldIndex LookupIterator::GetFieldIndex() const {
250 DCHECK(has_property_); 258 DCHECK(has_property_);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 337 }
330 return false; 338 return false;
331 } 339 }
332 340
333 341
334 void LookupIterator::InternalizeName() { 342 void LookupIterator::InternalizeName() {
335 if (name_->IsUniqueName()) return; 343 if (name_->IsUniqueName()) return;
336 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); 344 name_ = factory()->InternalizeString(Handle<String>::cast(name_));
337 } 345 }
338 } } // namespace v8::internal 346 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698