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

Unified Diff: src/builtins.cc

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports and perf bugfix Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 5cc791515bc128b4ab788a9fa3e9bc39efb9817b..673d428277150f474a57d2d8664b12bdb7c252d6 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -210,8 +210,9 @@ static MaybeObject* ArrayCodeGenericCommon(Arguments* args,
if (maybe_array->IsFailure()) return maybe_array;
AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(array);
- ElementsKind to_kind = array->GetElementsKind();
- if (info != NULL && info->GetElementsKindPayload(&to_kind)) {
+ if (info != NULL && info->site_is_valid()) {
+ AllocationSite* site = info->allocation_site_casted();
+ ElementsKind to_kind = site->GetElementsKindPayload();
if (IsMoreGeneralElementsKindTransition(array->GetElementsKind(),
to_kind)) {
// We have advice that we should change the elements kind

Powered by Google App Engine
This is Rietveld 408576698