| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 4347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4358 class FunctionVariableField | 4358 class FunctionVariableField |
| 4359 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; | 4359 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; |
| 4360 class FunctionVariableMode | 4360 class FunctionVariableMode |
| 4361 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; | 4361 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; |
| 4362 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { | 4362 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { |
| 4363 }; | 4363 }; |
| 4364 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; | 4364 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; |
| 4365 class HasSimpleParametersField | 4365 class HasSimpleParametersField |
| 4366 : public BitField<bool, AsmFunctionField::kNext, 1> {}; | 4366 : public BitField<bool, AsmFunctionField::kNext, 1> {}; |
| 4367 class FunctionKindField | 4367 class FunctionKindField |
| 4368 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 8> {}; | 4368 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 9> {}; |
| 4369 | 4369 |
| 4370 // BitFields representing the encoded information for context locals in the | 4370 // BitFields representing the encoded information for context locals in the |
| 4371 // ContextLocalInfoEntries part. | 4371 // ContextLocalInfoEntries part. |
| 4372 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; | 4372 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; |
| 4373 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; | 4373 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; |
| 4374 class ContextLocalMaybeAssignedFlag | 4374 class ContextLocalMaybeAssignedFlag |
| 4375 : public BitField<MaybeAssignedFlag, 4, 1> {}; | 4375 : public BitField<MaybeAssignedFlag, 4, 1> {}; |
| 4376 | 4376 |
| 4377 friend class ScopeIterator; | 4377 friend class ScopeIterator; |
| 4378 }; | 4378 }; |
| (...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7205 kFunctionKind, | 7205 kFunctionKind, |
| 7206 kIsArrow = kFunctionKind, | 7206 kIsArrow = kFunctionKind, |
| 7207 kIsGenerator, | 7207 kIsGenerator, |
| 7208 kIsConciseMethod, | 7208 kIsConciseMethod, |
| 7209 kIsDefaultConstructor, | 7209 kIsDefaultConstructor, |
| 7210 kIsSubclassConstructor, | 7210 kIsSubclassConstructor, |
| 7211 kIsBaseConstructor, | 7211 kIsBaseConstructor, |
| 7212 kIsGetterFunction, | 7212 kIsGetterFunction, |
| 7213 kIsSetterFunction, | 7213 kIsSetterFunction, |
| 7214 // byte 3 | 7214 // byte 3 |
| 7215 kIsAsyncFunction, |
| 7215 kDeserialized, | 7216 kDeserialized, |
| 7216 kIsDeclaration, | 7217 kIsDeclaration, |
| 7217 kCompilerHintsCount, // Pseudo entry | 7218 kCompilerHintsCount, // Pseudo entry |
| 7218 }; | 7219 }; |
| 7219 // Add hints for other modes when they're added. | 7220 // Add hints for other modes when they're added. |
| 7220 STATIC_ASSERT(LANGUAGE_END == 3); | 7221 STATIC_ASSERT(LANGUAGE_END == 3); |
| 7221 // kFunctionKind has to be byte-aligned | 7222 // kFunctionKind has to be byte-aligned |
| 7222 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); | 7223 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); |
| 7223 // Make sure that FunctionKind and byte 2 are in sync: | 7224 // Make sure that FunctionKind and byte 2 are in sync: |
| 7224 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ | 7225 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ |
| 7225 STATIC_ASSERT(FunctionKind::functionKind == \ | 7226 STATIC_ASSERT(FunctionKind::functionKind == \ |
| 7226 1 << (compilerFunctionKind - kFunctionKind)) | 7227 1 << (compilerFunctionKind - kFunctionKind)) |
| 7227 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); | 7228 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); |
| 7228 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); | 7229 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); |
| 7229 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); | 7230 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); |
| 7230 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); | 7231 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); |
| 7231 ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor); | 7232 ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor); |
| 7232 ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor); | 7233 ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor); |
| 7233 ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction); | 7234 ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction); |
| 7234 ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction); | 7235 ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction); |
| 7235 #undef ASSERT_FUNCTION_KIND_ORDER | 7236 #undef ASSERT_FUNCTION_KIND_ORDER |
| 7236 | 7237 |
| 7237 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 8> {}; | 7238 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 9> {}; |
| 7238 | 7239 |
| 7239 class DeoptCountBits : public BitField<int, 0, 4> {}; | 7240 class DeoptCountBits : public BitField<int, 0, 4> {}; |
| 7240 class OptReenableTriesBits : public BitField<int, 4, 18> {}; | 7241 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
| 7241 class ICAgeBits : public BitField<int, 22, 8> {}; | 7242 class ICAgeBits : public BitField<int, 22, 8> {}; |
| 7242 | 7243 |
| 7243 class OptCountBits : public BitField<int, 0, 22> {}; | 7244 class OptCountBits : public BitField<int, 0, 22> {}; |
| 7244 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; | 7245 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; |
| 7245 | 7246 |
| 7246 private: | 7247 private: |
| 7247 #if V8_HOST_ARCH_32_BIT | 7248 #if V8_HOST_ARCH_32_BIT |
| (...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10780 } | 10781 } |
| 10781 return value; | 10782 return value; |
| 10782 } | 10783 } |
| 10783 }; | 10784 }; |
| 10784 | 10785 |
| 10785 | 10786 |
| 10786 } // NOLINT, false-positive due to second-order macros. | 10787 } // NOLINT, false-positive due to second-order macros. |
| 10787 } // NOLINT, false-positive due to second-order macros. | 10788 } // NOLINT, false-positive due to second-order macros. |
| 10788 | 10789 |
| 10789 #endif // V8_OBJECTS_H_ | 10790 #endif // V8_OBJECTS_H_ |
| OLD | NEW |