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

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: Quick adjustment to bit fields 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
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 6346e5b59600dd24b5e3da5d262db462cc0774c0..c9692602b76ff5584864308837b3d23e38cf3109 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);
+ AllocationSiteMode mode = AllocationSiteInfo::GetMode(
+ boilerplate_object->GetElementsKind());
+ return isolate->heap()->CopyJSObject(boilerplate_object, mode);
}
« no previous file with comments | « 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