OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |