Commit 32680779 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[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: 's avatarMarja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55388}
parent ff743410
......@@ -65,7 +65,7 @@ class PreParserIdentifier {
bool IsPrivateName() const { return type_ == kPrivateNameIdentifier; }
private:
enum Type {
enum Type : uint8_t {
kNullIdentifier,
kUnknownIdentifier,
kEvalIdentifier,
......@@ -77,10 +77,11 @@ class PreParserIdentifier {
kPrivateNameIdentifier
};
explicit PreParserIdentifier(Type type) : type_(type), string_(nullptr) {}
Type type_;
explicit PreParserIdentifier(Type type) : string_(nullptr), type_(type) {}
// Only non-nullptr when PreParser.track_unresolved_variables_ is true.
const AstRawString* string_;
Type type_;
friend class PreParserExpression;
friend class PreParser;
friend class PreParserFactory;
......@@ -402,7 +403,7 @@ class PreParserExpression {
typedef BitField<ExpressionType, TypeField::kNext, 4> ExpressionTypeField;
typedef BitField<bool, TypeField::kNext, 1> IsUseStrictField;
typedef BitField<bool, IsUseStrictField::kNext, 1> IsUseAsmField;
typedef BitField<PreParserIdentifier::Type, TypeField::kNext, 10>
typedef BitField<PreParserIdentifier::Type, TypeField::kNext, 8>
IdentifierTypeField;
typedef BitField<bool, TypeField::kNext, 1> HasCoverInitializedNameField;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment