/js/src/jit-test/tests/arguments/strict-nested-assign-shadow-function-call.js
http://github.com/zpao/v8monkey · JavaScript · 33 lines · 25 code · 4 blank · 4 comment · 1 complexity · 29a7e5b8ba80a8a80eb936c10b2025e2 MD5 · raw file
- /*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/licenses/publicdomain/
- */
- load(libdir + 'array-compare.js');
- var obj = {};
- function strictNestedAssignShadowFunctionCall(p)
- {
- "use strict";
- function inner()
- {
- function p() { }
- p = 1776;
- }
- inner();
- return arguments;
- }
- var a1, a2, a3, a4;
- for (var i = 0; i < 5; i++)
- {
- a1 = strictNestedAssignShadowFunctionCall();
- a2 = strictNestedAssignShadowFunctionCall(99);
- a3 = strictNestedAssignShadowFunctionCall("");
- a4 = strictNestedAssignShadowFunctionCall(obj);
- }
- assertEq(arraysEqual(a1, []), true);
- assertEq(arraysEqual(a2, [99]), true);
- assertEq(arraysEqual(a3, [""]), true);
- assertEq(arraysEqual(a4, [obj]), true);