OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 7398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7409 // IRREGEXP: Compiled with Irregexp. | 7409 // IRREGEXP: Compiled with Irregexp. |
7410 enum Type { NOT_COMPILED, ATOM, IRREGEXP }; | 7410 enum Type { NOT_COMPILED, ATOM, IRREGEXP }; |
7411 enum Flag { | 7411 enum Flag { |
7412 kNone = 0, | 7412 kNone = 0, |
7413 kGlobal = 1 << 0, | 7413 kGlobal = 1 << 0, |
7414 kIgnoreCase = 1 << 1, | 7414 kIgnoreCase = 1 << 1, |
7415 kMultiline = 1 << 2, | 7415 kMultiline = 1 << 2, |
7416 kSticky = 1 << 3, | 7416 kSticky = 1 << 3, |
7417 kUnicode = 1 << 4, | 7417 kUnicode = 1 << 4, |
7418 kDotAll = 1 << 5, | 7418 kDotAll = 1 << 5, |
| 7419 // Update FlagCount when adding new flags. |
7419 }; | 7420 }; |
7420 typedef base::Flags<Flag> Flags; | 7421 typedef base::Flags<Flag> Flags; |
7421 | 7422 |
| 7423 static int FlagCount() { return FLAG_harmony_regexp_dotall ? 6 : 5; } |
| 7424 |
7422 DECL_ACCESSORS(data, Object) | 7425 DECL_ACCESSORS(data, Object) |
7423 DECL_ACCESSORS(flags, Object) | 7426 DECL_ACCESSORS(flags, Object) |
7424 DECL_ACCESSORS(source, Object) | 7427 DECL_ACCESSORS(source, Object) |
7425 | 7428 |
7426 V8_EXPORT_PRIVATE static MaybeHandle<JSRegExp> New(Handle<String> source, | 7429 V8_EXPORT_PRIVATE static MaybeHandle<JSRegExp> New(Handle<String> source, |
7427 Flags flags); | 7430 Flags flags); |
7428 static Handle<JSRegExp> Copy(Handle<JSRegExp> regexp); | 7431 static Handle<JSRegExp> Copy(Handle<JSRegExp> regexp); |
7429 | 7432 |
7430 static MaybeHandle<JSRegExp> Initialize(Handle<JSRegExp> regexp, | 7433 static MaybeHandle<JSRegExp> Initialize(Handle<JSRegExp> regexp, |
7431 Handle<String> source, Flags flags); | 7434 Handle<String> source, Flags flags); |
(...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10301 } | 10304 } |
10302 }; | 10305 }; |
10303 | 10306 |
10304 | 10307 |
10305 } // NOLINT, false-positive due to second-order macros. | 10308 } // NOLINT, false-positive due to second-order macros. |
10306 } // NOLINT, false-positive due to second-order macros. | 10309 } // NOLINT, false-positive due to second-order macros. |
10307 | 10310 |
10308 #include "src/objects/object-macros-undef.h" | 10311 #include "src/objects/object-macros-undef.h" |
10309 | 10312 |
10310 #endif // V8_OBJECTS_H_ | 10313 #endif // V8_OBJECTS_H_ |
OLD | NEW |