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 4277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4288 class FunctionVariableField | 4288 class FunctionVariableField |
4289 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; | 4289 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; |
4290 class FunctionVariableMode | 4290 class FunctionVariableMode |
4291 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; | 4291 : public BitField<VariableMode, FunctionVariableField::kNext, 3> {}; |
4292 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { | 4292 class AsmModuleField : public BitField<bool, FunctionVariableMode::kNext, 1> { |
4293 }; | 4293 }; |
4294 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; | 4294 class AsmFunctionField : public BitField<bool, AsmModuleField::kNext, 1> {}; |
4295 class HasSimpleParametersField | 4295 class HasSimpleParametersField |
4296 : public BitField<bool, AsmFunctionField::kNext, 1> {}; | 4296 : public BitField<bool, AsmFunctionField::kNext, 1> {}; |
4297 class FunctionKindField | 4297 class FunctionKindField |
4298 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 8> {}; | 4298 : public BitField<FunctionKind, HasSimpleParametersField::kNext, 9> {}; |
4299 | 4299 |
4300 // BitFields representing the encoded information for context locals in the | 4300 // BitFields representing the encoded information for context locals in the |
4301 // ContextLocalInfoEntries part. | 4301 // ContextLocalInfoEntries part. |
4302 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; | 4302 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; |
4303 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; | 4303 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; |
4304 class ContextLocalMaybeAssignedFlag | 4304 class ContextLocalMaybeAssignedFlag |
4305 : public BitField<MaybeAssignedFlag, 4, 1> {}; | 4305 : public BitField<MaybeAssignedFlag, 4, 1> {}; |
4306 | 4306 |
4307 friend class ScopeIterator; | 4307 friend class ScopeIterator; |
4308 }; | 4308 }; |
(...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7142 kFunctionKind, | 7142 kFunctionKind, |
7143 kIsArrow = kFunctionKind, | 7143 kIsArrow = kFunctionKind, |
7144 kIsGenerator, | 7144 kIsGenerator, |
7145 kIsConciseMethod, | 7145 kIsConciseMethod, |
7146 kIsDefaultConstructor, | 7146 kIsDefaultConstructor, |
7147 kIsSubclassConstructor, | 7147 kIsSubclassConstructor, |
7148 kIsBaseConstructor, | 7148 kIsBaseConstructor, |
7149 kIsGetterFunction, | 7149 kIsGetterFunction, |
7150 kIsSetterFunction, | 7150 kIsSetterFunction, |
7151 // byte 3 | 7151 // byte 3 |
| 7152 kIsAsyncFunction, |
7152 kDeserialized, | 7153 kDeserialized, |
7153 kIsDeclaration, | 7154 kIsDeclaration, |
7154 kCompilerHintsCount, // Pseudo entry | 7155 kCompilerHintsCount, // Pseudo entry |
7155 }; | 7156 }; |
7156 // Add hints for other modes when they're added. | 7157 // Add hints for other modes when they're added. |
7157 STATIC_ASSERT(LANGUAGE_END == 3); | 7158 STATIC_ASSERT(LANGUAGE_END == 3); |
7158 // kFunctionKind has to be byte-aligned | 7159 // kFunctionKind has to be byte-aligned |
7159 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); | 7160 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); |
7160 // Make sure that FunctionKind and byte 2 are in sync: | 7161 // Make sure that FunctionKind and byte 2 are in sync: |
7161 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ | 7162 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ |
7162 STATIC_ASSERT(FunctionKind::functionKind == \ | 7163 STATIC_ASSERT(FunctionKind::functionKind == \ |
7163 1 << (compilerFunctionKind - kFunctionKind)) | 7164 1 << (compilerFunctionKind - kFunctionKind)) |
7164 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); | 7165 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); |
7165 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); | 7166 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); |
7166 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); | 7167 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); |
7167 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); | 7168 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); |
7168 ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor); | 7169 ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor); |
7169 ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor); | 7170 ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor); |
7170 ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction); | 7171 ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction); |
7171 ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction); | 7172 ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction); |
7172 #undef ASSERT_FUNCTION_KIND_ORDER | 7173 #undef ASSERT_FUNCTION_KIND_ORDER |
7173 | 7174 |
7174 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 8> {}; | 7175 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 9> {}; |
7175 | 7176 |
7176 class DeoptCountBits : public BitField<int, 0, 4> {}; | 7177 class DeoptCountBits : public BitField<int, 0, 4> {}; |
7177 class OptReenableTriesBits : public BitField<int, 4, 18> {}; | 7178 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
7178 class ICAgeBits : public BitField<int, 22, 8> {}; | 7179 class ICAgeBits : public BitField<int, 22, 8> {}; |
7179 | 7180 |
7180 class OptCountBits : public BitField<int, 0, 22> {}; | 7181 class OptCountBits : public BitField<int, 0, 22> {}; |
7181 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; | 7182 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; |
7182 | 7183 |
7183 private: | 7184 private: |
7184 #if V8_HOST_ARCH_32_BIT | 7185 #if V8_HOST_ARCH_32_BIT |
(...skipping 3548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10733 } | 10734 } |
10734 return value; | 10735 return value; |
10735 } | 10736 } |
10736 }; | 10737 }; |
10737 | 10738 |
10738 | 10739 |
10739 } // NOLINT, false-positive due to second-order macros. | 10740 } // NOLINT, false-positive due to second-order macros. |
10740 } // NOLINT, false-positive due to second-order macros. | 10741 } // NOLINT, false-positive due to second-order macros. |
10741 | 10742 |
10742 #endif // V8_OBJECTS_H_ | 10743 #endif // V8_OBJECTS_H_ |
OLD | NEW |