Chromium Code Reviews| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 // (sorted alphabetically) | 218 // (sorted alphabetically) |
| 219 | 219 |
| 220 class FreeStoreAllocationPolicy; | 220 class FreeStoreAllocationPolicy; |
| 221 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 221 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
| 222 | 222 |
| 223 // ----------------------------------------------------------------------------- | 223 // ----------------------------------------------------------------------------- |
| 224 // Declarations for use in both the preparser and the rest of V8. | 224 // Declarations for use in both the preparser and the rest of V8. |
| 225 | 225 |
| 226 // The Strict Mode (ECMA-262 5th edition, 4.2.2). | 226 // The Strict Mode (ECMA-262 5th edition, 4.2.2). |
| 227 | 227 |
| 228 enum StrictMode { SLOPPY, STRICT }; | 228 enum LanguageMode { |
| 229 SLOPPY, | |
| 230 STRICT = 1 << 0, | |
| 231 LANGUAGE_END | |
| 232 }; | |
| 229 | 233 |
| 234 #define is_strict(language_mode) ((language_mode) & STRICT) | |
|
rossberg
2015/02/03 12:26:20
Why a macro instead of an inline funciton?
marja
2015/02/03 14:45:02
Made this inline; added is_sloppy and is_valid_lan
| |
| 230 | 235 |
| 231 // Mask for the sign bit in a smi. | 236 // Mask for the sign bit in a smi. |
| 232 const intptr_t kSmiSignMask = kIntptrSignBit; | 237 const intptr_t kSmiSignMask = kIntptrSignBit; |
| 233 | 238 |
| 234 const int kObjectAlignmentBits = kPointerSizeLog2; | 239 const int kObjectAlignmentBits = kPointerSizeLog2; |
| 235 const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits; | 240 const intptr_t kObjectAlignment = 1 << kObjectAlignmentBits; |
| 236 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; | 241 const intptr_t kObjectAlignmentMask = kObjectAlignment - 1; |
| 237 | 242 |
| 238 // Desired alignment for pointers. | 243 // Desired alignment for pointers. |
| 239 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); | 244 const intptr_t kPointerAlignment = (1 << kPointerSizeLog2); |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 817 DCHECK(IsValidFunctionKind(kind)); | 822 DCHECK(IsValidFunctionKind(kind)); |
| 818 return kind & FunctionKind::kDefaultConstructor; | 823 return kind & FunctionKind::kDefaultConstructor; |
| 819 } | 824 } |
| 820 | 825 |
| 821 | 826 |
| 822 } } // namespace v8::internal | 827 } } // namespace v8::internal |
| 823 | 828 |
| 824 namespace i = v8::internal; | 829 namespace i = v8::internal; |
| 825 | 830 |
| 826 #endif // V8_GLOBALS_H_ | 831 #endif // V8_GLOBALS_H_ |
| OLD | NEW |