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 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2378 ProcessInput(node, 0, UseInfo::AnyTagged()); // buffer | 2378 ProcessInput(node, 0, UseInfo::AnyTagged()); // buffer |
2379 ProcessInput(node, 1, UseInfo::AnyTagged()); // base pointer | 2379 ProcessInput(node, 1, UseInfo::AnyTagged()); // base pointer |
2380 ProcessInput(node, 2, UseInfo::PointerInt()); // external pointer | 2380 ProcessInput(node, 2, UseInfo::PointerInt()); // external pointer |
2381 ProcessInput(node, 3, UseInfo::TruncatingWord32()); // index | 2381 ProcessInput(node, 3, UseInfo::TruncatingWord32()); // index |
2382 ProcessInput(node, 4, | 2382 ProcessInput(node, 4, |
2383 TruncatingUseInfoFromRepresentation(rep)); // value | 2383 TruncatingUseInfoFromRepresentation(rep)); // value |
2384 ProcessRemainingInputs(node, 5); | 2384 ProcessRemainingInputs(node, 5); |
2385 SetOutput(node, MachineRepresentation::kNone); | 2385 SetOutput(node, MachineRepresentation::kNone); |
2386 return; | 2386 return; |
2387 } | 2387 } |
2388 case IrOpcode::kLoadFunctionPrototype: { | |
2389 if (truncation.IsUnused()) return VisitUnused(node); | |
2390 VisitUnop(node, UseInfo::AnyTagged(), | |
2391 MachineRepresentation::kTaggedPointer); | |
2392 return; | |
2393 } | |
2394 case IrOpcode::kPlainPrimitiveToNumber: { | 2388 case IrOpcode::kPlainPrimitiveToNumber: { |
2395 if (InputIs(node, Type::Boolean())) { | 2389 if (InputIs(node, Type::Boolean())) { |
2396 VisitUnop(node, UseInfo::Bool(), MachineRepresentation::kWord32); | 2390 VisitUnop(node, UseInfo::Bool(), MachineRepresentation::kWord32); |
2397 if (lower()) DeferReplacement(node, node->InputAt(0)); | 2391 if (lower()) DeferReplacement(node, node->InputAt(0)); |
2398 } else if (InputIs(node, Type::String())) { | 2392 } else if (InputIs(node, Type::String())) { |
2399 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); | 2393 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); |
2400 if (lower()) lowering->DoStringToNumber(node); | 2394 if (lower()) lowering->DoStringToNumber(node); |
2401 } else if (truncation.IsUsedAsWord32()) { | 2395 } else if (truncation.IsUsedAsWord32()) { |
2402 if (InputIs(node, Type::NumberOrOddball())) { | 2396 if (InputIs(node, Type::NumberOrOddball())) { |
2403 VisitUnop(node, UseInfo::TruncatingWord32(), | 2397 VisitUnop(node, UseInfo::TruncatingWord32(), |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3412 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 3406 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
3413 Operator::kNoProperties); | 3407 Operator::kNoProperties); |
3414 to_number_operator_.set(common()->Call(desc)); | 3408 to_number_operator_.set(common()->Call(desc)); |
3415 } | 3409 } |
3416 return to_number_operator_.get(); | 3410 return to_number_operator_.get(); |
3417 } | 3411 } |
3418 | 3412 |
3419 } // namespace compiler | 3413 } // namespace compiler |
3420 } // namespace internal | 3414 } // namespace internal |
3421 } // namespace v8 | 3415 } // namespace v8 |
OLD | NEW |