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

Unified Diff: test/mjsunit/regress/regress-clobbered-fp-regs.js

Issue 78283002: Restore saved caller FP registers on stub failure (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Port to ia32, arm, and mips Created 7 years, 1 month 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/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-clobbered-fp-regs.js
diff --git a/test/mjsunit/regress/regress-1387.js b/test/mjsunit/regress/regress-clobbered-fp-regs.js
similarity index 73%
copy from test/mjsunit/regress/regress-1387.js
copy to test/mjsunit/regress/regress-clobbered-fp-regs.js
index d171d381ad27f2ac101105dbe0419211adf10b46..7795ae9a304f5cee33c55d1225903d4c18495ba6 100644
--- a/test/mjsunit/regress/regress-1387.js
+++ b/test/mjsunit/regress/regress-clobbered-fp-regs.js
@@ -24,15 +24,31 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Flags: --allow-natives-syntax
-// Tests that we always return the same type error function when trying to
-// access strict mode caller and callee.
-
-function foo() {
- 'use strict';
- return arguments;
+function store(a, x, y) {
+ var f1 = 0.1 * y;
+ var f2 = 0.2 * y;
+ var f3 = 0.3 * y;
+ var f4 = 0.4 * y;
+ var f5 = 0.5 * y;
+ var f6 = 0.6 * y;
+ var f7 = 0.7 * y;
+ var f8 = 0.8 * y;
+ a[0] = x;
+ var sum = (f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8);
+ assertEquals(1, y);
+ var expected = 3.6;
+ if (Math.abs(expected - sum) > 0.01) {
+ assertEquals(expected, sum);
+ }
}
-var get1 = Object.getOwnPropertyDescriptor(foo(), "caller").get;
-var get2 = Object.getOwnPropertyDescriptor(foo(), "callee").get;
-assertEquals(get1, get2);
+// Generate TransitionElementsKindStub.
+store([1], 1, 1);
+store([1], 1.1, 1);
+store([1], 1.1, 1);
+%OptimizeFunctionOnNextCall(store);
+// This will trap on allocation site in TransitionElementsKindStub.
+store([1], 1, 1)
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698