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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 __ Pop(ra, fp); | 1145 __ Pop(ra, fp); |
1146 __ Ret(); | 1146 __ Ret(); |
1147 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { | 1147 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
1148 // Canonicalize JSFunction return sites for now. | 1148 // Canonicalize JSFunction return sites for now. |
1149 if (return_label_.is_bound()) { | 1149 if (return_label_.is_bound()) { |
1150 __ Branch(&return_label_); | 1150 __ Branch(&return_label_); |
1151 } else { | 1151 } else { |
1152 __ bind(&return_label_); | 1152 __ bind(&return_label_); |
1153 __ mov(sp, fp); | 1153 __ mov(sp, fp); |
1154 __ Pop(ra, fp); | 1154 __ Pop(ra, fp); |
1155 int pop_count = descriptor->IsJSFunctionCall() | 1155 int pop_count = static_cast<int>(descriptor->StackParameterCount()); |
1156 ? static_cast<int>(descriptor->JSParameterCount()) | |
1157 : (info()->IsStub() | |
1158 ? info()->code_stub()->GetStackParameterCount() | |
1159 : 0); | |
1160 if (pop_count != 0) { | 1156 if (pop_count != 0) { |
1161 __ DropAndRet(pop_count); | 1157 __ DropAndRet(pop_count); |
1162 } else { | 1158 } else { |
1163 __ Ret(); | 1159 __ Ret(); |
1164 } | 1160 } |
1165 } | 1161 } |
1166 } else { | 1162 } else { |
1167 __ Ret(); | 1163 __ Ret(); |
1168 } | 1164 } |
1169 } | 1165 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 } | 1369 } |
1374 } | 1370 } |
1375 } | 1371 } |
1376 } | 1372 } |
1377 | 1373 |
1378 #undef __ | 1374 #undef __ |
1379 | 1375 |
1380 } // namespace compiler | 1376 } // namespace compiler |
1381 } // namespace internal | 1377 } // namespace internal |
1382 } // namespace v8 | 1378 } // namespace v8 |
OLD | NEW |