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

Side by Side Diff: src/regexp/regexp-utils.h

Issue 2434983002: [regexp] Use consistent map checks for fast paths (Closed)
Patch Set: Unmark coerce-* tests as failing Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | src/regexp/regexp-utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_REGEXP_REGEXP_UTILS_H_ 5 #ifndef V8_REGEXP_REGEXP_UTILS_H_
6 #define V8_REGEXP_REGEXP_UTILS_H_ 6 #define V8_REGEXP_REGEXP_UTILS_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 16 matching lines...) Expand all
27 // ES#sec-regexpexec Runtime Semantics: RegExpExec ( R, S ) 27 // ES#sec-regexpexec Runtime Semantics: RegExpExec ( R, S )
28 static MaybeHandle<Object> RegExpExec(Isolate* isolate, 28 static MaybeHandle<Object> RegExpExec(Isolate* isolate,
29 Handle<JSReceiver> regexp, 29 Handle<JSReceiver> regexp,
30 Handle<String> string, 30 Handle<String> string,
31 Handle<Object> exec); 31 Handle<Object> exec);
32 32
33 // ES#sec-isregexp IsRegExp ( argument ) 33 // ES#sec-isregexp IsRegExp ( argument )
34 // Includes checking of the match property. 34 // Includes checking of the match property.
35 static Maybe<bool> IsRegExp(Isolate* isolate, Handle<Object> object); 35 static Maybe<bool> IsRegExp(Isolate* isolate, Handle<Object> object);
36 36
37 // Checks whether exec is identical to the initial RegExp.prototype.exec. 37 // Checks whether the given object is an unmodified JSRegExp instance.
38 static bool IsBuiltinExec(Handle<Object> exec); 38 // Neither the object's map, nor its prototype's map may be modified.
39 static bool IsUnmodifiedRegExp(Isolate* isolate, Handle<Object> obj);
39 40
40 // ES#sec-advancestringindex 41 // ES#sec-advancestringindex
41 // AdvanceStringIndex ( S, index, unicode ) 42 // AdvanceStringIndex ( S, index, unicode )
42 static int AdvanceStringIndex(Isolate* isolate, Handle<String> string, 43 static int AdvanceStringIndex(Isolate* isolate, Handle<String> string,
43 int index, bool unicode); 44 int index, bool unicode);
44 static MaybeHandle<Object> SetAdvancedStringIndex(Isolate* isolate, 45 static MaybeHandle<Object> SetAdvancedStringIndex(Isolate* isolate,
45 Handle<JSReceiver> regexp, 46 Handle<JSReceiver> regexp,
46 Handle<String> string, 47 Handle<String> string,
47 bool unicode); 48 bool unicode);
48 }; 49 };
49 50
50 } // namespace internal 51 } // namespace internal
51 } // namespace v8 52 } // namespace v8
52 53
53 #endif // V8_REGEXP_REGEXP_UTILS_H_ 54 #endif // V8_REGEXP_REGEXP_UTILS_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-regexp.cc ('k') | src/regexp/regexp-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698