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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 jsgraph()->simplified()->CheckNonEmptyString(), input, effect, control); | 267 jsgraph()->simplified()->CheckNonEmptyString(), input, effect, control); |
268 return Reduction(node); | 268 return Reduction(node); |
269 } else if (hint == BinaryOperationHint::kString) { | 269 } else if (hint == BinaryOperationHint::kString) { |
270 Node* node = jsgraph()->graph()->NewNode( | 270 Node* node = jsgraph()->graph()->NewNode( |
271 jsgraph()->simplified()->CheckString(), input, effect, control); | 271 jsgraph()->simplified()->CheckString(), input, effect, control); |
272 return Reduction(node); | 272 return Reduction(node); |
273 } | 273 } |
274 return Reduction(); | 274 return Reduction(); |
275 } | 275 } |
276 | 276 |
| 277 Reduction JSTypeHintLowering::ReduceCallOperation(const Operator* op, |
| 278 Node* const* args, |
| 279 int arg_count, Node* effect, |
| 280 Node* control, |
| 281 FeedbackSlot slot) const { |
| 282 DCHECK_EQ(IrOpcode::kJSCall, op->opcode()); |
| 283 DCHECK(!slot.IsInvalid()); |
| 284 CallICNexus nexus(feedback_vector(), slot); |
| 285 if (Node* node = TryBuildSoftDeopt( |
| 286 nexus, effect, control, |
| 287 DeoptimizeReason::kInsufficientTypeFeedbackForCall)) { |
| 288 return Reduction(node); |
| 289 } |
| 290 return Reduction(); |
| 291 } |
| 292 |
277 Reduction JSTypeHintLowering::ReduceLoadNamedOperation( | 293 Reduction JSTypeHintLowering::ReduceLoadNamedOperation( |
278 const Operator* op, Node* obj, Node* effect, Node* control, | 294 const Operator* op, Node* obj, Node* effect, Node* control, |
279 FeedbackSlot slot) const { | 295 FeedbackSlot slot) const { |
280 DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode()); | 296 DCHECK_EQ(IrOpcode::kJSLoadNamed, op->opcode()); |
281 DCHECK(!slot.IsInvalid()); | 297 DCHECK(!slot.IsInvalid()); |
282 LoadICNexus nexus(feedback_vector(), slot); | 298 LoadICNexus nexus(feedback_vector(), slot); |
283 if (Node* node = TryBuildSoftDeopt( | 299 if (Node* node = TryBuildSoftDeopt( |
284 nexus, effect, control, | 300 nexus, effect, control, |
285 DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess)) { | 301 DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess)) { |
286 return Reduction(node); | 302 return Reduction(node); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize); | 357 Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize); |
342 deoptimize->ReplaceInput(0, frame_state); | 358 deoptimize->ReplaceInput(0, frame_state); |
343 return deoptimize; | 359 return deoptimize; |
344 } | 360 } |
345 return nullptr; | 361 return nullptr; |
346 } | 362 } |
347 | 363 |
348 } // namespace compiler | 364 } // namespace compiler |
349 } // namespace internal | 365 } // namespace internal |
350 } // namespace v8 | 366 } // namespace v8 |
OLD | NEW |