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

Side by Side Diff: src/lookup.cc

Issue 442763002: Load constants from the DescriptorArray (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also removed from arm64 Created 6 years, 4 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/lookup.h ('k') | src/mips/stub-cache-mips.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 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/lookup.h" 8 #include "src/lookup.h"
9 #include "src/lookup-inl.h" 9 #include "src/lookup-inl.h"
10 10
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 FieldIndex::ForDescriptor(*holder_map_, number_); 198 FieldIndex::ForDescriptor(*holder_map_, number_);
199 return JSObject::FastPropertyAt( 199 return JSObject::FastPropertyAt(
200 holder, property_details_.representation(), field_index); 200 holder, property_details_.representation(), field_index);
201 } 201 }
202 result = holder_map_->instance_descriptors()->GetValue(number_); 202 result = holder_map_->instance_descriptors()->GetValue(number_);
203 } 203 }
204 return handle(result, isolate_); 204 return handle(result, isolate_);
205 } 205 }
206 206
207 207
208 int LookupIterator::GetConstantIndex() const {
209 DCHECK(has_property_);
210 DCHECK_EQ(DESCRIPTOR, property_encoding_);
211 DCHECK_EQ(v8::internal::CONSTANT, property_details_.type());
212 return descriptor_number();
213 }
214
215
208 FieldIndex LookupIterator::GetFieldIndex() const { 216 FieldIndex LookupIterator::GetFieldIndex() const {
209 DCHECK_EQ(PROPERTY, state_); 217 DCHECK(has_property_);
218 DCHECK_EQ(DESCRIPTOR, property_encoding_);
219 DCHECK_EQ(v8::internal::FIELD, property_details_.type());
210 int index = 220 int index =
211 holder_map()->instance_descriptors()->GetFieldIndex(descriptor_number()); 221 holder_map()->instance_descriptors()->GetFieldIndex(descriptor_number());
212 bool is_double = representation().IsDouble(); 222 bool is_double = representation().IsDouble();
213 return FieldIndex::ForPropertyIndex(*holder_map(), index, is_double); 223 return FieldIndex::ForPropertyIndex(*holder_map(), index, is_double);
214 } 224 }
215 225
216 226
217 Handle<PropertyCell> LookupIterator::GetPropertyCell() const { 227 Handle<PropertyCell> LookupIterator::GetPropertyCell() const {
218 Handle<JSObject> holder = GetHolder<JSObject>(); 228 Handle<JSObject> holder = GetHolder<JSObject>();
219 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); 229 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 DCHECK_EQ(v8::internal::CONSTANT, property_details_.type()); 266 DCHECK_EQ(v8::internal::CONSTANT, property_details_.type());
257 } 267 }
258 } 268 }
259 269
260 270
261 void LookupIterator::InternalizeName() { 271 void LookupIterator::InternalizeName() {
262 if (name_->IsUniqueName()) return; 272 if (name_->IsUniqueName()) return;
263 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); 273 name_ = factory()->InternalizeString(Handle<String>::cast(name_));
264 } 274 }
265 } } // namespace v8::internal 275 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lookup.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698