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

Unified Diff: src/runtime.cc

Issue 11817017: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed unnecessary class specifiers Created 7 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 side-by-side diff with in-line comments
Download patch
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 6346e5b59600dd24b5e3da5d262db462cc0774c0..c7dfa4484ed3865edf06294de99b2eb9b244545f 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -668,7 +668,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateArrayLiteralShallow) {
isolate->heap()->fixed_cow_array_map()) {
isolate->counters()->cow_arrays_created_runtime()->Increment();
}
- return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate));
+
+ JSObject* boilerplate_object = JSObject::cast(*boilerplate);
+ AllocationSiteInfoMode mode = AllocationSiteInfo::GetMode(
+ boilerplate_object->GetElementsKind());
+ return isolate->heap()->CopyJSObject(boilerplate_object, mode);
}
« src/objects.cc ('K') | « src/objects-inl.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698