| 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/compiler/simplified-lowering.h" | 5 #include "src/compiler/simplified-lowering.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/address-map.h" | 9 #include "src/address-map.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 } | 480 } |
| 481 | 481 |
| 482 default: | 482 default: |
| 483 // Shortcut for operations that we do not handle. | 483 // Shortcut for operations that we do not handle. |
| 484 if (type == nullptr) { | 484 if (type == nullptr) { |
| 485 GetInfo(node)->set_feedback_type(NodeProperties::GetType(node)); | 485 GetInfo(node)->set_feedback_type(NodeProperties::GetType(node)); |
| 486 return true; | 486 return true; |
| 487 } | 487 } |
| 488 return false; | 488 return false; |
| 489 } | 489 } |
| 490 // We need to guarantee that the feedback type is a subtype of the upper |
| 491 // bound. Naively that should hold, but weakening can actually produce |
| 492 // a bigger type if we are unlucky with ordering of phi typing. To be |
| 493 // really sure, just intersect the upper bound with the feedback type. |
| 494 new_type = Type::Intersect(GetUpperBound(node), new_type, graph_zone()); |
| 495 |
| 490 if (type != nullptr && new_type->Is(type)) return false; | 496 if (type != nullptr && new_type->Is(type)) return false; |
| 491 GetInfo(node)->set_feedback_type(new_type); | 497 GetInfo(node)->set_feedback_type(new_type); |
| 492 if (FLAG_trace_representation) { | 498 if (FLAG_trace_representation) { |
| 493 PrintNodeFeedbackType(node); | 499 PrintNodeFeedbackType(node); |
| 494 } | 500 } |
| 495 return true; | 501 return true; |
| 496 } | 502 } |
| 497 | 503 |
| 498 void PrintNodeFeedbackType(Node* n) { | 504 void PrintNodeFeedbackType(Node* n) { |
| 499 OFStream os(stdout); | 505 OFStream os(stdout); |
| (...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3373 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3379 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 3374 Operator::kNoProperties); | 3380 Operator::kNoProperties); |
| 3375 to_number_operator_.set(common()->Call(desc)); | 3381 to_number_operator_.set(common()->Call(desc)); |
| 3376 } | 3382 } |
| 3377 return to_number_operator_.get(); | 3383 return to_number_operator_.get(); |
| 3378 } | 3384 } |
| 3379 | 3385 |
| 3380 } // namespace compiler | 3386 } // namespace compiler |
| 3381 } // namespace internal | 3387 } // namespace internal |
| 3382 } // namespace v8 | 3388 } // namespace v8 |
| OLD | NEW |