| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 } | 781 } |
| 782 | 782 |
| 783 | 783 |
| 784 function GetStackTraceLine(recv, fun, pos, isGlobal) { | 784 function GetStackTraceLine(recv, fun, pos, isGlobal) { |
| 785 return new CallSite(recv, fun, pos, false).toString(); | 785 return new CallSite(recv, fun, pos, false).toString(); |
| 786 } | 786 } |
| 787 | 787 |
| 788 // ---------------------------------------------------------------------------- | 788 // ---------------------------------------------------------------------------- |
| 789 // Error implementation | 789 // Error implementation |
| 790 | 790 |
| 791 //TODO(rossberg) | 791 var CallSiteReceiverKey = NEW_PRIVATE("CallSite#receiver"); |
| 792 var CallSiteReceiverKey = NEW_PRIVATE("receiver"); | 792 var CallSiteFunctionKey = NEW_PRIVATE("CallSite#function"); |
| 793 var CallSiteFunctionKey = NEW_PRIVATE("function"); | 793 var CallSitePositionKey = NEW_PRIVATE("CallSite#position"); |
| 794 var CallSitePositionKey = NEW_PRIVATE("position"); | 794 var CallSiteStrictModeKey = NEW_PRIVATE("CallSite#strict_mode"); |
| 795 var CallSiteStrictModeKey = NEW_PRIVATE("strict mode"); | |
| 796 | 795 |
| 797 function CallSite(receiver, fun, pos, strict_mode) { | 796 function CallSite(receiver, fun, pos, strict_mode) { |
| 798 SET_PRIVATE(this, CallSiteReceiverKey, receiver); | 797 SET_PRIVATE(this, CallSiteReceiverKey, receiver); |
| 799 SET_PRIVATE(this, CallSiteFunctionKey, fun); | 798 SET_PRIVATE(this, CallSiteFunctionKey, fun); |
| 800 SET_PRIVATE(this, CallSitePositionKey, pos); | 799 SET_PRIVATE(this, CallSitePositionKey, pos); |
| 801 SET_PRIVATE(this, CallSiteStrictModeKey, strict_mode); | 800 SET_PRIVATE(this, CallSiteStrictModeKey, strict_mode); |
| 802 } | 801 } |
| 803 | 802 |
| 804 function CallSiteGetThis() { | 803 function CallSiteGetThis() { |
| 805 return GET_PRIVATE(this, CallSiteStrictModeKey) | 804 return GET_PRIVATE(this, CallSiteStrictModeKey) |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 %GetAndClearOverflowedStackTrace(this); | 1347 %GetAndClearOverflowedStackTrace(this); |
| 1349 }; | 1348 }; |
| 1350 | 1349 |
| 1351 %DefineOrRedefineAccessorProperty( | 1350 %DefineOrRedefineAccessorProperty( |
| 1352 boilerplate, 'stack', getter, setter, DONT_ENUM); | 1351 boilerplate, 'stack', getter, setter, DONT_ENUM); |
| 1353 | 1352 |
| 1354 return boilerplate; | 1353 return boilerplate; |
| 1355 } | 1354 } |
| 1356 | 1355 |
| 1357 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1356 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
| OLD | NEW |