| 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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 | 1258 |
| 1259 /** | 1259 /** |
| 1260 * Returns whether this regular expression has the multiline (m) flag set. | 1260 * Returns whether this regular expression has the multiline (m) flag set. |
| 1261 * @return {boolean} Value of the multiline flag | 1261 * @return {boolean} Value of the multiline flag |
| 1262 */ | 1262 */ |
| 1263 RegExpMirror.prototype.multiline = function() { | 1263 RegExpMirror.prototype.multiline = function() { |
| 1264 return this.value_.multiline; | 1264 return this.value_.multiline; |
| 1265 }; | 1265 }; |
| 1266 | 1266 |
| 1267 | 1267 |
| 1268 /** |
| 1269 * Returns whether this regular expression has the sticky (y) flag set. |
| 1270 * @return {boolean} Value of the sticky flag |
| 1271 */ |
| 1272 RegExpMirror.prototype.sticky = function() { |
| 1273 return this.value_.sticky; |
| 1274 }; |
| 1275 |
| 1276 |
| 1268 RegExpMirror.prototype.toText = function() { | 1277 RegExpMirror.prototype.toText = function() { |
| 1269 // Simpel to text which is used when on specialization in subclass. | 1278 // Simpel to text which is used when on specialization in subclass. |
| 1270 return "/" + this.source() + "/"; | 1279 return "/" + this.source() + "/"; |
| 1271 }; | 1280 }; |
| 1272 | 1281 |
| 1273 | 1282 |
| 1274 /** | 1283 /** |
| 1275 * Mirror object for error objects. | 1284 * Mirror object for error objects. |
| 1276 * @param {Error} value The error object reflected by this mirror | 1285 * @param {Error} value The error object reflected by this mirror |
| 1277 * @constructor | 1286 * @constructor |
| (...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3044 } | 3053 } |
| 3045 if (!NUMBER_IS_FINITE(value)) { | 3054 if (!NUMBER_IS_FINITE(value)) { |
| 3046 if (value > 0) { | 3055 if (value > 0) { |
| 3047 return 'Infinity'; | 3056 return 'Infinity'; |
| 3048 } else { | 3057 } else { |
| 3049 return '-Infinity'; | 3058 return '-Infinity'; |
| 3050 } | 3059 } |
| 3051 } | 3060 } |
| 3052 return value; | 3061 return value; |
| 3053 } | 3062 } |
| OLD | NEW |