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

Side by Side Diff: src/objects.h

Issue 788043005: ES6 unicode escapes, part 2: Regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mirror regexp test Created 5 years, 11 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
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_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 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 7884 matching lines...) Expand 10 before | Expand all | Expand 10 after
7895 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet. 7895 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet.
7896 // ATOM: A simple string to match against using an indexOf operation. 7896 // ATOM: A simple string to match against using an indexOf operation.
7897 // IRREGEXP: Compiled with Irregexp. 7897 // IRREGEXP: Compiled with Irregexp.
7898 // IRREGEXP_NATIVE: Compiled to native code with Irregexp. 7898 // IRREGEXP_NATIVE: Compiled to native code with Irregexp.
7899 enum Type { NOT_COMPILED, ATOM, IRREGEXP }; 7899 enum Type { NOT_COMPILED, ATOM, IRREGEXP };
7900 enum Flag { 7900 enum Flag {
7901 NONE = 0, 7901 NONE = 0,
7902 GLOBAL = 1, 7902 GLOBAL = 1,
7903 IGNORE_CASE = 2, 7903 IGNORE_CASE = 2,
7904 MULTILINE = 4, 7904 MULTILINE = 4,
7905 STICKY = 8 7905 STICKY = 8,
7906 UNICODE_ESCAPES = 16
7906 }; 7907 };
7907 7908
7908 class Flags { 7909 class Flags {
7909 public: 7910 public:
7910 explicit Flags(uint32_t value) : value_(value) { } 7911 explicit Flags(uint32_t value) : value_(value) { }
7911 bool is_global() { return (value_ & GLOBAL) != 0; } 7912 bool is_global() { return (value_ & GLOBAL) != 0; }
7912 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; } 7913 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; }
7913 bool is_multiline() { return (value_ & MULTILINE) != 0; } 7914 bool is_multiline() { return (value_ & MULTILINE) != 0; }
7914 bool is_sticky() { return (value_ & STICKY) != 0; } 7915 bool is_sticky() { return (value_ & STICKY) != 0; }
7916 bool is_unicode() { return (value_ & UNICODE_ESCAPES) != 0; }
7915 uint32_t value() { return value_; } 7917 uint32_t value() { return value_; }
7916 private: 7918 private:
7917 uint32_t value_; 7919 uint32_t value_;
7918 }; 7920 };
7919 7921
7920 DECL_ACCESSORS(data, Object) 7922 DECL_ACCESSORS(data, Object)
7921 7923
7922 inline Type TypeTag(); 7924 inline Type TypeTag();
7923 inline int CaptureCount(); 7925 inline int CaptureCount();
7924 inline Flags GetFlags(); 7926 inline Flags GetFlags();
(...skipping 3027 matching lines...) Expand 10 before | Expand all | Expand 10 after
10952 } else { 10954 } else {
10953 value &= ~(1 << bit_position); 10955 value &= ~(1 << bit_position);
10954 } 10956 }
10955 return value; 10957 return value;
10956 } 10958 }
10957 }; 10959 };
10958 10960
10959 } } // namespace v8::internal 10961 } } // namespace v8::internal
10960 10962
10961 #endif // V8_OBJECTS_H_ 10963 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698