[parser] PreParserIdentifier member reordering
Restricting the enum to uint8_t and reorder type for better alignment. Bug: v8:7926 Change-Id: Ib37d600a189d12bac3c6aa8cf4b88970f8547548 Reviewed-on: https://chromium-review.googlesource.com/1188125 Commit-Queue: Florian Sattler <sattlerf@google.com> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#55388}
This commit is contained in:
parent
ff7434107c
commit
3268077990
@ -65,7 +65,7 @@ class PreParserIdentifier {
|
|||||||
bool IsPrivateName() const { return type_ == kPrivateNameIdentifier; }
|
bool IsPrivateName() const { return type_ == kPrivateNameIdentifier; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum Type {
|
enum Type : uint8_t {
|
||||||
kNullIdentifier,
|
kNullIdentifier,
|
||||||
kUnknownIdentifier,
|
kUnknownIdentifier,
|
||||||
kEvalIdentifier,
|
kEvalIdentifier,
|
||||||
@ -77,10 +77,11 @@ class PreParserIdentifier {
|
|||||||
kPrivateNameIdentifier
|
kPrivateNameIdentifier
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit PreParserIdentifier(Type type) : type_(type), string_(nullptr) {}
|
explicit PreParserIdentifier(Type type) : string_(nullptr), type_(type) {}
|
||||||
Type type_;
|
|
||||||
// Only non-nullptr when PreParser.track_unresolved_variables_ is true.
|
// Only non-nullptr when PreParser.track_unresolved_variables_ is true.
|
||||||
const AstRawString* string_;
|
const AstRawString* string_;
|
||||||
|
|
||||||
|
Type type_;
|
||||||
friend class PreParserExpression;
|
friend class PreParserExpression;
|
||||||
friend class PreParser;
|
friend class PreParser;
|
||||||
friend class PreParserFactory;
|
friend class PreParserFactory;
|
||||||
@ -402,7 +403,7 @@ class PreParserExpression {
|
|||||||
typedef BitField<ExpressionType, TypeField::kNext, 4> ExpressionTypeField;
|
typedef BitField<ExpressionType, TypeField::kNext, 4> ExpressionTypeField;
|
||||||
typedef BitField<bool, TypeField::kNext, 1> IsUseStrictField;
|
typedef BitField<bool, TypeField::kNext, 1> IsUseStrictField;
|
||||||
typedef BitField<bool, IsUseStrictField::kNext, 1> IsUseAsmField;
|
typedef BitField<bool, IsUseStrictField::kNext, 1> IsUseAsmField;
|
||||||
typedef BitField<PreParserIdentifier::Type, TypeField::kNext, 10>
|
typedef BitField<PreParserIdentifier::Type, TypeField::kNext, 8>
|
||||||
IdentifierTypeField;
|
IdentifierTypeField;
|
||||||
typedef BitField<bool, TypeField::kNext, 1> HasCoverInitializedNameField;
|
typedef BitField<bool, TypeField::kNext, 1> HasCoverInitializedNameField;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user