| OLD | NEW |
| 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 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2917 | 2917 |
| 2918 // Regular expressions | 2918 // Regular expressions |
| 2919 class JSRegExp: public JSObject { | 2919 class JSRegExp: public JSObject { |
| 2920 public: | 2920 public: |
| 2921 // Meaning of Type: | 2921 // Meaning of Type: |
| 2922 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet. | 2922 // NOT_COMPILED: Initial value. No data has been stored in the JSRegExp yet. |
| 2923 // JSCRE: A complex RegExp for JSCRE | 2923 // JSCRE: A complex RegExp for JSCRE |
| 2924 // ATOM: A simple string to match against using an indexOf operation. | 2924 // ATOM: A simple string to match against using an indexOf operation. |
| 2925 // IRREGEXP: Compiled with Irregexp. | 2925 // IRREGEXP: Compiled with Irregexp. |
| 2926 // IRREGEXP_NATIVE: Compiled to native code with Irregexp. | 2926 // IRREGEXP_NATIVE: Compiled to native code with Irregexp. |
| 2927 enum Type { NOT_COMPILED, JSCRE, ATOM, IRREGEXP, IRREGEXP_NATIVE }; | 2927 enum Type { NOT_COMPILED, JSCRE, ATOM, IRREGEXP }; |
| 2928 enum Flag { NONE = 0, GLOBAL = 1, IGNORE_CASE = 2, MULTILINE = 4 }; | 2928 enum Flag { NONE = 0, GLOBAL = 1, IGNORE_CASE = 2, MULTILINE = 4 }; |
| 2929 | 2929 |
| 2930 class Flags { | 2930 class Flags { |
| 2931 public: | 2931 public: |
| 2932 explicit Flags(uint32_t value) : value_(value) { } | 2932 explicit Flags(uint32_t value) : value_(value) { } |
| 2933 bool is_global() { return (value_ & GLOBAL) != 0; } | 2933 bool is_global() { return (value_ & GLOBAL) != 0; } |
| 2934 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; } | 2934 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; } |
| 2935 bool is_multiline() { return (value_ & MULTILINE) != 0; } | 2935 bool is_multiline() { return (value_ & MULTILINE) != 0; } |
| 2936 uint32_t value() { return value_; } | 2936 uint32_t value() { return value_; } |
| 2937 private: | 2937 private: |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4202 } else { | 4202 } else { |
| 4203 value &= ~(1 << bit_position); | 4203 value &= ~(1 << bit_position); |
| 4204 } | 4204 } |
| 4205 return value; | 4205 return value; |
| 4206 } | 4206 } |
| 4207 }; | 4207 }; |
| 4208 | 4208 |
| 4209 } } // namespace v8::internal | 4209 } } // namespace v8::internal |
| 4210 | 4210 |
| 4211 #endif // V8_OBJECTS_H_ | 4211 #endif // V8_OBJECTS_H_ |
| OLD | NEW |