| OLD | NEW |
| 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_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
| 6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 | 905 |
| 906 kLastVariableMode = DYNAMIC_LOCAL | 906 kLastVariableMode = DYNAMIC_LOCAL |
| 907 }; | 907 }; |
| 908 | 908 |
| 909 inline bool IsDynamicVariableMode(VariableMode mode) { | 909 inline bool IsDynamicVariableMode(VariableMode mode) { |
| 910 return mode >= DYNAMIC && mode <= DYNAMIC_LOCAL; | 910 return mode >= DYNAMIC && mode <= DYNAMIC_LOCAL; |
| 911 } | 911 } |
| 912 | 912 |
| 913 | 913 |
| 914 inline bool IsDeclaredVariableMode(VariableMode mode) { | 914 inline bool IsDeclaredVariableMode(VariableMode mode) { |
| 915 STATIC_ASSERT(VAR == 0); // Implies that mode >= VAR. | 915 return mode >= VAR && mode <= CONST; |
| 916 return mode <= CONST; | |
| 917 } | 916 } |
| 918 | 917 |
| 919 | 918 |
| 920 inline bool IsLexicalVariableMode(VariableMode mode) { | 919 inline bool IsLexicalVariableMode(VariableMode mode) { |
| 921 return mode >= LET && mode <= CONST; | 920 return mode >= LET && mode <= CONST; |
| 922 } | 921 } |
| 923 | 922 |
| 924 | 923 |
| 925 inline bool IsImmutableVariableMode(VariableMode mode) { | 924 inline bool IsImmutableVariableMode(VariableMode mode) { |
| 926 return mode == CONST || mode == CONST_LEGACY; | 925 return mode == CONST || mode == CONST_LEGACY; |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 public: | 1154 public: |
| 1156 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; | 1155 enum { kNone = 0x00, kSignedSmall = 0x01, kNumber = 0x3, kAny = 0x7 }; |
| 1157 }; | 1156 }; |
| 1158 | 1157 |
| 1159 } // namespace internal | 1158 } // namespace internal |
| 1160 } // namespace v8 | 1159 } // namespace v8 |
| 1161 | 1160 |
| 1162 namespace i = v8::internal; | 1161 namespace i = v8::internal; |
| 1163 | 1162 |
| 1164 #endif // V8_GLOBALS_H_ | 1163 #endif // V8_GLOBALS_H_ |
| OLD | NEW |