[ast] Remove dead fields from BinaryOperation expression.
R=marja@chromium.org Change-Id: I8a1ad2e64f5ec755fe5ce5949bf9b455696bd3f4 Reviewed-on: https://chromium-review.googlesource.com/543056 Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#46115}
This commit is contained in:
parent
d17f437e5b
commit
2a0bfdb50e
@ -1726,16 +1726,11 @@ class Call final : public Expression {
|
||||
|
||||
Handle<JSFunction> target() { return target_; }
|
||||
|
||||
Handle<AllocationSite> allocation_site() { return allocation_site_; }
|
||||
|
||||
void SetKnownGlobalTarget(Handle<JSFunction> target) {
|
||||
target_ = target;
|
||||
set_is_uninitialized(false);
|
||||
}
|
||||
void set_target(Handle<JSFunction> target) { target_ = target; }
|
||||
void set_allocation_site(Handle<AllocationSite> site) {
|
||||
allocation_site_ = site;
|
||||
}
|
||||
|
||||
bool is_uninitialized() const {
|
||||
return IsUninitializedField::decode(bit_field_);
|
||||
@ -1803,7 +1798,6 @@ class Call final : public Expression {
|
||||
Expression* expression_;
|
||||
ZoneList<Expression*>* arguments_;
|
||||
Handle<JSFunction> target_;
|
||||
Handle<AllocationSite> allocation_site_;
|
||||
};
|
||||
|
||||
|
||||
@ -1829,13 +1823,7 @@ class CallNew final : public Expression {
|
||||
|
||||
bool IsMonomorphic() const { return IsMonomorphicField::decode(bit_field_); }
|
||||
Handle<JSFunction> target() const { return target_; }
|
||||
Handle<AllocationSite> allocation_site() const {
|
||||
return allocation_site_;
|
||||
}
|
||||
|
||||
void set_allocation_site(Handle<AllocationSite> site) {
|
||||
allocation_site_ = site;
|
||||
}
|
||||
void set_is_monomorphic(bool monomorphic) {
|
||||
bit_field_ = IsMonomorphicField::update(bit_field_, monomorphic);
|
||||
}
|
||||
@ -1863,7 +1851,6 @@ class CallNew final : public Expression {
|
||||
Expression* expression_;
|
||||
ZoneList<Expression*>* arguments_;
|
||||
Handle<JSFunction> target_;
|
||||
Handle<AllocationSite> allocation_site_;
|
||||
|
||||
class IsMonomorphicField
|
||||
: public BitField<bool, Expression::kNextBitFieldIndex, 1> {};
|
||||
@ -1943,10 +1930,6 @@ class BinaryOperation final : public Expression {
|
||||
void set_left(Expression* e) { left_ = e; }
|
||||
Expression* right() const { return right_; }
|
||||
void set_right(Expression* e) { right_ = e; }
|
||||
Handle<AllocationSite> allocation_site() const { return allocation_site_; }
|
||||
void set_allocation_site(Handle<AllocationSite> allocation_site) {
|
||||
allocation_site_ = allocation_site;
|
||||
}
|
||||
|
||||
void MarkTail() {
|
||||
switch (op()) {
|
||||
@ -1968,23 +1951,11 @@ class BinaryOperation final : public Expression {
|
||||
// sub-expression in |subexpr| and the literal Smi in |literal|.
|
||||
bool IsSmiLiteralOperation(Expression** subexpr, Smi** literal);
|
||||
|
||||
Maybe<int> fixed_right_arg() const {
|
||||
return has_fixed_right_arg_ ? Just(fixed_right_arg_value_) : Nothing<int>();
|
||||
}
|
||||
void set_fixed_right_arg(Maybe<int> arg) {
|
||||
has_fixed_right_arg_ = arg.IsJust();
|
||||
if (arg.IsJust()) fixed_right_arg_value_ = arg.FromJust();
|
||||
}
|
||||
|
||||
private:
|
||||
friend class AstNodeFactory;
|
||||
|
||||
BinaryOperation(Token::Value op, Expression* left, Expression* right, int pos)
|
||||
: Expression(pos, kBinaryOperation),
|
||||
left_(left),
|
||||
right_(right),
|
||||
has_fixed_right_arg_(false),
|
||||
fixed_right_arg_value_(0) {
|
||||
: Expression(pos, kBinaryOperation), left_(left), right_(right) {
|
||||
bit_field_ |= OperatorField::encode(op);
|
||||
DCHECK(Token::IsBinaryOp(op));
|
||||
}
|
||||
@ -1992,11 +1963,6 @@ class BinaryOperation final : public Expression {
|
||||
FeedbackSlot feedback_slot_;
|
||||
Expression* left_;
|
||||
Expression* right_;
|
||||
Handle<AllocationSite> allocation_site_;
|
||||
// TODO(rossberg): the fixed arg should probably be represented as a Constant
|
||||
// type for the RHS. Currenty it's actually a Maybe<int>
|
||||
bool has_fixed_right_arg_;
|
||||
int fixed_right_arg_value_;
|
||||
|
||||
class OperatorField
|
||||
: public BitField<Token::Value, Expression::kNextBitFieldIndex, 7> {};
|
||||
|
Loading…
Reference in New Issue
Block a user