Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(831)

Side by Side Diff: src/objects.h

Issue 2257133002: Revert of There are only 2 language modes, not 3 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/ic-state.h ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <memory> 9 #include <memory>
10 10
(...skipping 4383 matching lines...) Expand 10 before | Expand all | Expand 10 after
4394 VariableLocation* location, InitializationFlag* init_flag, 4394 VariableLocation* location, InitializationFlag* init_flag,
4395 MaybeAssignedFlag* maybe_assigned_flag); 4395 MaybeAssignedFlag* maybe_assigned_flag);
4396 4396
4397 // Used for the function name variable for named function expressions, and for 4397 // Used for the function name variable for named function expressions, and for
4398 // the receiver. 4398 // the receiver.
4399 enum VariableAllocationInfo { NONE, STACK, CONTEXT, UNUSED }; 4399 enum VariableAllocationInfo { NONE, STACK, CONTEXT, UNUSED };
4400 4400
4401 // Properties of scopes. 4401 // Properties of scopes.
4402 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; 4402 class ScopeTypeField : public BitField<ScopeType, 0, 4> {};
4403 class CallsEvalField : public BitField<bool, ScopeTypeField::kNext, 1> {}; 4403 class CallsEvalField : public BitField<bool, ScopeTypeField::kNext, 1> {};
4404 STATIC_ASSERT(LANGUAGE_END == 2); 4404 STATIC_ASSERT(LANGUAGE_END == 3);
4405 class LanguageModeField 4405 class LanguageModeField
4406 : public BitField<LanguageMode, CallsEvalField::kNext, 1> {}; 4406 : public BitField<LanguageMode, CallsEvalField::kNext, 2> {};
4407 class DeclarationScopeField 4407 class DeclarationScopeField
4408 : public BitField<bool, LanguageModeField::kNext, 1> {}; 4408 : public BitField<bool, LanguageModeField::kNext, 1> {};
4409 class ReceiverVariableField 4409 class ReceiverVariableField
4410 : public BitField<VariableAllocationInfo, DeclarationScopeField::kNext, 4410 : public BitField<VariableAllocationInfo, DeclarationScopeField::kNext,
4411 2> {}; 4411 2> {};
4412 class HasNewTargetField 4412 class HasNewTargetField
4413 : public BitField<bool, ReceiverVariableField::kNext, 1> {}; 4413 : public BitField<bool, ReceiverVariableField::kNext, 1> {};
4414 class FunctionVariableField 4414 class FunctionVariableField
4415 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; 4415 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {};
4416 class FunctionVariableMode 4416 class FunctionVariableMode
(...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after
7574 kIsSubclassConstructor, 7574 kIsSubclassConstructor,
7575 kIsBaseConstructor, 7575 kIsBaseConstructor,
7576 kIsGetterFunction, 7576 kIsGetterFunction,
7577 kIsSetterFunction, 7577 kIsSetterFunction,
7578 // byte 3 7578 // byte 3
7579 kIsAsyncFunction, 7579 kIsAsyncFunction,
7580 kDeserialized, 7580 kDeserialized,
7581 kIsDeclaration, 7581 kIsDeclaration,
7582 kCompilerHintsCount, // Pseudo entry 7582 kCompilerHintsCount, // Pseudo entry
7583 }; 7583 };
7584 // Add hints for other modes when they're added.
7585 STATIC_ASSERT(LANGUAGE_END == 3);
7584 // kFunctionKind has to be byte-aligned 7586 // kFunctionKind has to be byte-aligned
7585 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); 7587 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0);
7586 // Make sure that FunctionKind and byte 2 are in sync: 7588 // Make sure that FunctionKind and byte 2 are in sync:
7587 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ 7589 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \
7588 STATIC_ASSERT(FunctionKind::functionKind == \ 7590 STATIC_ASSERT(FunctionKind::functionKind == \
7589 1 << (compilerFunctionKind - kFunctionKind)) 7591 1 << (compilerFunctionKind - kFunctionKind))
7590 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); 7592 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow);
7591 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); 7593 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator);
7592 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); 7594 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod);
7593 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); 7595 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor);
(...skipping 3577 matching lines...) Expand 10 before | Expand all | Expand 10 after
11171 } 11173 }
11172 return value; 11174 return value;
11173 } 11175 }
11174 }; 11176 };
11175 11177
11176 11178
11177 } // NOLINT, false-positive due to second-order macros. 11179 } // NOLINT, false-positive due to second-order macros.
11178 } // NOLINT, false-positive due to second-order macros. 11180 } // NOLINT, false-positive due to second-order macros.
11179 11181
11180 #endif // V8_OBJECTS_H_ 11182 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic/ic-state.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698