Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/ic/ic-state.cc

Issue 2453633005: [ic] Properly deal with all oddballs when updating BinaryOpIC state. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-659967.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ic/ic-state.h" 5 #include "src/ic/ic-state.h"
6 6
7 #include "src/ic/ic.h" 7 #include "src/ic/ic.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 DCHECK_EQ(Token::ADD, op_); 249 DCHECK_EQ(Token::ADD, op_);
250 right_kind_ = NUMBER; 250 right_kind_ = NUMBER;
251 } else if (right_kind_ == STRING && left_kind_ == INT32) { 251 } else if (right_kind_ == STRING && left_kind_ == INT32) {
252 DCHECK_EQ(STRING, result_kind_); 252 DCHECK_EQ(STRING, result_kind_);
253 DCHECK_EQ(Token::ADD, op_); 253 DCHECK_EQ(Token::ADD, op_);
254 left_kind_ = NUMBER; 254 left_kind_ = NUMBER;
255 } 255 }
256 256
257 if (old_extra_ic_state == GetExtraICState()) { 257 if (old_extra_ic_state == GetExtraICState()) {
258 // Tagged operations can lead to non-truncating HChanges 258 // Tagged operations can lead to non-truncating HChanges
259 if (left->IsUndefined(isolate_) || left->IsBoolean()) { 259 if (left->IsOddball()) {
260 left_kind_ = GENERIC; 260 left_kind_ = GENERIC;
261 } else { 261 } else {
262 DCHECK(right->IsUndefined(isolate_) || right->IsBoolean()); 262 DCHECK(right->IsOddball());
263 right_kind_ = GENERIC; 263 right_kind_ = GENERIC;
264 } 264 }
265 } 265 }
266 } 266 }
267 267
268 268
269 BinaryOpICState::Kind BinaryOpICState::UpdateKind(Handle<Object> object, 269 BinaryOpICState::Kind BinaryOpICState::UpdateKind(Handle<Object> object,
270 Kind kind) const { 270 Kind kind) const {
271 Kind new_kind = GENERIC; 271 Kind new_kind = GENERIC;
272 bool is_truncating = Token::IsTruncatingBinaryOp(op()); 272 bool is_truncating = Token::IsTruncatingBinaryOp(op());
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 case RECEIVER: 505 case RECEIVER:
506 case GENERIC: 506 case GENERIC:
507 return GENERIC; 507 return GENERIC;
508 } 508 }
509 UNREACHABLE(); 509 UNREACHABLE();
510 return GENERIC; // Make the compiler happy. 510 return GENERIC; // Make the compiler happy.
511 } 511 }
512 512
513 } // namespace internal 513 } // namespace internal
514 } // namespace v8 514 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-659967.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698