| OLD | NEW |
| 1 // Copyright 2006-2012 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 "use strict"; | 4 "use strict"; |
| 5 | 5 |
| 6 // Handle id counters. | 6 // Handle id counters. |
| 7 var next_handle_ = 0; | 7 var next_handle_ = 0; |
| 8 var next_transient_handle_ = -1; | 8 var next_transient_handle_ = -1; |
| 9 | 9 |
| 10 // Mirror cache. | 10 // Mirror cache. |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 | 1001 |
| 1002 /** | 1002 /** |
| 1003 * Returns the source code for the function. | 1003 * Returns the source code for the function. |
| 1004 * @return {string or undefined} The source code for the function. If the | 1004 * @return {string or undefined} The source code for the function. If the |
| 1005 * function is not resolved undefined will be returned. | 1005 * function is not resolved undefined will be returned. |
| 1006 */ | 1006 */ |
| 1007 FunctionMirror.prototype.source = function() { | 1007 FunctionMirror.prototype.source = function() { |
| 1008 // Return source if function is resolved. Otherwise just fall through to | 1008 // Return source if function is resolved. Otherwise just fall through to |
| 1009 // return undefined. | 1009 // return undefined. |
| 1010 if (this.resolved()) { | 1010 if (this.resolved()) { |
| 1011 return builtins.FunctionSourceString(this.value_); | 1011 return builtins.$functionSourceString(this.value_); |
| 1012 } | 1012 } |
| 1013 }; | 1013 }; |
| 1014 | 1014 |
| 1015 | 1015 |
| 1016 /** | 1016 /** |
| 1017 * Returns the script object for the function. | 1017 * Returns the script object for the function. |
| 1018 * @return {ScriptMirror or undefined} Script object for the function or | 1018 * @return {ScriptMirror or undefined} Script object for the function or |
| 1019 * undefined if the function has no script | 1019 * undefined if the function has no script |
| 1020 */ | 1020 */ |
| 1021 FunctionMirror.prototype.script = function() { | 1021 FunctionMirror.prototype.script = function() { |
| (...skipping 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3062 } | 3062 } |
| 3063 if (!NUMBER_IS_FINITE(value)) { | 3063 if (!NUMBER_IS_FINITE(value)) { |
| 3064 if (value > 0) { | 3064 if (value > 0) { |
| 3065 return 'Infinity'; | 3065 return 'Infinity'; |
| 3066 } else { | 3066 } else { |
| 3067 return '-Infinity'; | 3067 return '-Infinity'; |
| 3068 } | 3068 } |
| 3069 } | 3069 } |
| 3070 return value; | 3070 return value; |
| 3071 } | 3071 } |
| OLD | NEW |