Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 942513002: Put the type feedback vector in the unoptimized JavaScript frame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ia32 lithium fix. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 if (info()->is_osr()) { 832 if (info()->is_osr()) {
833 // TurboFan OSR-compiled functions cannot be entered directly. 833 // TurboFan OSR-compiled functions cannot be entered directly.
834 __ Abort(kShouldNotDirectlyEnterOsrFunction); 834 __ Abort(kShouldNotDirectlyEnterOsrFunction);
835 835
836 // Unoptimized code jumps directly to this entrypoint while the unoptimized 836 // Unoptimized code jumps directly to this entrypoint while the unoptimized
837 // frame is still on the stack. Optimized code uses OSR values directly from 837 // frame is still on the stack. Optimized code uses OSR values directly from
838 // the unoptimized frame. Thus, all that needs to be done is to allocate the 838 // the unoptimized frame. Thus, all that needs to be done is to allocate the
839 // remaining stack slots. 839 // remaining stack slots.
840 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --"); 840 if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --");
841 osr_pc_offset_ = __ pc_offset(); 841 osr_pc_offset_ = __ pc_offset();
842 DCHECK(stack_slots >= frame()->GetOsrStackSlotCount()); 842 int osr_stack_slot_count = frame()->GetOsrStackSlotCount();
843 stack_slots -= frame()->GetOsrStackSlotCount(); 843 DCHECK(stack_slots >= osr_stack_slot_count);
844 stack_slots -= osr_stack_slot_count;
845
846 // Full-code javascript functions have a type feedback vector in the frame.
847 // Shift any locals down one slot, and adjust the stack pointer.
848 __ OSRDropVectorFromStack(osr_stack_slot_count, r2, r0);
844 } 849 }
845 850
846 if (stack_slots > 0) { 851 if (stack_slots > 0) {
847 __ sub(sp, sp, Operand(stack_slots * kPointerSize)); 852 __ sub(sp, sp, Operand(stack_slots * kPointerSize));
848 } 853 }
849 } 854 }
850 855
851 856
852 void CodeGenerator::AssembleReturn() { 857 void CodeGenerator::AssembleReturn() {
853 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); 858 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 } 1078 }
1074 } 1079 }
1075 MarkLazyDeoptSite(); 1080 MarkLazyDeoptSite();
1076 } 1081 }
1077 1082
1078 #undef __ 1083 #undef __
1079 1084
1080 } // namespace compiler 1085 } // namespace compiler
1081 } // namespace internal 1086 } // namespace internal
1082 } // namespace v8 1087 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698