Lines Matching refs:expr
232 ExpressionStatement* expr = in VisitBlock() local
234 if (expr != nullptr) { in VisitBlock()
235 if (expr->expression()->IsAssignment()) { in VisitBlock()
236 RECURSE(VisitExpressionStatement(expr)); in VisitBlock()
272 void VisitForEffect(Expression* expr) { in VisitForEffect() argument
273 if (expr->IsAssignment()) { in VisitForEffect()
275 VisitAssignment(expr->AsAssignment(), kDrop); in VisitForEffect()
278 if (expr->IsCall()) { in VisitForEffect()
280 if (VisitCallExpression(expr->AsCall()) && scope_ == kFuncScope) { in VisitForEffect()
285 if (expr->IsBinaryOperation()) { in VisitForEffect()
286 BinaryOperation* binop = expr->AsBinaryOperation(); in VisitForEffect()
293 RECURSE(Visit(expr)); in VisitForEffect()
301 void VisitGetIterator(GetIterator* expr) { UNREACHABLE(); } in VisitGetIterator() argument
543 void VisitFunctionLiteral(FunctionLiteral* expr) { in VisitFunctionLiteral() argument
544 DeclarationScope* scope = expr->scope(); in VisitFunctionLiteral()
546 if (auto* func_type = typer_->TypeOf(expr)->AsFunctionType()) { in VisitFunctionLiteral()
549 for (int i = 0; i < expr->parameter_count(); ++i) { in VisitFunctionLiteral()
560 RECURSE(VisitStatements(expr->body())); in VisitFunctionLiteral()
567 void VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { in VisitNativeFunctionLiteral() argument
571 void VisitConditional(Conditional* expr) { in VisitConditional() argument
573 RECURSE(Visit(expr->condition())); in VisitConditional()
577 switch (TypeOf(expr)) { in VisitConditional()
594 RECURSE(Visit(expr->then_expression())); in VisitConditional()
596 RECURSE(Visit(expr->else_expression())); in VisitConditional()
653 void VisitVariableProxy(VariableProxy* expr) { in VisitVariableProxy() argument
655 Variable* var = expr->var(); in VisitVariableProxy()
659 ValueType var_type = TypeOf(expr); in VisitVariableProxy()
669 Variable* var = expr->var(); in VisitVariableProxy()
676 void VisitLiteral(Literal* expr) { in VisitLiteral() argument
677 Handle<Object> value = expr->value(); in VisitLiteral()
678 if (!(value->IsNumber() || expr->raw_value()->IsTrue() || in VisitLiteral()
679 expr->raw_value()->IsFalse()) || in VisitLiteral()
683 AsmType* type = typer_->TypeOf(expr); in VisitLiteral()
697 if (expr->raw_value()->IsTrue()) { in VisitLiteral()
700 } else if (expr->raw_value()->IsFalse()) { in VisitLiteral()
703 } else if (expr->raw_value()->IsNumber()) { in VisitLiteral()
715 double val = expr->raw_value()->AsNumber(); in VisitLiteral()
722 double val = expr->raw_value()->AsNumber(); in VisitLiteral()
731 void VisitRegExpLiteral(RegExpLiteral* expr) { UNREACHABLE(); } in VisitRegExpLiteral() argument
733 void VisitObjectLiteral(ObjectLiteral* expr) { in VisitObjectLiteral() argument
734 ZoneList<ObjectLiteralProperty*>* props = expr->properties(); in VisitObjectLiteral()
738 VariableProxy* expr = prop->value()->AsVariableProxy(); in VisitObjectLiteral() local
739 DCHECK_NOT_NULL(expr); in VisitObjectLiteral()
740 Variable* var = expr->var(); in VisitObjectLiteral()
755 void VisitArrayLiteral(ArrayLiteral* expr) { UNREACHABLE(); } in VisitArrayLiteral() argument
947 void EmitAssignment(Assignment* expr, AsmType* type, ValueFate fate) { in EmitAssignment() argument
949 VariableProxy* target_var = expr->target()->AsVariableProxy(); in EmitAssignment()
953 ValueType var_type = TypeOf(expr); in EmitAssignment()
972 Property* target_prop = expr->target()->AsProperty(); in EmitAssignment()
975 if (TypeOf(expr->value()) == kWasmF64 && expr->target()->IsProperty() && in EmitAssignment()
976 typer_->TypeOf(expr->target()->AsProperty()->obj()) in EmitAssignment()
1013 void VisitAssignment(Assignment* expr) { in VisitAssignment() argument
1014 VisitAssignment(expr, kLeaveOnStack); in VisitAssignment()
1017 void VisitAssignment(Assignment* expr, ValueFate fate) { in VisitAssignment() argument
1022 if (expr->target()->IsVariableProxy() && in VisitAssignment()
1023 expr->target()->AsVariableProxy()->var()->is_sloppy_function_name()) { in VisitAssignment()
1026 Property* prop = expr->value()->AsProperty(); in VisitAssignment()
1031 VariableProxy* target = expr->target()->AsVariableProxy(); in VisitAssignment()
1043 ArrayLiteral* funcs = expr->value()->AsArrayLiteral(); in VisitAssignment()
1045 VariableProxy* target = expr->target()->AsVariableProxy(); in VisitAssignment()
1051 if (expr->value()->IsCallNew()) { in VisitAssignment()
1061 EmitAssignmentLhs(expr->target(), &atype); in VisitAssignment()
1062 EmitAssignmentRhs(expr->target(), expr->value(), &is_nop); in VisitAssignment()
1064 EmitAssignment(expr, atype, fate); in VisitAssignment()
1069 void VisitYield(Yield* expr) { UNREACHABLE(); } in VisitYield() argument
1071 void VisitThrow(Throw* expr) { UNREACHABLE(); } in VisitThrow() argument
1073 void VisitForeignVariable(bool is_float, Variable* var, Property* expr) { in VisitForeignVariable() argument
1074 DCHECK(expr->obj()->AsVariableProxy()); in VisitForeignVariable()
1076 expr->obj()->AsVariableProxy()->var()->location()); in VisitForeignVariable()
1077 DCHECK_EQ(1, expr->obj()->AsVariableProxy()->var()->index()); in VisitForeignVariable()
1078 Literal* key_literal = expr->key()->AsLiteral(); in VisitForeignVariable()
1088 void VisitPropertyAndEmitIndex(Property* expr, AsmType** atype) { in VisitPropertyAndEmitIndex() argument
1089 Expression* obj = expr->obj(); in VisitPropertyAndEmitIndex()
1097 RECURSE(Visit(expr->key())); in VisitPropertyAndEmitIndex()
1101 Literal* value = expr->key()->AsLiteral(); in VisitPropertyAndEmitIndex()
1110 BinaryOperation* binop = expr->key()->AsBinaryOperation(); in VisitPropertyAndEmitIndex()
1127 void VisitProperty(Property* expr) { in VisitProperty() argument
1129 VisitPropertyAndEmitIndex(expr, &type); in VisitProperty()
1154 bool VisitStdlibFunction(Call* call, VariableProxy* expr) { in VisitStdlibFunction() argument
1155 Variable* var = expr->var(); in VisitStdlibFunction()
1414 void VisitCallArgs(Call* expr) { in VisitCallArgs() argument
1415 ZoneList<Expression*>* args = expr->arguments(); in VisitCallArgs()
1422 void VisitCall(Call* expr) { VisitCallExpression(expr); } in VisitCall() argument
1424 bool VisitCallExpression(Call* expr) { in VisitCallExpression() argument
1425 Call::CallType call_type = expr->GetCallType(); in VisitCallExpression()
1433 VariableProxy* proxy = expr->expression()->AsVariableProxy(); in VisitCallExpression()
1438 if (VisitStdlibFunction(expr, proxy)) { in VisitCallExpression()
1443 VariableProxy* vp = expr->expression()->AsVariableProxy(); in VisitCallExpression()
1446 ValueType return_type = TypeOf(expr); in VisitCallExpression()
1447 ZoneList<Expression*>* args = expr->arguments(); in VisitCallExpression()
1460 VisitCallArgs(expr); in VisitCallExpression()
1463 DCHECK_IMPLIES(returns_value, parent_binop->left() == expr || in VisitCallExpression()
1464 parent_binop->right() == expr); in VisitCallExpression()
1465 int pos = expr->position(); in VisitCallExpression()
1472 VisitCallArgs(expr); in VisitCallExpression()
1473 current_function_builder_->AddAsmWasmOffset(expr->position(), in VisitCallExpression()
1474 expr->position()); in VisitCallExpression()
1484 Property* p = expr->expression()->AsProperty(); in VisitCallExpression()
1497 VisitCallArgs(expr); in VisitCallExpression()
1500 current_function_builder_->AddAsmWasmOffset(expr->position(), in VisitCallExpression()
1501 expr->position()); in VisitCallExpression()
1516 void VisitCallNew(CallNew* expr) { UNREACHABLE(); } in VisitCallNew() argument
1518 void VisitCallRuntime(CallRuntime* expr) { UNREACHABLE(); } in VisitCallRuntime() argument
1520 void VisitUnaryOperation(UnaryOperation* expr) { in VisitUnaryOperation() argument
1521 RECURSE(Visit(expr->expression())); in VisitUnaryOperation()
1522 switch (expr->op()) { in VisitUnaryOperation()
1524 DCHECK_EQ(kWasmI32, TypeOf(expr->expression())); in VisitUnaryOperation()
1533 void VisitCountOperation(CountOperation* expr) { UNREACHABLE(); } in VisitCountOperation() argument
1535 bool MatchIntBinaryOperation(BinaryOperation* expr, Token::Value op, in MatchIntBinaryOperation() argument
1537 DCHECK_NOT_NULL(expr->right()); in MatchIntBinaryOperation()
1538 if (expr->op() == op && expr->right()->IsLiteral() && in MatchIntBinaryOperation()
1539 TypeOf(expr) == kWasmI32) { in MatchIntBinaryOperation()
1540 Literal* right = expr->right()->AsLiteral(); in MatchIntBinaryOperation()
1549 bool MatchDoubleBinaryOperation(BinaryOperation* expr, Token::Value op, in MatchDoubleBinaryOperation() argument
1551 DCHECK_NOT_NULL(expr->right()); in MatchDoubleBinaryOperation()
1552 if (expr->op() == op && expr->right()->IsLiteral() && in MatchDoubleBinaryOperation()
1553 TypeOf(expr) == kWasmF64) { in MatchDoubleBinaryOperation()
1554 Literal* right = expr->right()->AsLiteral(); in MatchDoubleBinaryOperation()
1565 ConvertOperation MatchOr(BinaryOperation* expr) { in MatchOr() argument
1566 if (MatchIntBinaryOperation(expr, Token::BIT_OR, 0) && in MatchOr()
1567 (TypeOf(expr->left()) == kWasmI32)) { in MatchOr()
1574 ConvertOperation MatchShr(BinaryOperation* expr) { in MatchShr() argument
1575 if (MatchIntBinaryOperation(expr, Token::SHR, 0)) { in MatchShr()
1577 return (TypeOf(expr->left()) == kWasmI32) ? kAsIs : kToInt; in MatchShr()
1583 ConvertOperation MatchXor(BinaryOperation* expr) { in MatchXor() argument
1584 if (MatchIntBinaryOperation(expr, Token::BIT_XOR, 0xffffffff)) { in MatchXor()
1585 DCHECK_EQ(kWasmI32, TypeOf(expr->left())); in MatchXor()
1586 DCHECK_EQ(kWasmI32, TypeOf(expr->right())); in MatchXor()
1587 BinaryOperation* op = expr->left()->AsBinaryOperation(); in MatchXor()
1602 ConvertOperation MatchMul(BinaryOperation* expr) { in MatchMul() argument
1603 if (MatchDoubleBinaryOperation(expr, Token::MUL, 1.0)) { in MatchMul()
1604 DCHECK_EQ(kWasmF64, TypeOf(expr->right())); in MatchMul()
1605 if (TypeOf(expr->left()) != kWasmF64) { in MatchMul()
1615 ConvertOperation MatchBinaryOperation(BinaryOperation* expr) { in MatchBinaryOperation() argument
1616 switch (expr->op()) { in MatchBinaryOperation()
1618 return MatchOr(expr); in MatchBinaryOperation()
1620 return MatchShr(expr); in MatchBinaryOperation()
1622 return MatchXor(expr); in MatchBinaryOperation()
1624 return MatchMul(expr); in MatchBinaryOperation()
1657 int type = TypeIndexOf(expr->left(), expr->right(), ignore_sign); \
1662 Expression* GetLeft(BinaryOperation* expr) { in GetLeft() argument
1663 if (expr->op() == Token::BIT_XOR) { in GetLeft()
1664 return expr->left()->AsBinaryOperation()->left(); in GetLeft()
1666 return expr->left(); in GetLeft()
1670 void VisitBinaryOperation(BinaryOperation* expr) { in VisitBinaryOperation() argument
1671 ConvertOperation convertOperation = MatchBinaryOperation(expr); in VisitBinaryOperation()
1673 parent_binop_ = expr; in VisitBinaryOperation()
1675 RECURSE(Visit(expr->left())); in VisitBinaryOperation()
1676 TypeIndex type = TypeIndexOf(expr->left(), kDontIgnoreSign); in VisitBinaryOperation()
1687 RECURSE(Visit(GetLeft(expr))); in VisitBinaryOperation()
1688 TypeIndex type = TypeIndexOf(GetLeft(expr), kDontIgnoreSign); in VisitBinaryOperation()
1697 RECURSE(Visit(GetLeft(expr))); in VisitBinaryOperation()
1699 if (expr->op() == Token::COMMA) { in VisitBinaryOperation()
1700 RECURSE(VisitForEffect(expr->left())); in VisitBinaryOperation()
1701 RECURSE(Visit(expr->right())); in VisitBinaryOperation()
1704 RECURSE(Visit(expr->left())); in VisitBinaryOperation()
1705 RECURSE(Visit(expr->right())); in VisitBinaryOperation()
1707 switch (expr->op()) { in VisitBinaryOperation()
1720 int type = TypeIndexOf(expr->left(), expr->right(), false); in VisitBinaryOperation()
1725 TypeIndex type = TypeIndexOf(expr->left(), expr->right(), false); in VisitBinaryOperation()
1747 void VisitCompareOperation(CompareOperation* expr) { in VisitCompareOperation() argument
1748 RECURSE(Visit(expr->left())); in VisitCompareOperation()
1749 RECURSE(Visit(expr->right())); in VisitCompareOperation()
1750 switch (expr->op()) { in VisitCompareOperation()
1793 TypeIndex TypeIndexOf(Expression* expr, bool ignore_sign) { in TypeIndexOf() argument
1794 AsmType* type = typer_->TypeOf(expr); in TypeIndexOf()
1831 void VisitThisFunction(ThisFunction* expr) { UNREACHABLE(); } in VisitThisFunction() argument
1842 void VisitClassLiteral(ClassLiteral* expr) { UNREACHABLE(); } in VisitClassLiteral() argument
1844 void VisitSpread(Spread* expr) { UNREACHABLE(); } in VisitSpread() argument
1846 void VisitSuperPropertyReference(SuperPropertyReference* expr) { in VisitSuperPropertyReference() argument
1850 void VisitSuperCallReference(SuperCallReference* expr) { UNREACHABLE(); } in VisitSuperCallReference() argument
1852 void VisitSloppyBlockFunctionStatement(SloppyBlockFunctionStatement* expr) { in VisitSloppyBlockFunctionStatement() argument
1856 void VisitDoExpression(DoExpression* expr) { UNREACHABLE(); } in VisitDoExpression() argument
1858 void VisitRewritableExpression(RewritableExpression* expr) { UNREACHABLE(); } in VisitRewritableExpression() argument
1937 ValueType TypeOf(Expression* expr) { return TypeFrom(typer_->TypeOf(expr)); } in TypeOf() argument