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

Unified Diff: src/regexp/regexp-utils.cc

Issue 2587373002: Revert of [runtime] Add fast-paths for common conversion methods (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/regexp-utils.cc
diff --git a/src/regexp/regexp-utils.cc b/src/regexp/regexp-utils.cc
index d40431866a391388b4e8ebfbbbe75e529e6bb2c5..f6ef076f2c38b781f58d4589e94801ce64130562 100644
--- a/src/regexp/regexp-utils.cc
+++ b/src/regexp/regexp-utils.cc
@@ -174,7 +174,8 @@
ASSIGN_RETURN_ON_EXCEPTION(isolate, last_index_obj,
Object::ToLength(isolate, last_index_obj), Object);
- const int last_index = PositiveNumberToUint32(*last_index_obj);
+
+ const int last_index = Handle<Smi>::cast(last_index_obj)->value();
const int new_last_index =
AdvanceStringIndex(isolate, string, last_index, unicode);
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698