| 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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 } | 1017 } |
| 1018 // Restore registers. | 1018 // Restore registers. |
| 1019 const RegList saves = descriptor->CalleeSavedRegisters(); | 1019 const RegList saves = descriptor->CalleeSavedRegisters(); |
| 1020 if (saves != 0) { | 1020 if (saves != 0) { |
| 1021 __ ldm(ia_w, sp, saves); | 1021 __ ldm(ia_w, sp, saves); |
| 1022 } | 1022 } |
| 1023 } | 1023 } |
| 1024 __ LeaveFrame(StackFrame::MANUAL); | 1024 __ LeaveFrame(StackFrame::MANUAL); |
| 1025 __ Ret(); | 1025 __ Ret(); |
| 1026 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { | 1026 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
| 1027 __ LeaveFrame(StackFrame::MANUAL); | 1027 // Canonicalize JSFunction return sites for now. |
| 1028 int pop_count = descriptor->IsJSFunctionCall() | 1028 if (return_label_.is_bound()) { |
| 1029 ? static_cast<int>(descriptor->JSParameterCount()) | 1029 __ b(&return_label_); |
| 1030 : 0; | 1030 } else { |
| 1031 __ Drop(pop_count); | 1031 __ bind(&return_label_); |
| 1032 __ Ret(); | 1032 __ LeaveFrame(StackFrame::MANUAL); |
| 1033 int pop_count = descriptor->IsJSFunctionCall() |
| 1034 ? static_cast<int>(descriptor->JSParameterCount()) |
| 1035 : 0; |
| 1036 __ Drop(pop_count); |
| 1037 __ Ret(); |
| 1038 } |
| 1033 } else { | 1039 } else { |
| 1034 __ Ret(); | 1040 __ Ret(); |
| 1035 } | 1041 } |
| 1036 } | 1042 } |
| 1037 | 1043 |
| 1038 | 1044 |
| 1039 void CodeGenerator::AssembleMove(InstructionOperand* source, | 1045 void CodeGenerator::AssembleMove(InstructionOperand* source, |
| 1040 InstructionOperand* destination) { | 1046 InstructionOperand* destination) { |
| 1041 ArmOperandConverter g(this, NULL); | 1047 ArmOperandConverter g(this, NULL); |
| 1042 // Dispatch on the source and destination operand kinds. Not all | 1048 // Dispatch on the source and destination operand kinds. Not all |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 } | 1245 } |
| 1240 } | 1246 } |
| 1241 } | 1247 } |
| 1242 } | 1248 } |
| 1243 | 1249 |
| 1244 #undef __ | 1250 #undef __ |
| 1245 | 1251 |
| 1246 } // namespace compiler | 1252 } // namespace compiler |
| 1247 } // namespace internal | 1253 } // namespace internal |
| 1248 } // namespace v8 | 1254 } // namespace v8 |
| OLD | NEW |