| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // 1. Redistributions of source code must retain the above copyright | 7 // 1. Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // 2. Redistributions in binary form must reproduce the above copyright | 9 // 2. Redistributions in binary form must reproduce the above copyright |
| 10 // notice, this list of conditions and the following disclaimer in the | 10 // notice, this list of conditions and the following disclaimer in the |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 var argumentsFunctionConstructorParam = new Function("arguments", "return argume
nts;"); | 567 var argumentsFunctionConstructorParam = new Function("arguments", "return argume
nts;"); |
| 568 shouldBeTrue("argumentsFunctionConstructorParam(true)"); | 568 shouldBeTrue("argumentsFunctionConstructorParam(true)"); |
| 569 | 569 |
| 570 function argumentsVarUndefined() | 570 function argumentsVarUndefined() |
| 571 { | 571 { |
| 572 var arguments; | 572 var arguments; |
| 573 return String(arguments); | 573 return String(arguments); |
| 574 } | 574 } |
| 575 shouldBe("argumentsVarUndefined()", "'[object Arguments]'"); | 575 shouldBe("argumentsVarUndefined()", "'[object Arguments]'"); |
| 576 | 576 |
| 577 function argumentsConstUndefined() | |
| 578 { | |
| 579 const arguments; | |
| 580 return String(arguments); | |
| 581 } | |
| 582 shouldBe("argumentsConstUndefined()", "'[object Arguments]'"); | |
| 583 | |
| 584 function argumentCalleeInException() { | 577 function argumentCalleeInException() { |
| 585 try { | 578 try { |
| 586 throw ""; | 579 throw ""; |
| 587 } catch (e) { | 580 } catch (e) { |
| 588 return arguments.callee; | 581 return arguments.callee; |
| 589 } | 582 } |
| 590 } | 583 } |
| 591 shouldBe("argumentCalleeInException()", "argumentCalleeInException") | 584 shouldBe("argumentCalleeInException()", "argumentCalleeInException") |
| 592 | 585 |
| 593 function shadowedArgumentsApply(arguments) { | 586 function shadowedArgumentsApply(arguments) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 Object.defineProperty(arguments, 0, { enumerable: false }); | 673 Object.defineProperty(arguments, 0, { enumerable: false }); |
| 681 shouldBeFalse(String( Object.getOwnPropertyDescriptor(arguments, 0).writable
)); | 674 shouldBeFalse(String( Object.getOwnPropertyDescriptor(arguments, 0).writable
)); |
| 682 shouldBeFalse(String( Object.getOwnPropertyDescriptor(arguments, 0).enumerab
le )); | 675 shouldBeFalse(String( Object.getOwnPropertyDescriptor(arguments, 0).enumerab
le )); |
| 683 | 676 |
| 684 delete arguments[1]; | 677 delete arguments[1]; |
| 685 shouldBeUndefined(String( Object.getOwnPropertyDescriptor(arguments, 1) )); | 678 shouldBeUndefined(String( Object.getOwnPropertyDescriptor(arguments, 1) )); |
| 686 Object.defineProperty(arguments, 1, { writable: true }); | 679 Object.defineProperty(arguments, 1, { writable: true }); |
| 687 shouldBeTrue(String( Object.getOwnPropertyDescriptor(arguments, 1).writable
)); | 680 shouldBeTrue(String( Object.getOwnPropertyDescriptor(arguments, 1).writable
)); |
| 688 shouldBeFalse(String( Object.getOwnPropertyDescriptor(arguments, 1).enumerab
le )); | 681 shouldBeFalse(String( Object.getOwnPropertyDescriptor(arguments, 1).enumerab
le )); |
| 689 })(0,1); | 682 })(0,1); |
| OLD | NEW |