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

Side by Side Diff: src/objects.h

Issue 2261463002: There are only 2 language modes, not 3 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo last_language_mode 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 4386 matching lines...) Expand 10 before | Expand all | Expand 10 after
4397 VariableLocation* location, InitializationFlag* init_flag, 4397 VariableLocation* location, InitializationFlag* init_flag,
4398 MaybeAssignedFlag* maybe_assigned_flag); 4398 MaybeAssignedFlag* maybe_assigned_flag);
4399 4399
4400 // Used for the function name variable for named function expressions, and for 4400 // Used for the function name variable for named function expressions, and for
4401 // the receiver. 4401 // the receiver.
4402 enum VariableAllocationInfo { NONE, STACK, CONTEXT, UNUSED }; 4402 enum VariableAllocationInfo { NONE, STACK, CONTEXT, UNUSED };
4403 4403
4404 // Properties of scopes. 4404 // Properties of scopes.
4405 class ScopeTypeField : public BitField<ScopeType, 0, 4> {}; 4405 class ScopeTypeField : public BitField<ScopeType, 0, 4> {};
4406 class CallsEvalField : public BitField<bool, ScopeTypeField::kNext, 1> {}; 4406 class CallsEvalField : public BitField<bool, ScopeTypeField::kNext, 1> {};
4407 STATIC_ASSERT(LANGUAGE_END == 3); 4407 STATIC_ASSERT(LANGUAGE_END == 2);
4408 class LanguageModeField 4408 class LanguageModeField
4409 : public BitField<LanguageMode, CallsEvalField::kNext, 2> {}; 4409 : public BitField<LanguageMode, CallsEvalField::kNext, 1> {};
4410 class DeclarationScopeField 4410 class DeclarationScopeField
4411 : public BitField<bool, LanguageModeField::kNext, 1> {}; 4411 : public BitField<bool, LanguageModeField::kNext, 1> {};
4412 class ReceiverVariableField 4412 class ReceiverVariableField
4413 : public BitField<VariableAllocationInfo, DeclarationScopeField::kNext, 4413 : public BitField<VariableAllocationInfo, DeclarationScopeField::kNext,
4414 2> {}; 4414 2> {};
4415 class HasNewTargetField 4415 class HasNewTargetField
4416 : public BitField<bool, ReceiverVariableField::kNext, 1> {}; 4416 : public BitField<bool, ReceiverVariableField::kNext, 1> {};
4417 class FunctionVariableField 4417 class FunctionVariableField
4418 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {}; 4418 : public BitField<VariableAllocationInfo, HasNewTargetField::kNext, 2> {};
4419 class FunctionVariableMode 4419 class FunctionVariableMode
(...skipping 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after
7501 kIsBaseConstructor, 7501 kIsBaseConstructor,
7502 kIsGetterFunction, 7502 kIsGetterFunction,
7503 kIsSetterFunction, 7503 kIsSetterFunction,
7504 // byte 3 7504 // byte 3
7505 kIsAsyncFunction, 7505 kIsAsyncFunction,
7506 kDeserialized, 7506 kDeserialized,
7507 kIsDeclaration, 7507 kIsDeclaration,
7508 kIsAsmWasmBroken, 7508 kIsAsmWasmBroken,
7509 kCompilerHintsCount, // Pseudo entry 7509 kCompilerHintsCount, // Pseudo entry
7510 }; 7510 };
7511 // Add hints for other modes when they're added.
7512 STATIC_ASSERT(LANGUAGE_END == 3);
7513 // kFunctionKind has to be byte-aligned 7511 // kFunctionKind has to be byte-aligned
7514 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); 7512 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0);
7515 // Make sure that FunctionKind and byte 2 are in sync: 7513 // Make sure that FunctionKind and byte 2 are in sync:
7516 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ 7514 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \
7517 STATIC_ASSERT(FunctionKind::functionKind == \ 7515 STATIC_ASSERT(FunctionKind::functionKind == \
7518 1 << (compilerFunctionKind - kFunctionKind)) 7516 1 << (compilerFunctionKind - kFunctionKind))
7519 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); 7517 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow);
7520 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); 7518 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator);
7521 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod); 7519 ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod);
7522 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor); 7520 ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor);
(...skipping 3577 matching lines...) Expand 10 before | Expand all | Expand 10 after
11100 } 11098 }
11101 return value; 11099 return value;
11102 } 11100 }
11103 }; 11101 };
11104 11102
11105 11103
11106 } // NOLINT, false-positive due to second-order macros. 11104 } // NOLINT, false-positive due to second-order macros.
11107 } // NOLINT, false-positive due to second-order macros. 11105 } // NOLINT, false-positive due to second-order macros.
11108 11106
11109 #endif // V8_OBJECTS_H_ 11107 #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