Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 7b9923d1bcd29cd5a1cfdd68901fd6e0d763260e..d4185029dec568d67468947cd1e90ffd5bc3a297 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -11403,8 +11403,6 @@ |
MaybeHandle<String> String::GetSubstitution(Isolate* isolate, Match* match, |
Handle<String> replacement) { |
- DCHECK_IMPLIES(match->HasNamedCaptures(), FLAG_harmony_regexp_named_captures); |
- |
Factory* factory = isolate->factory(); |
const int replacement_length = replacement->length(); |
@@ -11491,37 +11489,6 @@ |
continue_from_ix = peek_ix + advance; |
break; |
} |
- case '<': { // $<name> - named capture |
- if (!match->HasNamedCaptures()) { |
- builder.AppendCharacter('$'); |
- continue_from_ix = peek_ix; |
- break; |
- } |
- |
- Handle<String> bracket_string = |
- factory->LookupSingleCharacterStringFromCode('>'); |
- const int closing_bracket_ix = |
- String::IndexOf(isolate, replacement, bracket_string, peek_ix + 1); |
- |
- if (closing_bracket_ix == -1) { |
- THROW_NEW_ERROR( |
- isolate, |
- NewSyntaxError(MessageTemplate::kRegExpInvalidReplaceString, |
- replacement), |
- String); |
- } |
- |
- Handle<String> capture_name = |
- factory->NewSubString(replacement, peek_ix + 1, closing_bracket_ix); |
- bool capture_exists; |
- Handle<String> capture; |
- ASSIGN_RETURN_ON_EXCEPTION( |
- isolate, capture, |
- match->GetNamedCapture(capture_name, &capture_exists), String); |
- if (capture_exists) builder.AppendString(capture); |
- continue_from_ix = closing_bracket_ix + 1; |
- break; |
- } |
default: |
builder.AppendCharacter('$'); |
continue_from_ix = peek_ix; |
@@ -11692,15 +11659,6 @@ |
return (allow_prefix_match || i == slen) && remaining_in_str == 0; |
} |
-template <> |
-bool String::IsEqualTo(Vector<const uint8_t> str) { |
- return IsOneByteEqualTo(str); |
-} |
- |
-template <> |
-bool String::IsEqualTo(Vector<const uc16> str) { |
- return IsTwoByteEqualTo(str); |
-} |
bool String::IsOneByteEqualTo(Vector<const uint8_t> str) { |
int slen = length(); |