Index: test/mjsunit/compiler/inline-literals.js |
diff --git a/test/mjsunit/compiler/inline-literals.js b/test/mjsunit/compiler/inline-literals.js |
index ece1ad7a25ae24bd6fb3e364adbb87801f26a393..1422586912be98209b9facbfe3db88fa7b56eb14 100644 |
--- a/test/mjsunit/compiler/inline-literals.js |
+++ b/test/mjsunit/compiler/inline-literals.js |
@@ -29,6 +29,26 @@ |
// Test that we can inline functions containing materialized literals. |
+function a2(b, c) { |
+ return [b, c, b + c]; |
+} |
+ |
+function a1(a, b, c) { |
+ return [a, a2(b, c)]; |
+} |
+ |
+function TestArrayLiteral(a, b, c) { |
+ var expected = [a, [b, c, b + c]]; |
+ var result = a1(a, b, c); |
+ assertEquals(expected, result, "TestArrayLiteral"); |
+} |
+ |
+TestArrayLiteral(1, 2, 3); |
+TestArrayLiteral(1, 2, 3); |
+%OptimizeFunctionOnNextCall(TestArrayLiteral); |
+TestArrayLiteral(1, 2, 3); |
+TestArrayLiteral('a', 'b', 'c'); |
+ |
function o2(b, c) { |
return { 'b':b, 'c':c, 'y':b + c }; |
} |