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

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: merge with latest 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
« no previous file with comments | « src/objects.h ('k') | src/x64/lithium-codegen-x64.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 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 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 if (index == DescriptorLookupCache::kAbsent) { 2356 if (index == DescriptorLookupCache::kAbsent) {
2357 index = descriptors->Search(sentinel_name); 2357 index = descriptors->Search(sentinel_name);
2358 cache->Update(descriptors, sentinel_name, index); 2358 cache->Update(descriptors, sentinel_name, index);
2359 } 2359 }
2360 // If the transition already exists, return its descriptor. 2360 // If the transition already exists, return its descriptor.
2361 if (index != DescriptorArray::kNotFound) { 2361 if (index != DescriptorArray::kNotFound) {
2362 PropertyDetails details(descriptors->GetDetails(index)); 2362 PropertyDetails details(descriptors->GetDetails(index));
2363 if (details.type() == ELEMENTS_TRANSITION) { 2363 if (details.type() == ELEMENTS_TRANSITION) {
2364 return descriptors->GetValue(index); 2364 return descriptors->GetValue(index);
2365 } else { 2365 } else {
2366 *safe_to_add_transition = false; 2366 if (safe_to_add_transition != NULL) {
2367 *safe_to_add_transition = false;
2368 }
2367 } 2369 }
2368 } 2370 }
2369 return NULL; 2371 return NULL;
2370 } 2372 }
2371 2373
2372 2374
2373 Map* Map::LookupElementsTransitionMap(ElementsKind elements_kind, 2375 Map* Map::LookupElementsTransitionMap(ElementsKind elements_kind,
2374 bool* safe_to_add_transition) { 2376 bool* safe_to_add_transition) {
2375 // Special case: indirect SMI->FAST transition (cf. comment in 2377 // Special case: indirect SMI->FAST transition (cf. comment in
2376 // AddElementsTransition()). 2378 // AddElementsTransition()).
(...skipping 10363 matching lines...) Expand 10 before | Expand all | Expand 10 after
12740 if (break_point_objects()->IsUndefined()) return 0; 12742 if (break_point_objects()->IsUndefined()) return 0;
12741 // Single break point. 12743 // Single break point.
12742 if (!break_point_objects()->IsFixedArray()) return 1; 12744 if (!break_point_objects()->IsFixedArray()) return 1;
12743 // Multiple break points. 12745 // Multiple break points.
12744 return FixedArray::cast(break_point_objects())->length(); 12746 return FixedArray::cast(break_point_objects())->length();
12745 } 12747 }
12746 #endif // ENABLE_DEBUGGER_SUPPORT 12748 #endif // ENABLE_DEBUGGER_SUPPORT
12747 12749
12748 12750
12749 } } // namespace v8::internal 12751 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « 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