Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mirror-debugger.js

Issue 788043005: ES6 unicode escapes, part 2: Regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mirror regexp test Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 1267
1268 /** 1268 /**
1269 * Returns whether this regular expression has the sticky (y) flag set. 1269 * Returns whether this regular expression has the sticky (y) flag set.
1270 * @return {boolean} Value of the sticky flag 1270 * @return {boolean} Value of the sticky flag
1271 */ 1271 */
1272 RegExpMirror.prototype.sticky = function() { 1272 RegExpMirror.prototype.sticky = function() {
1273 return this.value_.sticky; 1273 return this.value_.sticky;
1274 }; 1274 };
1275 1275
1276 1276
1277 /**
1278 * Returns whether this regular expression has the unicode (u) flag set.
1279 * @return {boolean} Value of the unicode flag
1280 */
1281 RegExpMirror.prototype.unicode = function() {
1282 return this.value_.unicode;
1283 };
1284
1285
1277 RegExpMirror.prototype.toText = function() { 1286 RegExpMirror.prototype.toText = function() {
1278 // Simpel to text which is used when on specialization in subclass. 1287 // Simpel to text which is used when on specialization in subclass.
1279 return "/" + this.source() + "/"; 1288 return "/" + this.source() + "/";
1280 }; 1289 };
1281 1290
1282 1291
1283 /** 1292 /**
1284 * Mirror object for error objects. 1293 * Mirror object for error objects.
1285 * @param {Error} value The error object reflected by this mirror 1294 * @param {Error} value The error object reflected by this mirror
1286 * @constructor 1295 * @constructor
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 } 3062 }
3054 if (!NUMBER_IS_FINITE(value)) { 3063 if (!NUMBER_IS_FINITE(value)) {
3055 if (value > 0) { 3064 if (value > 0) {
3056 return 'Infinity'; 3065 return 'Infinity';
3057 } else { 3066 } else {
3058 return '-Infinity'; 3067 return '-Infinity';
3059 } 3068 }
3060 } 3069 }
3061 return value; 3070 return value;
3062 } 3071 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698