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 4270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4281 class FunctionVariableField | 4281 class FunctionVariableField |
4282 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; | 4282 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; |
4283 class FunctionVariableMode | 4283 class FunctionVariableMode |
4284 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; | 4284 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; |
4285 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { | 4285 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { |
4286 }; | 4286 }; |
4287 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; | 4287 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; |
4288 class HasSimpleParametersField | 4288 class HasSimpleParametersField |
4289 : public BitField<bool, AsmFunctionField::kNext, 1> {}; | 4289 : public BitField<bool, AsmFunctionField::kNext, 1> {}; |
4290 class FunctionKindField | 4290 class FunctionKindField |
4291 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 8> {}; | 4291 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 9> {}; |
4292 | 4292 |
4293 // BitFields representing the encoded information for context locals in the | 4293 // BitFields representing the encoded information for context locals in the |
4294 // ContextLocalInfoEntries part. | 4294 // ContextLocalInfoEntries part. |
4295 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; | 4295 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; |
4296 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; | 4296 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; |
4297 class ContextLocalMaybeAssignedFlag | 4297 class ContextLocalMaybeAssignedFlag |
4298 : public BitField<MaybeAssignedFlag, 4, 1> {}; | 4298 : public BitField<MaybeAssignedFlag, 4, 1> {}; |
4299 | 4299 |
4300 friend class ScopeIterator; | 4300 friend class ScopeIterator; |
4301 }; | 4301 }; |
(...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7135 kFunctionKind, | 7135 kFunctionKind, |
7136 kIsArrow = kFunctionKind, | 7136 kIsArrow = kFunctionKind, |
7137 kIsGenerator, | 7137 kIsGenerator, |
7138 kIsConciseMethod, | 7138 kIsConciseMethod, |
7139 kIsDefaultConstructor, | 7139 kIsDefaultConstructor, |
7140 kIsSubclassConstructor, | 7140 kIsSubclassConstructor, |
7141 kIsBaseConstructor, | 7141 kIsBaseConstructor, |
7142 kIsGetterFunction, | 7142 kIsGetterFunction, |
7143 kIsSetterFunction, | 7143 kIsSetterFunction, |
7144 // byte 3 | 7144 // byte 3 |
| 7145 kIsAsyncFunction, |
7145 kDeserialized, | 7146 kDeserialized, |
7146 kIsDeclaration, | 7147 kIsDeclaration, |
7147 kCompilerHintsCount, // Pseudo entry | 7148 kCompilerHintsCount, // Pseudo entry |
7148 }; | 7149 }; |
7149 // Add hints for other modes when they're added. | 7150 // Add hints for other modes when they're added. |
7150 STATIC_ASSERT(LANGUAGE_END == 3); | 7151 STATIC_ASSERT(LANGUAGE_END == 3); |
7151 // kFunctionKind has to be byte-aligned | 7152 // kFunctionKind has to be byte-aligned |
7152 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); | 7153 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); |
7153 // Make sure that FunctionKind and byte 2 are in sync: | 7154 // Make sure that FunctionKind and byte 2 are in sync: |
7154 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ | 7155 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ |
7155 STATIC_ASSERT(FunctionKind::functionKind == \ | 7156 STATIC_ASSERT(FunctionKind::functionKind == \ |
7156 1 << (compilerFunctionKind - kFunctionKind)) | 7157 1 << (compilerFunctionKind - kFunctionKind)) |
7157 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); | 7158 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); |
7158 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); | 7159 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); |
7159 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); | 7160 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); |
7160 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); | 7161 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); |
7161 ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor); | 7162 ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor); |
7162 ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor); | 7163 ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor); |
7163 ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction); | 7164 ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction); |
7164 ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction); | 7165 ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction); |
7165 #undef ASSERT_FUNCTION_KIND_ORDER | 7166 #undef ASSERT_FUNCTION_KIND_ORDER |
7166 | 7167 |
7167 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 8> {}; | 7168 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 9> {}; |
7168 | 7169 |
7169 class DeoptCountBits : public BitField<int, 0, 4> {}; | 7170 class DeoptCountBits : public BitField<int, 0, 4> {}; |
7170 class OptReenableTriesBits : public BitField<int, 4, 18> {}; | 7171 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
7171 class ICAgeBits : public BitField<int, 22, 8> {}; | 7172 class ICAgeBits : public BitField<int, 22, 8> {}; |
7172 | 7173 |
7173 class OptCountBits : public BitField<int, 0, 22> {}; | 7174 class OptCountBits : public BitField<int, 0, 22> {}; |
7174 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; | 7175 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; |
7175 | 7176 |
7176 private: | 7177 private: |
7177 #if V8_HOST_ARCH_32_BIT | 7178 #if V8_HOST_ARCH_32_BIT |
(...skipping 3545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10723 } | 10724 } |
10724 return value; | 10725 return value; |
10725 } | 10726 } |
10726 }; | 10727 }; |
10727 | 10728 |
10728 | 10729 |
10729 } // NOLINT, false-positive due to second-order macros. | 10730 } // NOLINT, false-positive due to second-order macros. |
10730 } // NOLINT, false-positive due to second-order macros. | 10731 } // NOLINT, false-positive due to second-order macros. |
10731 | 10732 |
10732 #endif // V8_OBJECTS_H_ | 10733 #endif // V8_OBJECTS_H_ |
OLD | NEW |