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_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/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 4303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4314 enum FunctionVariableInfo { | 4314 enum FunctionVariableInfo { |
4315 NONE, // No function name present. | 4315 NONE, // No function name present. |
4316 STACK, // Function | 4316 STACK, // Function |
4317 CONTEXT, | 4317 CONTEXT, |
4318 UNUSED | 4318 UNUSED |
4319 }; | 4319 }; |
4320 | 4320 |
4321 // Properties of scopes. | 4321 // Properties of scopes. |
4322 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; | 4322 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; |
4323 class CallsEvalField : public BitField<bool, 4, 1> {}; | 4323 class CallsEvalField : public BitField<bool, 4, 1> {}; |
4324 STATIC_ASSERT(LANGUAGE_END == 2); | 4324 STATIC_ASSERT(LANGUAGE_END == 3); |
4325 class LanguageModeField : public BitField<LanguageMode, 5, 1> {}; | 4325 class LanguageModeField : public BitField<LanguageMode, 5, 2> {}; |
4326 class FunctionVariableField : public BitField<FunctionVariableInfo, 6, 2> {}; | 4326 class FunctionVariableField : public BitField<FunctionVariableInfo, 7, 2> {}; |
4327 class FunctionVariableMode : public BitField<VariableMode, 8, 3> {}; | 4327 class FunctionVariableMode : public BitField<VariableMode, 9, 3> {}; |
4328 class AsmModuleField : public BitField<bool, 11, 1> {}; | 4328 class AsmModuleField : public BitField<bool, 12, 1> {}; |
4329 class AsmFunctionField : public BitField<bool, 12, 1> {}; | 4329 class AsmFunctionField : public BitField<bool, 13, 1> {}; |
4330 | 4330 |
4331 // BitFields representing the encoded information for context locals in the | 4331 // BitFields representing the encoded information for context locals in the |
4332 // ContextLocalInfoEntries part. | 4332 // ContextLocalInfoEntries part. |
4333 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; | 4333 class ContextLocalMode: public BitField<VariableMode, 0, 3> {}; |
4334 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; | 4334 class ContextLocalInitFlag: public BitField<InitializationFlag, 3, 1> {}; |
4335 class ContextLocalMaybeAssignedFlag | 4335 class ContextLocalMaybeAssignedFlag |
4336 : public BitField<MaybeAssignedFlag, 4, 1> {}; | 4336 : public BitField<MaybeAssignedFlag, 4, 1> {}; |
4337 }; | 4337 }; |
4338 | 4338 |
4339 | 4339 |
(...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7166 static const int kIsTopLevelBit = 1; | 7166 static const int kIsTopLevelBit = 1; |
7167 static const int kStartPositionShift = 2; | 7167 static const int kStartPositionShift = 2; |
7168 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 7168 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
7169 | 7169 |
7170 // Bit positions in compiler_hints. | 7170 // Bit positions in compiler_hints. |
7171 enum CompilerHints { | 7171 enum CompilerHints { |
7172 kAllowLazyCompilation, | 7172 kAllowLazyCompilation, |
7173 kAllowLazyCompilationWithoutContext, | 7173 kAllowLazyCompilationWithoutContext, |
7174 kOptimizationDisabled, | 7174 kOptimizationDisabled, |
7175 kStrictModeFunction, | 7175 kStrictModeFunction, |
| 7176 kSaneModeFunction, |
7176 kUsesArguments, | 7177 kUsesArguments, |
7177 kUsesSuperProperty, | 7178 kUsesSuperProperty, |
7178 kUsesSuperConstructorCall, | 7179 kUsesSuperConstructorCall, |
7179 kHasDuplicateParameters, | 7180 kHasDuplicateParameters, |
7180 kNative, | 7181 kNative, |
7181 kInlineBuiltin, | 7182 kInlineBuiltin, |
7182 kBoundFunction, | 7183 kBoundFunction, |
7183 kIsAnonymous, | 7184 kIsAnonymous, |
7184 kNameShouldPrintAsAnonymous, | 7185 kNameShouldPrintAsAnonymous, |
7185 kIsFunction, | 7186 kIsFunction, |
7186 kDontCache, | 7187 kDontCache, |
7187 kDontFlush, | 7188 kDontFlush, |
7188 kIsArrow, | 7189 kIsArrow, |
7189 kIsGenerator, | 7190 kIsGenerator, |
7190 kIsConciseMethod, | 7191 kIsConciseMethod, |
7191 kIsDefaultConstructor, | 7192 kIsDefaultConstructor, |
7192 kIsSubclassConstructor, | 7193 kIsSubclassConstructor, |
7193 kIsAsmFunction, | 7194 kIsAsmFunction, |
7194 kDeserialized, | 7195 kDeserialized, |
7195 kCompilerHintsCount // Pseudo entry | 7196 kCompilerHintsCount // Pseudo entry |
7196 }; | 7197 }; |
7197 // Add hints for other modes when they're added. | 7198 // Add hints for other modes when they're added. |
7198 STATIC_ASSERT(LANGUAGE_END == 2); | 7199 STATIC_ASSERT(LANGUAGE_END == 3); |
7199 | 7200 |
7200 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 5> {}; | 7201 class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 5> {}; |
7201 | 7202 |
7202 class DeoptCountBits : public BitField<int, 0, 4> {}; | 7203 class DeoptCountBits : public BitField<int, 0, 4> {}; |
7203 class OptReenableTriesBits : public BitField<int, 4, 18> {}; | 7204 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
7204 class ICAgeBits : public BitField<int, 22, 8> {}; | 7205 class ICAgeBits : public BitField<int, 22, 8> {}; |
7205 | 7206 |
7206 class OptCountBits : public BitField<int, 0, 22> {}; | 7207 class OptCountBits : public BitField<int, 0, 22> {}; |
7207 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; | 7208 class DisabledOptimizationReasonBits : public BitField<int, 22, 8> {}; |
7208 | 7209 |
(...skipping 3740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10949 } else { | 10950 } else { |
10950 value &= ~(1 << bit_position); | 10951 value &= ~(1 << bit_position); |
10951 } | 10952 } |
10952 return value; | 10953 return value; |
10953 } | 10954 } |
10954 }; | 10955 }; |
10955 | 10956 |
10956 } } // namespace v8::internal | 10957 } } // namespace v8::internal |
10957 | 10958 |
10958 #endif // V8_OBJECTS_H_ | 10959 #endif // V8_OBJECTS_H_ |
OLD | NEW |