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

Unified Diff: test/mjsunit/regress/regress-crbug-425585.js

Issue 672623003: ARM64: Fix stack manipulation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months 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/arm64/builtins-arm64.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-crbug-425585.js
diff --git a/test/mjsunit/regress/comparison-in-effect-context-deopt.js b/test/mjsunit/regress/regress-crbug-425585.js
similarity index 76%
copy from test/mjsunit/regress/comparison-in-effect-context-deopt.js
copy to test/mjsunit/regress/regress-crbug-425585.js
index b28dff73a745dfc7445a6c093380c56f51b3fb76..c27febba790148008834ea1c563f7fae11b042ef 100644
--- a/test/mjsunit/regress/comparison-in-effect-context-deopt.js
+++ b/test/mjsunit/regress/regress-crbug-425585.js
@@ -25,23 +25,24 @@
// (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
-function lazyDeopt() {
- %DeoptimizeFunction(test);
- return "deopt";
-}
-
-var x = { toString : lazyDeopt };
+var correct_result = "This is the correct result.";
-function g(x) {
- return "result";
+function foo(recursion_depth) {
+ if (recursion_depth > 0) return foo(recursion_depth - 1);
+ return new String(correct_result, 1, 2, 3, 4, 5, 6);
}
-function test(x) {
- return g(void(x == ""));
+// Roll our own non-strict assertEquals replacement.
+function test(i) {
+ var actual = foo(i);
+ if (correct_result != actual) {
+ var msg = "Expected \"" + correct_result + "\", found " + actual;
+ throw new MjsUnitAssertionError(msg);
+ }
}
-test(x);
-%OptimizeFunctionOnNextCall(test);
-assertEquals("result", test(x));
+test(1);
+test(1);
+test(10);
+test(100);
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698