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

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

Issue 2591923003: [regexp] Remove IsRegExp intrinsic (Closed)
Patch Set: Rebase Created 3 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
« 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 (IS_REGEXP(func_or_script_name)) { 438 } else if (%IsRegExp(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 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 utils.InstallFunctions(utils, DONT_ENUM, [ 2410 utils.InstallFunctions(utils, DONT_ENUM, [
2411 "MakeExecutionState", MakeExecutionState, 2411 "MakeExecutionState", MakeExecutionState,
2412 "MakeExceptionEvent", MakeExceptionEvent, 2412 "MakeExceptionEvent", MakeExceptionEvent,
2413 "MakeBreakEvent", MakeBreakEvent, 2413 "MakeBreakEvent", MakeBreakEvent,
2414 "MakeCompileEvent", MakeCompileEvent, 2414 "MakeCompileEvent", MakeCompileEvent,
2415 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, 2415 "MakeAsyncTaskEvent", MakeAsyncTaskEvent,
2416 "IsBreakPointTriggered", IsBreakPointTriggered, 2416 "IsBreakPointTriggered", IsBreakPointTriggered,
2417 ]); 2417 ]);
2418 2418
2419 }) 2419 })
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