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

Unified Diff: src/string.js

Issue 17203: Periodic merge from bleeding_edge to experimental code generator... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
===================================================================
--- src/string.js (revision 1032)
+++ src/string.js (working copy)
@@ -152,6 +152,7 @@
var subject = ToString(this);
if (!regexp.global) return regexp.exec(subject);
+ %_Log('regexp', 'regexp-match,%0S,%1r', [subject, regexp]);
var matches = DoRegExpExecGlobal(regexp, subject);
// If the regexp did not match, return null.
@@ -185,6 +186,7 @@
// Delegate to one of the regular expression variants if necessary.
if (IS_REGEXP(search)) {
+ %_Log('regexp', 'regexp-replace,%0r,%1S', [search, subject]);
if (IS_FUNCTION(replace)) {
return StringReplaceRegExpWithFunction(subject, search, replace);
} else {
@@ -513,7 +515,13 @@
var currentIndex = 0;
var startIndex = 0;
- var sep = IS_REGEXP(separator) ? separator : ToString(separator);
+ var sep;
+ if (IS_REGEXP(separator)) {
+ sep = separator;
+ %_Log('regexp', 'regexp-split,%0S,%1r', [subject, sep]);
+ } else {
+ sep = ToString(separator);
+ }
if (length === 0) {
if (splitMatch(sep, subject, 0, 0) != null) return result;
« no previous file with comments | « src/runtime.cc ('k') | src/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698