| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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/js-type-hint-lowering.h" | 5 #include "src/compiler/js-type-hint-lowering.h" |
| 6 | 6 |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
| 9 #include "src/compiler/simplified-operator.h" | 9 #include "src/compiler/simplified-operator.h" |
| 10 #include "src/feedback-vector.h" | 10 #include "src/feedback-vector.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 DCHECK(!slot.IsInvalid()); | 283 DCHECK(!slot.IsInvalid()); |
| 284 CallICNexus nexus(feedback_vector(), slot); | 284 CallICNexus nexus(feedback_vector(), slot); |
| 285 if (Node* node = TryBuildSoftDeopt( | 285 if (Node* node = TryBuildSoftDeopt( |
| 286 nexus, effect, control, | 286 nexus, effect, control, |
| 287 DeoptimizeReason::kInsufficientTypeFeedbackForCall)) { | 287 DeoptimizeReason::kInsufficientTypeFeedbackForCall)) { |
| 288 return Reduction(node); | 288 return Reduction(node); |
| 289 } | 289 } |
| 290 return Reduction(); | 290 return Reduction(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 Reduction JSTypeHintLowering::ReduceConstructOperation( |
| 294 const Operator* op, Node* const* args, int arg_count, Node* effect, |
| 295 Node* control, FeedbackSlot slot) const { |
| 296 DCHECK_EQ(IrOpcode::kJSConstruct, op->opcode()); |
| 297 DCHECK(!slot.IsInvalid()); |
| 298 CallICNexus nexus(feedback_vector(), slot); |
| 299 if (Node* node = TryBuildSoftDeopt( |
| 300 nexus, effect, control, |
| 301 DeoptimizeReason::kInsufficientTypeFeedbackForConstruct)) { |
| 302 return Reduction(node); |
| 303 } |
| 304 return Reduction(); |
| 305 } |
| 306 |
| 293 Reduction JSTypeHintLowering::ReduceLoadNamedOperation( | 307 Reduction JSTypeHintLowering::ReduceLoadNamedOperation( |
| 294 const Operator* op, Node* obj, Node* effect, Node* control, | 308 const Operator* op, Node* obj, Node* effect, Node* control, |
| 295 FeedbackSlot slot) const { | 309 FeedbackSlot slot) const { |
| 296 DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode()); | 310 DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode()); |
| 297 DCHECK(!slot.IsInvalid()); | 311 DCHECK(!slot.IsInvalid()); |
| 298 LoadICNexus nexus(feedback_vector(), slot); | 312 LoadICNexus nexus(feedback_vector(), slot); |
| 299 if (Node* node = TryBuildSoftDeopt( | 313 if (Node* node = TryBuildSoftDeopt( |
| 300 nexus, effect, control, | 314 nexus, effect, control, |
| 301 DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess)) { | 315 DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess)) { |
| 302 return Reduction(node); | 316 return Reduction(node); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize); | 371 Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize); |
| 358 deoptimize->ReplaceInput(0, frame_state); | 372 deoptimize->ReplaceInput(0, frame_state); |
| 359 return deoptimize; | 373 return deoptimize; |
| 360 } | 374 } |
| 361 return nullptr; | 375 return nullptr; |
| 362 } | 376 } |
| 363 | 377 |
| 364 } // namespace compiler | 378 } // namespace compiler |
| 365 } // namespace internal | 379 } // namespace internal |
| 366 } // namespace v8 | 380 } // namespace v8 |
| OLD | NEW |