| 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 #include "src/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
| 7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
| 8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
| 9 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
| 10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 __ Pop(ra, fp); | 1221 __ Pop(ra, fp); |
| 1222 __ Ret(); | 1222 __ Ret(); |
| 1223 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { | 1223 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
| 1224 // Canonicalize JSFunction return sites for now. | 1224 // Canonicalize JSFunction return sites for now. |
| 1225 if (return_label_.is_bound()) { | 1225 if (return_label_.is_bound()) { |
| 1226 __ Branch(&return_label_); | 1226 __ Branch(&return_label_); |
| 1227 } else { | 1227 } else { |
| 1228 __ bind(&return_label_); | 1228 __ bind(&return_label_); |
| 1229 __ mov(sp, fp); | 1229 __ mov(sp, fp); |
| 1230 __ Pop(ra, fp); | 1230 __ Pop(ra, fp); |
| 1231 int pop_count = descriptor->IsJSFunctionCall() | 1231 int pop_count = static_cast<int>(descriptor->StackParameterCount()); |
| 1232 ? static_cast<int>(descriptor->JSParameterCount()) | |
| 1233 : (info()->IsStub() | |
| 1234 ? info()->code_stub()->GetStackParameterCount() | |
| 1235 : 0); | |
| 1236 if (pop_count != 0) { | 1232 if (pop_count != 0) { |
| 1237 __ DropAndRet(pop_count); | 1233 __ DropAndRet(pop_count); |
| 1238 } else { | 1234 } else { |
| 1239 __ Ret(); | 1235 __ Ret(); |
| 1240 } | 1236 } |
| 1241 } | 1237 } |
| 1242 } else { | 1238 } else { |
| 1243 __ Ret(); | 1239 __ Ret(); |
| 1244 } | 1240 } |
| 1245 } | 1241 } |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1449 } | 1445 } |
| 1450 } | 1446 } |
| 1451 } | 1447 } |
| 1452 } | 1448 } |
| 1453 | 1449 |
| 1454 #undef __ | 1450 #undef __ |
| 1455 | 1451 |
| 1456 } // namespace compiler | 1452 } // namespace compiler |
| 1457 } // namespace internal | 1453 } // namespace internal |
| 1458 } // namespace v8 | 1454 } // namespace v8 |
| OLD | NEW |