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

Unified Diff: src/builtins/builtins-regexp-gen.cc

Issue 2813623003: [csa] Add IsNumber and IsNumberNormalized predicates (Closed)
Patch Set: Address comments Created 3 years, 8 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/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-regexp-gen.cc
diff --git a/src/builtins/builtins-regexp-gen.cc b/src/builtins/builtins-regexp-gen.cc
index 32aa2ce0d79bf20b5ff49766eaf9e675621679ce..263397726e9cd28e2abe32620789fa4c152e159c 100644
--- a/src/builtins/builtins-regexp-gen.cc
+++ b/src/builtins/builtins-regexp-gen.cc
@@ -250,7 +250,7 @@ Node* RegExpBuiltinsAssembler::IrregexpExec(Node* const context,
CSA_ASSERT(this, TaggedIsNotSmi(string));
CSA_ASSERT(this, IsString(string));
- CSA_ASSERT(this, IsHeapNumberMap(LoadReceiverMap(last_index)));
+ CSA_ASSERT(this, IsNumber(last_index));
CSA_ASSERT(this, IsFixedArrayMap(LoadReceiverMap(match_info)));
Node* const int_zero = IntPtrConstant(0);
@@ -1532,13 +1532,10 @@ Node* RegExpBuiltinsAssembler::AdvanceStringIndex(Node* const string,
Node* const is_unicode,
bool is_fastpath) {
CSA_ASSERT(this, IsString(string));
- CSA_ASSERT(this, IsHeapNumberMap(LoadReceiverMap(index)));
+ CSA_ASSERT(this, IsNumberNormalized(index));
if (is_fastpath) CSA_ASSERT(this, TaggedIsPositiveSmi(index));
// Default to last_index + 1.
- // Smi range.
-
- // Default to last_index + 1.
Node* const index_plus_one = NumberInc(index);
VARIABLE(var_result, MachineRepresentation::kTagged, index_plus_one);
@@ -2356,7 +2353,7 @@ TF_BUILTIN(RegExpSplit, RegExpBuiltinsAssembler) {
{
// The runtime call passes in limit to ensure the second ToUint32(limit)
// call is not observable.
- CSA_ASSERT(this, IsHeapNumberMap(LoadReceiverMap(limit)));
+ CSA_ASSERT(this, IsNumber(limit));
Return(CallRuntime(Runtime::kRegExpSplit, context, regexp, string, limit));
}
}
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698