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

Side by Side Diff: src/objects-inl.h

Issue 181223002: Merged r19440 into 3.23 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.23
Patch Set: Created 6 years, 10 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/objects.h ('k') | src/property.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2338 2338
2339 if (number == DescriptorLookupCache::kAbsent) { 2339 if (number == DescriptorLookupCache::kAbsent) {
2340 number = Search(name, number_of_own_descriptors); 2340 number = Search(name, number_of_own_descriptors);
2341 cache->Update(map, name, number); 2341 cache->Update(map, name, number);
2342 } 2342 }
2343 2343
2344 return number; 2344 return number;
2345 } 2345 }
2346 2346
2347 2347
2348 PropertyDetails Map::GetLastDescriptorDetails() {
2349 return instance_descriptors()->GetDetails(LastAdded());
2350 }
2351
2352
2348 void Map::LookupDescriptor(JSObject* holder, 2353 void Map::LookupDescriptor(JSObject* holder,
2349 Name* name, 2354 Name* name,
2350 LookupResult* result) { 2355 LookupResult* result) {
2351 DescriptorArray* descriptors = this->instance_descriptors(); 2356 DescriptorArray* descriptors = this->instance_descriptors();
2352 int number = descriptors->SearchWithCache(name, this); 2357 int number = descriptors->SearchWithCache(name, this);
2353 if (number == DescriptorArray::kNotFound) return result->NotFound(); 2358 if (number == DescriptorArray::kNotFound) return result->NotFound();
2354 result->DescriptorResult(holder, descriptors->GetDetails(number), number); 2359 result->DescriptorResult(holder, descriptors->GetDetails(number), number);
2355 } 2360 }
2356 2361
2357 2362
2358 void Map::LookupTransition(JSObject* holder, 2363 void Map::LookupTransition(JSObject* holder,
2359 Name* name, 2364 Name* name,
2360 LookupResult* result) { 2365 LookupResult* result) {
2361 if (HasTransitionArray()) { 2366 if (HasTransitionArray()) {
2362 TransitionArray* transition_array = transitions(); 2367 TransitionArray* transition_array = transitions();
2363 int number = transition_array->Search(name); 2368 int number = transition_array->Search(name);
2364 if (number != TransitionArray::kNotFound) { 2369 if (number != TransitionArray::kNotFound) {
2365 return result->TransitionResult(holder, number); 2370 return result->TransitionResult(
2371 holder, transition_array->GetTarget(number));
2366 } 2372 }
2367 } 2373 }
2368 result->NotFound(); 2374 result->NotFound();
2369 } 2375 }
2370 2376
2371 2377
2372 Object** DescriptorArray::GetKeySlot(int descriptor_number) { 2378 Object** DescriptorArray::GetKeySlot(int descriptor_number) {
2373 ASSERT(descriptor_number < number_of_descriptors()); 2379 ASSERT(descriptor_number < number_of_descriptors());
2374 return HeapObject::RawField( 2380 return HeapObject::RawField(
2375 reinterpret_cast<HeapObject*>(this), 2381 reinterpret_cast<HeapObject*>(this),
(...skipping 4111 matching lines...) Expand 10 before | Expand all | Expand 10 after
6487 #undef WRITE_UINT32_FIELD 6493 #undef WRITE_UINT32_FIELD
6488 #undef READ_SHORT_FIELD 6494 #undef READ_SHORT_FIELD
6489 #undef WRITE_SHORT_FIELD 6495 #undef WRITE_SHORT_FIELD
6490 #undef READ_BYTE_FIELD 6496 #undef READ_BYTE_FIELD
6491 #undef WRITE_BYTE_FIELD 6497 #undef WRITE_BYTE_FIELD
6492 6498
6493 6499
6494 } } // namespace v8::internal 6500 } } // namespace v8::internal
6495 6501
6496 #endif // V8_OBJECTS_INL_H_ 6502 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698