Reviewers: jochen,
Description:
Merged r20262 into 3.24 branch.
Always initialize elements pointer in fast literals.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/218753004/
SVN Base: https://v8.googlecode.com/svn/branches/3.24
Affected files (+10, -1 lines):
M src/hydrogen.cc
M src/version.cc
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
7ee8180cca926e3c1bfcc07b1730142a75a009ed..16096ccf9f242ba2f4744f00859931fa8de7d147
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -9764,6 +9764,15 @@ HInstruction*
HOptimizedGraphBuilder::BuildFastLiteral(
HInstruction* object = Add<HAllocate>(object_size_constant, type,
pretenure_flag, instance_type, site_context->current());
+ // If allocation folding reaches Page::kMaxRegularHeapObjectSize the
+ // elements array may not get folded into the object. Hence, we set the
+ // elements pointer to empty fixed array and let store elimination remove
+ // this store in the folding case.
+ HConstant* empty_fixed_array = Add<HConstant>(
+ isolate()->factory()->empty_fixed_array());
+ Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
+ empty_fixed_array, INITIALIZING_STORE);
+
BuildEmitObjectHeader(boilerplate_object, object);
Handle<FixedArrayBase> elements(boilerplate_object->elements());
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index
f4800385f234385a4ba5eb6ab349e62d9942e4d0..0bb9a80019dce5fad51b83b0137d470a3f090b86
100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 24
#define BUILD_NUMBER 35
-#define PATCH_LEVEL 20
+#define PATCH_LEVEL 21
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
--
--
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/d/optout.