Revision: 19633
Author: [email protected]
Date: Mon Mar 3 09:38:07 2014 UTC
Log: Merged r19599, r19591 into 3.24 branch.
Fix representation generalization for doubles.
HAllocate should never generate allocation code if the requested size does
not fit into page. Regression test included.
BUG=347543
LOG=N
[email protected], [email protected]
Review URL: https://codereview.chromium.org/178473013
http://code.google.com/p/v8/source/detail?r=19633
Added:
/branches/3.24/test/mjsunit/regress/regress-347543.js
/branches/3.24/test/mjsunit/regress/regress-347909.js
Modified:
/branches/3.24/src/arm/lithium-codegen-arm.cc
/branches/3.24/src/ia32/lithium-codegen-ia32.cc
/branches/3.24/src/mips/lithium-codegen-mips.cc
/branches/3.24/src/property-details.h
/branches/3.24/src/version.cc
/branches/3.24/src/x64/lithium-codegen-x64.cc
=======================================
--- /dev/null
+++ /branches/3.24/test/mjsunit/regress/regress-347543.js Mon Mar 3
09:38:07 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 --debug-code --fold-constants
+
+function f(a) {
+ a[5000000] = 256;
+ assertEquals(256, a[5000000]);
+}
+
+var v1 = new Array(5000001);
+var v2 = new Array(10);
+f(v1);
+f(v2);
+f(v2);
+%OptimizeFunctionOnNextCall(f);
+f(v2);
+f(v1);
=======================================
--- /dev/null
+++ /branches/3.24/test/mjsunit/regress/regress-347909.js Mon Mar 3
09:38:07 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();
=======================================
--- /branches/3.24/src/arm/lithium-codegen-arm.cc Thu Feb 6 01:06:18 2014
UTC
+++ /branches/3.24/src/arm/lithium-codegen-arm.cc Mon Mar 3 09:38:07 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,
=======================================
--- /branches/3.24/src/ia32/lithium-codegen-ia32.cc Sat Feb 1 08:54:43
2014 UTC
+++ /branches/3.24/src/ia32/lithium-codegen-ia32.cc Mon Mar 3 09:38:07
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);
=======================================
--- /branches/3.24/src/mips/lithium-codegen-mips.cc Fri Feb 7 09:11:16
2014 UTC
+++ /branches/3.24/src/mips/lithium-codegen-mips.cc Mon Mar 3 09:38:07
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,
=======================================
--- /branches/3.24/src/property-details.h Wed Jan 22 10:50:56 2014 UTC
+++ /branches/3.24/src/property-details.h Mon Mar 3 09:38:07 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_;
=======================================
--- /branches/3.24/src/version.cc Fri Feb 28 13:18:40 2014 UTC
+++ /branches/3.24/src/version.cc Mon Mar 3 09:38:07 2014 UTC
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 24
#define BUILD_NUMBER 35
-#define PATCH_LEVEL 9
+#define PATCH_LEVEL 10
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
=======================================
--- /branches/3.24/src/x64/lithium-codegen-x64.cc Mon Feb 10 09:01:23 2014
UTC
+++ /branches/3.24/src/x64/lithium-codegen-x64.cc Mon Mar 3 09:38:07 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.