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

Side by Side Diff: src/regexp/jsregexp.h

Issue 1448933002: Introduce a BuiltinsConstructStub that sets up new.target and does a [[call]] per ES6 9.3.2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/objects-printer.cc ('k') | src/regexp/jsregexp.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_JSREGEXP_H_ 5 #ifndef V8_REGEXP_JSREGEXP_H_
6 #define V8_REGEXP_JSREGEXP_H_ 6 #define V8_REGEXP_JSREGEXP_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 10
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 // Whether V8 is compiled with native regexp support or not. 23 // Whether V8 is compiled with native regexp support or not.
24 static bool UsesNativeRegExp() { 24 static bool UsesNativeRegExp() {
25 #ifdef V8_INTERPRETED_REGEXP 25 #ifdef V8_INTERPRETED_REGEXP
26 return false; 26 return false;
27 #else 27 #else
28 return true; 28 return true;
29 #endif 29 #endif
30 } 30 }
31 31
32 // Creates a regular expression literal in the old space.
33 // This function calls the garbage collector if necessary.
34 MUST_USE_RESULT static MaybeHandle<Object> CreateRegExpLiteral(
35 Handle<JSFunction> constructor,
36 Handle<String> pattern,
37 Handle<String> flags);
38
39 // Returns a string representation of a regular expression. 32 // Returns a string representation of a regular expression.
40 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4. 33 // Implements RegExp.prototype.toString, see ECMA-262 section 15.10.6.4.
41 // This function calls the garbage collector if necessary. 34 // This function calls the garbage collector if necessary.
42 static Handle<String> ToString(Handle<Object> value); 35 static Handle<String> ToString(Handle<Object> value);
43 36
44 // Parses the RegExp pattern and prepares the JSRegExp object with 37 // Parses the RegExp pattern and prepares the JSRegExp object with
45 // generic data and choice of implementation - as well as what 38 // generic data and choice of implementation - as well as what
46 // the implementation wants to store in the data field. 39 // the implementation wants to store in the data field.
47 // Returns false if compilation fails. 40 // Returns false if compilation fails.
48 MUST_USE_RESULT static MaybeHandle<Object> Compile(Handle<JSRegExp> re, 41 MUST_USE_RESULT static MaybeHandle<Object> Compile(Handle<JSRegExp> re,
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 static const int kStringOffset = 0; 1678 static const int kStringOffset = 0;
1686 static const int kPatternOffset = 1; 1679 static const int kPatternOffset = 1;
1687 static const int kArrayOffset = 2; 1680 static const int kArrayOffset = 2;
1688 static const int kLastMatchOffset = 3; 1681 static const int kLastMatchOffset = 3;
1689 }; 1682 };
1690 1683
1691 } // namespace internal 1684 } // namespace internal
1692 } // namespace v8 1685 } // namespace v8
1693 1686
1694 #endif // V8_REGEXP_JSREGEXP_H_ 1687 #endif // V8_REGEXP_JSREGEXP_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698