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

Side by Side Diff: regexp2000/src/objects.h

Issue 8760: Experimental regexp: Use new RegExp parser to test syntax. (Closed)
Patch Set: Parses regexp using new parser. Rebased patch. Created 12 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 | « regexp2000/src/jsregexp.cc ('k') | regexp2000/src/parser.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 static const int kValueOffset = JSObject::kHeaderSize; 2894 static const int kValueOffset = JSObject::kHeaderSize;
2895 static const int kSize = kValueOffset + kPointerSize; 2895 static const int kSize = kValueOffset + kPointerSize;
2896 2896
2897 private: 2897 private:
2898 DISALLOW_IMPLICIT_CONSTRUCTORS(JSValue); 2898 DISALLOW_IMPLICIT_CONSTRUCTORS(JSValue);
2899 }; 2899 };
2900 2900
2901 // Regular expressions 2901 // Regular expressions
2902 class JSRegExp: public JSObject { 2902 class JSRegExp: public JSObject {
2903 public: 2903 public:
2904 // Meaning of Type:
2905 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet.
2906 // JSCRE: A complex regexp meant for JSCRE.
2907 // ATOM: A simple string to match against using an indexOf-operation.
2904 enum Type { NOT_COMPILED, JSCRE, ATOM }; 2908 enum Type { NOT_COMPILED, JSCRE, ATOM };
2905 enum Flag { NONE = 0, GLOBAL = 1, IGNORE_CASE = 2, MULTILINE = 4 }; 2909 enum Flag { NONE = 0, GLOBAL = 1, IGNORE_CASE = 2, MULTILINE = 4 };
2906 2910
2907 class Flags { 2911 class Flags {
2908 public: 2912 public:
2909 explicit Flags(uint32_t value) : value_(value) { } 2913 explicit Flags(uint32_t value) : value_(value) { }
2910 bool is_global() { return (value_ & GLOBAL) != 0; } 2914 bool is_global() { return (value_ & GLOBAL) != 0; }
2911 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; } 2915 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; }
2912 bool is_multiline() { return (value_ & MULTILINE) != 0; } 2916 bool is_multiline() { return (value_ & MULTILINE) != 0; }
2913 uint32_t value() { return value_; } 2917 uint32_t value() { return value_; }
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
4119 } else { 4123 } else {
4120 value &= ~(1 << bit_position); 4124 value &= ~(1 << bit_position);
4121 } 4125 }
4122 return value; 4126 return value;
4123 } 4127 }
4124 }; 4128 };
4125 4129
4126 } } // namespace v8::internal 4130 } } // namespace v8::internal
4127 4131
4128 #endif // V8_OBJECTS_H_ 4132 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « regexp2000/src/jsregexp.cc ('k') | regexp2000/src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698