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

Unified Diff: src/jsregexp.h

Issue 1109010: Run string replace regexp with function in C++ code loop. (Closed)
Patch Set: Fix to also work in debug mode. Created 10 years, 9 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 | « no previous file | src/regexp-delay.js » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.h
diff --git a/src/jsregexp.h b/src/jsregexp.h
index 8f01342616582068672537a01eccd328128fda2a..f203911f3c47ac441295eb329ea3846367761310 100644
--- a/src/jsregexp.h
+++ b/src/jsregexp.h
@@ -142,6 +142,11 @@ class RegExpImpl {
static const int kFirstCaptureOffset =
FixedArray::kHeaderSize + kFirstCapture * kPointerSize;
+ static bool IsAtom(FixedArray* array) {
fschneider 2010/03/25 10:26:06 Is this function ever called?
Lasse Reichstein 2010/03/26 11:18:26 I don't think so. I switched to using JSRegExp::Is
+ Smi* tag = Smi::cast(array->get(JSRegExp::kTagIndex));
+ return tag == Smi::FromInt(JSRegExp::ATOM);
+ }
+
// Used to access the lastMatchInfo array.
static int GetCapture(FixedArray* array, int index) {
return Smi::cast(array->get(index + kFirstCapture))->value();
« no previous file with comments | « no previous file | src/regexp-delay.js » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698