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

Side by Side Diff: src/objects.cc

Issue 9015020: Make sure transitioned arrays efficiently call builtin Array functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix perf regression Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 if (index == DescriptorLookupCache::kAbsent) { 2335 if (index == DescriptorLookupCache::kAbsent) {
2336 index = descriptors->Search(sentinel_name); 2336 index = descriptors->Search(sentinel_name);
2337 cache->Update(descriptors, sentinel_name, index); 2337 cache->Update(descriptors, sentinel_name, index);
2338 } 2338 }
2339 // If the transition already exists, return its descriptor. 2339 // If the transition already exists, return its descriptor.
2340 if (index != DescriptorArray::kNotFound) { 2340 if (index != DescriptorArray::kNotFound) {
2341 PropertyDetails details(descriptors->GetDetails(index)); 2341 PropertyDetails details(descriptors->GetDetails(index));
2342 if (details.type() == ELEMENTS_TRANSITION) { 2342 if (details.type() == ELEMENTS_TRANSITION) {
2343 return descriptors->GetValue(index); 2343 return descriptors->GetValue(index);
2344 } else { 2344 } else {
2345 *safe_to_add_transition = false; 2345 if (safe_to_add_transition != NULL) {
2346 *safe_to_add_transition = false;
2347 }
2346 } 2348 }
2347 } 2349 }
2348 return NULL; 2350 return NULL;
2349 } 2351 }
2350 2352
2351 2353
2352 Map* Map::LookupElementsTransitionMap(ElementsKind elements_kind, 2354 Map* Map::LookupElementsTransitionMap(ElementsKind elements_kind,
2353 bool* safe_to_add_transition) { 2355 bool* safe_to_add_transition) {
2354 // Special case: indirect SMI->FAST transition (cf. comment in 2356 // Special case: indirect SMI->FAST transition (cf. comment in
2355 // AddElementsTransition()). 2357 // AddElementsTransition()).
(...skipping 10242 matching lines...) Expand 10 before | Expand all | Expand 10 after
12598 if (break_point_objects()->IsUndefined()) return 0; 12600 if (break_point_objects()->IsUndefined()) return 0;
12599 // Single break point. 12601 // Single break point.
12600 if (!break_point_objects()->IsFixedArray()) return 1; 12602 if (!break_point_objects()->IsFixedArray()) return 1;
12601 // Multiple break points. 12603 // Multiple break points.
12602 return FixedArray::cast(break_point_objects())->length(); 12604 return FixedArray::cast(break_point_objects())->length();
12603 } 12605 }
12604 #endif // ENABLE_DEBUGGER_SUPPORT 12606 #endif // ENABLE_DEBUGGER_SUPPORT
12605 12607
12606 12608
12607 } } // namespace v8::internal 12609 } } // namespace v8::internal
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/objects.h ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698