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

Unified Diff: test/mjsunit/regress/regress-318420.js

Issue 121703002: ARM: fix loading of global object in LWrapReceiver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/arm/lithium-codegen-arm.cc ('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-318420.js
diff --git a/test/mjsunit/regress/regress-2813.js b/test/mjsunit/regress/regress-318420.js
similarity index 80%
copy from test/mjsunit/regress/regress-2813.js
copy to test/mjsunit/regress/regress-318420.js
index 97ae43b316a2177596927cf5465fa2214cc11c61..77bef10ec4eea03f38a5a29b56d615422cbe2bd4 100644
--- a/test/mjsunit/regress/regress-2813.js
+++ b/test/mjsunit/regress/regress-318420.js
@@ -27,18 +27,20 @@
// Flags: --allow-natives-syntax
-function foo(x) {
- var a = x + 1;
- var b = x + 2;
- if (x != 0) {
- if (x > 0 & x < 100) {
- return a;
+function bar(a, b) { with(a) {return a + b;} }
+
+var obj = {
+ functions: [bar, bar, bar, bar],
+ receivers: [bar, bar, undefined, null],
+ foo: function () {
+ for (var a = this.functions, e = this.receivers, c = a.length,
+ d = 0; d < c ; d++) {
+ a[d].apply(e[d], arguments)
}
}
- return 0;
}
-assertEquals(0, foo(0));
-assertEquals(0, foo(0));
-%OptimizeFunctionOnNextCall(foo);
-assertEquals(3, foo(2));
+obj.foo(1, 2, 3, 4);
+obj.foo(1, 2, 3, 4);
+%OptimizeFunctionOnNextCall(obj.foo);
+obj.foo(1, 2, 3, 4);
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698