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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" |
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/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 FrameAccessState* state, | 563 FrameAccessState* state, |
564 int new_slot_above_sp, | 564 int new_slot_above_sp, |
565 bool allow_shrinkage = true) { | 565 bool allow_shrinkage = true) { |
566 int current_sp_offset = state->GetSPToFPSlotCount() + | 566 int current_sp_offset = state->GetSPToFPSlotCount() + |
567 StandardFrameConstants::kFixedSlotCountAboveFp; | 567 StandardFrameConstants::kFixedSlotCountAboveFp; |
568 int stack_slot_delta = new_slot_above_sp - current_sp_offset; | 568 int stack_slot_delta = new_slot_above_sp - current_sp_offset; |
569 if (stack_slot_delta > 0) { | 569 if (stack_slot_delta > 0) { |
570 masm->Dsubu(sp, sp, stack_slot_delta * kPointerSize); | 570 masm->Dsubu(sp, sp, stack_slot_delta * kPointerSize); |
571 state->IncreaseSPDelta(stack_slot_delta); | 571 state->IncreaseSPDelta(stack_slot_delta); |
572 } else if (allow_shrinkage && stack_slot_delta < 0) { | 572 } else if (allow_shrinkage && stack_slot_delta < 0) { |
573 masm->Daddu(sp, sp, stack_slot_delta * kPointerSize); | 573 masm->Daddu(sp, sp, -stack_slot_delta * kPointerSize); |
574 state->IncreaseSPDelta(stack_slot_delta); | 574 state->IncreaseSPDelta(stack_slot_delta); |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 } // namespace | 578 } // namespace |
579 | 579 |
580 void CodeGenerator::AssembleTailCallBeforeGap(Instruction* instr, | 580 void CodeGenerator::AssembleTailCallBeforeGap(Instruction* instr, |
581 int first_unused_stack_slot) { | 581 int first_unused_stack_slot) { |
582 AdjustStackPointerForTailCall(masm(), frame_access_state(), | 582 AdjustStackPointerForTailCall(masm(), frame_access_state(), |
583 first_unused_stack_slot, false); | 583 first_unused_stack_slot, false); |
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 padding_size -= v8::internal::Assembler::kInstrSize; | 2372 padding_size -= v8::internal::Assembler::kInstrSize; |
2373 } | 2373 } |
2374 } | 2374 } |
2375 } | 2375 } |
2376 | 2376 |
2377 #undef __ | 2377 #undef __ |
2378 | 2378 |
2379 } // namespace compiler | 2379 } // namespace compiler |
2380 } // namespace internal | 2380 } // namespace internal |
2381 } // namespace v8 | 2381 } // namespace v8 |
OLD | NEW |