Revision: 19056
Author: [email protected]
Date: Tue Feb 4 10:41:16 2014 UTC
Log: Just initialize elements pointer in fast literal when
pre-tenuring.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/148253004
http://code.google.com/p/v8/source/detail?r=19056
Modified:
/branches/bleeding_edge/src/hydrogen.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Mon Feb 3 14:29:34 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Tue Feb 4 10:41:16 2014 UTC
@@ -9910,12 +9910,13 @@
HValue* object_elements_size = Add<HConstant>(elements_size);
if (boilerplate_object->HasFastDoubleElements()) {
// Allocation folding will not be able to fold |object| and
- // |object_elements| together in some cases, so initialize
- // elements with the undefined to make GC happy.
- HConstant* empty_fixed_array = Add<HConstant>(
- isolate()->factory()->empty_fixed_array());
- Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
- empty_fixed_array, INITIALIZING_STORE);
+ // |object_elements| together if they are pre-tenured.
+ if (pretenure_flag == TENURED) {
+ HConstant* empty_fixed_array = Add<HConstant>(
+ isolate()->factory()->empty_fixed_array());
+ Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
+ empty_fixed_array, INITIALIZING_STORE);
+ }
object_elements = Add<HAllocate>(object_elements_size,
HType::JSObject(),
pretenure_flag, FIXED_DOUBLE_ARRAY_TYPE,
site_context->current());
} else {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.