InlinedConstructorBailout.js 680 B

12345678910111213141516171819202122
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. function test0(a) {
  6. return new Cons(a);
  7. function Cons(a) {
  8. this.a = (a << 1) + 2;
  9. }
  10. }
  11. WScript.Echo(test0(0x3fffffff).a);
  12. function test1(a) {
  13. return new Cons(a);
  14. function Cons(a) {
  15. return { a: (a << 1) + 2 };
  16. }
  17. }
  18. WScript.Echo(test0(0x3fffffff).a);