Revision: 19623
Author: [email protected]
Date: Fri Feb 28 14:28:05 2014 UTC
Log: Merged r19591, r19599 into trunk branch.
HAllocate should never generate allocation code if the requested size does
not fit into page. Regression test included.
Fix representation generalization for doubles.
BUG=347543
LOG=N
[email protected], [email protected]
Review URL: https://codereview.chromium.org/181183007
http://code.google.com/p/v8/source/detail?r=19623
Added:
/trunk/test/mjsunit/regress/regress-347909.js
Modified:
/trunk/src/arm/lithium-codegen-arm.cc
/trunk/src/ia32/lithium-codegen-ia32.cc
/trunk/src/mips/lithium-codegen-mips.cc
/trunk/src/property-details.h
/trunk/src/version.cc
/trunk/src/x64/lithium-codegen-x64.cc
=======================================
--- /dev/null
+++ /trunk/test/mjsunit/regress/regress-347909.js Fri Feb 28 14:28:05 2014
UTC
@@ -0,0 +1,19 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = {y:1.5};
+a.y = 0;
+var b = a.y;
+a.y = {};
+var d = 1;
+function f() {
+ d = 0;
+ return {y: b};
+}
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
=======================================
--- /trunk/src/arm/lithium-codegen-arm.cc Wed Feb 26 12:50:40 2014 UTC
+++ /trunk/src/arm/lithium-codegen-arm.cc Fri Feb 28 14:28:05 2014 UTC
@@ -5249,7 +5249,11 @@
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
+ if (size <= Page::kMaxRegularHeapObjectSize) {
+ __ Allocate(size, result, scratch, scratch2, deferred->entry(),
flags);
+ } else {
+ __ jmp(deferred->entry());
+ }
} else {
Register size = ToRegister(instr->size());
__ Allocate(size,
=======================================
--- /trunk/src/ia32/lithium-codegen-ia32.cc Wed Feb 26 12:50:40 2014 UTC
+++ /trunk/src/ia32/lithium-codegen-ia32.cc Fri Feb 28 14:28:05 2014 UTC
@@ -5780,7 +5780,11 @@
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
+ if (size <= Page::kMaxRegularHeapObjectSize) {
+ __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
+ } else {
+ __ jmp(deferred->entry());
+ }
} else {
Register size = ToRegister(instr->size());
__ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
=======================================
--- /trunk/src/mips/lithium-codegen-mips.cc Wed Feb 26 12:50:40 2014 UTC
+++ /trunk/src/mips/lithium-codegen-mips.cc Fri Feb 28 14:28:05 2014 UTC
@@ -5196,7 +5196,11 @@
}
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
+ if (size <= Page::kMaxRegularHeapObjectSize) {
+ __ Allocate(size, result, scratch, scratch2, deferred->entry(),
flags);
+ } else {
+ __ jmp(deferred->entry());
+ }
} else {
Register size = ToRegister(instr->size());
__ Allocate(size,
=======================================
--- /trunk/src/property-details.h Wed Feb 26 12:50:40 2014 UTC
+++ /trunk/src/property-details.h Fri Feb 28 14:28:05 2014 UTC
@@ -138,7 +138,7 @@
ASSERT(kind_ != kExternal);
ASSERT(other.kind_ != kExternal);
- if (IsHeapObject()) return other.IsDouble() || other.IsNone();
+ if (IsHeapObject()) return other.IsNone();
if (kind_ == kUInteger8 && other.kind_ == kInteger8) return false;
if (kind_ == kUInteger16 && other.kind_ == kInteger16) return false;
return kind_ > other.kind_;
=======================================
--- /trunk/src/version.cc Thu Feb 27 16:59:32 2014 UTC
+++ /trunk/src/version.cc Fri Feb 28 14:28:05 2014 UTC
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 24
#define BUILD_NUMBER 35
-#define PATCH_LEVEL 5
+#define PATCH_LEVEL 6
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
=======================================
--- /trunk/src/x64/lithium-codegen-x64.cc Wed Feb 26 12:50:40 2014 UTC
+++ /trunk/src/x64/lithium-codegen-x64.cc Fri Feb 28 14:28:05 2014 UTC
@@ -5051,7 +5051,11 @@
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
+ if (size <= Page::kMaxRegularHeapObjectSize) {
+ __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
+ } else {
+ __ jmp(deferred->entry());
+ }
} else {
Register size = ToRegister(instr->size());
__ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
--
--
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.