OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/ia32/assembler-ia32.h" | 10 #include "src/ia32/assembler-ia32.h" |
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 __ ret(0); | 1333 __ ret(0); |
1334 } | 1334 } |
1335 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { | 1335 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
1336 // Canonicalize JSFunction return sites for now. | 1336 // Canonicalize JSFunction return sites for now. |
1337 if (return_label_.is_bound()) { | 1337 if (return_label_.is_bound()) { |
1338 __ jmp(&return_label_); | 1338 __ jmp(&return_label_); |
1339 } else { | 1339 } else { |
1340 __ bind(&return_label_); | 1340 __ bind(&return_label_); |
1341 __ mov(esp, ebp); // Move stack pointer back to frame pointer. | 1341 __ mov(esp, ebp); // Move stack pointer back to frame pointer. |
1342 __ pop(ebp); // Pop caller's frame pointer. | 1342 __ pop(ebp); // Pop caller's frame pointer. |
1343 int pop_count = descriptor->IsJSFunctionCall() | 1343 int pop_count = static_cast<int>(descriptor->StackParameterCount()); |
1344 ? static_cast<int>(descriptor->JSParameterCount()) | |
1345 : (info()->IsStub() | |
1346 ? info()->code_stub()->GetStackParameterCount() | |
1347 : 0); | |
1348 if (pop_count == 0) { | 1344 if (pop_count == 0) { |
1349 __ ret(0); | 1345 __ ret(0); |
1350 } else { | 1346 } else { |
1351 __ Ret(pop_count * kPointerSize, ebx); | 1347 __ Ret(pop_count * kPointerSize, ebx); |
1352 } | 1348 } |
1353 } | 1349 } |
1354 } else { | 1350 } else { |
1355 __ ret(0); | 1351 __ ret(0); |
1356 } | 1352 } |
1357 } | 1353 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1542 __ Nop(padding_size); | 1538 __ Nop(padding_size); |
1543 } | 1539 } |
1544 } | 1540 } |
1545 } | 1541 } |
1546 | 1542 |
1547 #undef __ | 1543 #undef __ |
1548 | 1544 |
1549 } // namespace compiler | 1545 } // namespace compiler |
1550 } // namespace internal | 1546 } // namespace internal |
1551 } // namespace v8 | 1547 } // namespace v8 |
OLD | NEW |