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 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 flags, properties); | 1163 flags, properties); |
1164 node->InsertInput(jsgraph_->zone(), 0, | 1164 node->InsertInput(jsgraph_->zone(), 0, |
1165 jsgraph_->HeapConstant(callable.code())); | 1165 jsgraph_->HeapConstant(callable.code())); |
1166 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant()); | 1166 node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant()); |
1167 node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start()); | 1167 node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start()); |
1168 node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start()); | 1168 node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start()); |
1169 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); | 1169 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); |
1170 } | 1170 } |
1171 break; | 1171 break; |
1172 } | 1172 } |
| 1173 case IrOpcode::kStringFromCharCode: { |
| 1174 VisitUnop(node, UseInfo::TruncatingWord32(), |
| 1175 MachineRepresentation::kTagged); |
| 1176 break; |
| 1177 } |
1173 case IrOpcode::kStringToNumber: { | 1178 case IrOpcode::kStringToNumber: { |
1174 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); | 1179 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); |
1175 if (lower()) { | 1180 if (lower()) { |
1176 // StringToNumber(x) => Call(StringToNumberStub, x, no-context) | 1181 // StringToNumber(x) => Call(StringToNumberStub, x, no-context) |
1177 Operator::Properties properties = Operator::kNoThrow; | 1182 Operator::Properties properties = Operator::kNoThrow; |
1178 Callable callable = CodeFactory::StringToNumber(jsgraph_->isolate()); | 1183 Callable callable = CodeFactory::StringToNumber(jsgraph_->isolate()); |
1179 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; | 1184 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; |
1180 CallDescriptor* desc = Linkage::GetStubCallDescriptor( | 1185 CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
1181 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, | 1186 jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0, |
1182 flags, properties); | 1187 flags, properties); |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2466 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 2471 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
2467 Operator::kNoProperties); | 2472 Operator::kNoProperties); |
2468 to_number_operator_.set(common()->Call(desc)); | 2473 to_number_operator_.set(common()->Call(desc)); |
2469 } | 2474 } |
2470 return to_number_operator_.get(); | 2475 return to_number_operator_.get(); |
2471 } | 2476 } |
2472 | 2477 |
2473 } // namespace compiler | 2478 } // namespace compiler |
2474 } // namespace internal | 2479 } // namespace internal |
2475 } // namespace v8 | 2480 } // namespace v8 |
OLD | NEW |