241 {
242 if (representation == kUnboxedDouble) {
243 switch (token_kind) {
244 case Token::kADD:
246 case Token::kSUB:
248 case Token::kMUL:
250 case Token::kDIV:
252 case Token::kMIN:
253 return fmin(left, right);
254 case Token::kMAX:
255 return fmax(left, right);
256 default:
258 }
259 } else {
260 ASSERT(representation == kUnboxedFloat);
261 switch (token_kind) {
262 case Token::kADD:
263 return static_cast<float>(
left) +
static_cast<float>(right);
264 case Token::kSUB:
265 return static_cast<float>(
left) -
static_cast<float>(right);
266 case Token::kMUL:
267 return static_cast<float>(
left) *
static_cast<float>(right);
268 case Token::kDIV:
270 static_cast<float>(right));
271 case Token::kMIN:
272 return fminf(static_cast<float>(left), static_cast<float>(right));
273 case Token::kMAX:
274 return fmaxf(static_cast<float>(left), static_cast<float>(right));
275 default:
277 }
278 }
279}
static float DivideAllowZero(float a, float b)