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

Side by Side Diff: src/debug/debug.js

Issue 2592383002: Revert of [regexp] Remove IsRegExp intrinsic (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/debug/mirrors.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 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 4
5 (function (global, utils) { 5 (function (global, utils) {
6 "use strict"; 6 "use strict";
7 7
8 // ---------------------------------------------------------------------------- 8 // ----------------------------------------------------------------------------
9 // Imports 9 // Imports
10 10
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 428
429 429
430 // Returns a Script object. If the parameter is a function the return value 430 // Returns a Script object. If the parameter is a function the return value
431 // is the script in which the function is defined. If the parameter is a string 431 // is the script in which the function is defined. If the parameter is a string
432 // the return value is the script for which the script name has that string 432 // the return value is the script for which the script name has that string
433 // value. If it is a regexp and there is a unique script whose name matches 433 // value. If it is a regexp and there is a unique script whose name matches
434 // we return that, otherwise undefined. 434 // we return that, otherwise undefined.
435 Debug.findScript = function(func_or_script_name) { 435 Debug.findScript = function(func_or_script_name) {
436 if (IS_FUNCTION(func_or_script_name)) { 436 if (IS_FUNCTION(func_or_script_name)) {
437 return %FunctionGetScript(func_or_script_name); 437 return %FunctionGetScript(func_or_script_name);
438 } else if (%IsRegExp(func_or_script_name)) { 438 } else if (IS_REGEXP(func_or_script_name)) {
439 var scripts = this.scripts(); 439 var scripts = this.scripts();
440 var last_result = null; 440 var last_result = null;
441 var result_count = 0; 441 var result_count = 0;
442 for (var i in scripts) { 442 for (var i in scripts) {
443 var script = scripts[i]; 443 var script = scripts[i];
444 if (func_or_script_name.test(script.name)) { 444 if (func_or_script_name.test(script.name)) {
445 last_result = script; 445 last_result = script;
446 result_count++; 446 result_count++;
447 } 447 }
448 } 448 }
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 utils.InstallFunctions(utils, DONT_ENUM, [ 2390 utils.InstallFunctions(utils, DONT_ENUM, [
2391 "MakeExecutionState", MakeExecutionState, 2391 "MakeExecutionState", MakeExecutionState,
2392 "MakeExceptionEvent", MakeExceptionEvent, 2392 "MakeExceptionEvent", MakeExceptionEvent,
2393 "MakeBreakEvent", MakeBreakEvent, 2393 "MakeBreakEvent", MakeBreakEvent,
2394 "MakeCompileEvent", MakeCompileEvent, 2394 "MakeCompileEvent", MakeCompileEvent,
2395 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, 2395 "MakeAsyncTaskEvent", MakeAsyncTaskEvent,
2396 "IsBreakPointTriggered", IsBreakPointTriggered, 2396 "IsBreakPointTriggered", IsBreakPointTriggered,
2397 ]); 2397 ]);
2398 2398
2399 }) 2399 })
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/debug/mirrors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698