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

Unified Diff: src/runtime.cc

Issue 155085: Separate native and interpreted regexp by compile time flag, not runtime. (Closed)
Patch Set: Addressed review comments. Adapted builds scripts. Created 11 years, 5 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/objects-debug.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index aeda0688aa3612c625e4f7687500a64954b8154c..fab62e1fd1169e249d5ce1ac3e160087b037fbba 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1016,16 +1016,16 @@ static Object* Runtime_RegExpExec(Arguments args) {
ASSERT(args.length() == 4);
CONVERT_ARG_CHECKED(JSRegExp, regexp, 0);
CONVERT_ARG_CHECKED(String, subject, 1);
- // Due to the way the JS files are constructed this must be less than the
+ // Due to the way the JS calls are constructed this must be less than the
// length of a string, i.e. it is always a Smi. We check anyway for security.
- CONVERT_CHECKED(Smi, index, args[2]);
+ CONVERT_SMI_CHECKED(index, args[2]);
CONVERT_ARG_CHECKED(JSArray, last_match_info, 3);
RUNTIME_ASSERT(last_match_info->HasFastElements());
- RUNTIME_ASSERT(index->value() >= 0);
- RUNTIME_ASSERT(index->value() <= subject->length());
+ RUNTIME_ASSERT(index >= 0);
+ RUNTIME_ASSERT(index <= subject->length());
Handle<Object> result = RegExpImpl::Exec(regexp,
subject,
- index->value(),
+ index,
last_match_info);
if (result.is_null()) return Failure::Exception();
return *result;
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698