| 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/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/ppc/macro-assembler-ppc.h" | 10 #include "src/ppc/macro-assembler-ppc.h" |
| (...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 if (!((1 << i) & saves)) continue; | 1277 if (!((1 << i) & saves)) continue; |
| 1278 register_save_area_size += kPointerSize; | 1278 register_save_area_size += kPointerSize; |
| 1279 } | 1279 } |
| 1280 frame()->SetRegisterSaveAreaSize(register_save_area_size); | 1280 frame()->SetRegisterSaveAreaSize(register_save_area_size); |
| 1281 __ MultiPush(saves); | 1281 __ MultiPush(saves); |
| 1282 } else if (descriptor->IsJSFunctionCall()) { | 1282 } else if (descriptor->IsJSFunctionCall()) { |
| 1283 CompilationInfo* info = this->info(); | 1283 CompilationInfo* info = this->info(); |
| 1284 __ Prologue(info->IsCodePreAgingActive()); | 1284 __ Prologue(info->IsCodePreAgingActive()); |
| 1285 frame()->SetRegisterSaveAreaSize( | 1285 frame()->SetRegisterSaveAreaSize( |
| 1286 StandardFrameConstants::kFixedFrameSizeFromFp); | 1286 StandardFrameConstants::kFixedFrameSizeFromFp); |
| 1287 } else if (stack_slots > 0) { | 1287 } else if (needs_frame_) { |
| 1288 __ StubPrologue(); | 1288 __ StubPrologue(); |
| 1289 frame()->SetRegisterSaveAreaSize( | 1289 frame()->SetRegisterSaveAreaSize( |
| 1290 StandardFrameConstants::kFixedFrameSizeFromFp); | 1290 StandardFrameConstants::kFixedFrameSizeFromFp); |
| 1291 } | 1291 } |
| 1292 | 1292 |
| 1293 if (info()->is_osr()) { | 1293 if (info()->is_osr()) { |
| 1294 // TurboFan OSR-compiled functions cannot be entered directly. | 1294 // TurboFan OSR-compiled functions cannot be entered directly. |
| 1295 __ Abort(kShouldNotDirectlyEnterOsrFunction); | 1295 __ Abort(kShouldNotDirectlyEnterOsrFunction); |
| 1296 | 1296 |
| 1297 // Unoptimized code jumps directly to this entrypoint while the unoptimized | 1297 // Unoptimized code jumps directly to this entrypoint while the unoptimized |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1323 } | 1323 } |
| 1324 // Restore registers. | 1324 // Restore registers. |
| 1325 RegList frame_saves = fp.bit(); | 1325 RegList frame_saves = fp.bit(); |
| 1326 const RegList saves = descriptor->CalleeSavedRegisters() & ~frame_saves; | 1326 const RegList saves = descriptor->CalleeSavedRegisters() & ~frame_saves; |
| 1327 if (saves != 0) { | 1327 if (saves != 0) { |
| 1328 __ MultiPop(saves); | 1328 __ MultiPop(saves); |
| 1329 } | 1329 } |
| 1330 } | 1330 } |
| 1331 __ LeaveFrame(StackFrame::MANUAL); | 1331 __ LeaveFrame(StackFrame::MANUAL); |
| 1332 __ Ret(); | 1332 __ Ret(); |
| 1333 } else if (descriptor->IsJSFunctionCall() || stack_slots > 0) { | 1333 } else if (descriptor->IsJSFunctionCall() || needs_frame_) { |
| 1334 int pop_count = descriptor->IsJSFunctionCall() | 1334 int pop_count = descriptor->IsJSFunctionCall() |
| 1335 ? static_cast<int>(descriptor->JSParameterCount()) | 1335 ? static_cast<int>(descriptor->JSParameterCount()) |
| 1336 : 0; | 1336 : 0; |
| 1337 __ LeaveFrame(StackFrame::MANUAL, pop_count * kPointerSize); | 1337 __ LeaveFrame(StackFrame::MANUAL, pop_count * kPointerSize); |
| 1338 __ Ret(); | 1338 __ Ret(); |
| 1339 } else { | 1339 } else { |
| 1340 __ Ret(); | 1340 __ Ret(); |
| 1341 } | 1341 } |
| 1342 } | 1342 } |
| 1343 | 1343 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 } | 1541 } |
| 1542 } | 1542 } |
| 1543 MarkLazyDeoptSite(); | 1543 MarkLazyDeoptSite(); |
| 1544 } | 1544 } |
| 1545 | 1545 |
| 1546 #undef __ | 1546 #undef __ |
| 1547 | 1547 |
| 1548 } // namespace compiler | 1548 } // namespace compiler |
| 1549 } // namespace internal | 1549 } // namespace internal |
| 1550 } // namespace v8 | 1550 } // namespace v8 |
| OLD | NEW |