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

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

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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 | « test/mjsunit/regress/regress-2829.js ('k') | test/mjsunit/regress/regress-3027.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-2989.js
diff --git a/test/webkit/const-without-initializer.js b/test/mjsunit/regress/regress-2989.js
similarity index 87%
copy from test/webkit/const-without-initializer.js
copy to test/mjsunit/regress/regress-2989.js
index 9eb036522a05920b2c1441b387002f91811d1752..49c4a1cb03ba45b8938e08ab024f0b8d13a66ed6 100644
--- a/test/webkit/const-without-initializer.js
+++ b/test/mjsunit/regress/regress-2989.js
@@ -21,14 +21,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-'Tests that declaring a const variable without initializing has the correct behavior and does not crash'
-);
+// Flags: --allow-natives-syntax
-const f;
+(function ArgumentsObjectChange() {
+ function f(x) {
+ x = 42;
+ return f.arguments[0];
+ }
-shouldBe('f', 'undefined');
-
-f = 10;
-
-shouldBe('f', 'undefined');
+ f(0);
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals(42, f(0));
+})();
« no previous file with comments | « test/mjsunit/regress/regress-2829.js ('k') | test/mjsunit/regress/regress-3027.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698