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

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

Issue 679793003: [turbofan] reduce allocations outside of pipeline (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 // Save callee-saved registers. 675 // Save callee-saved registers.
676 int register_save_area_size = saved_pp ? kPointerSize : 0; 676 int register_save_area_size = saved_pp ? kPointerSize : 0;
677 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { 677 for (int i = Register::kNumRegisters - 1; i >= 0; i--) {
678 if (!((1 << i) & saves)) continue; 678 if (!((1 << i) & saves)) continue;
679 register_save_area_size += kPointerSize; 679 register_save_area_size += kPointerSize;
680 } 680 }
681 frame()->SetRegisterSaveAreaSize(register_save_area_size); 681 frame()->SetRegisterSaveAreaSize(register_save_area_size);
682 __ stm(db_w, sp, saves); 682 __ stm(db_w, sp, saves);
683 } 683 }
684 } else if (descriptor->IsJSFunctionCall()) { 684 } else if (descriptor->IsJSFunctionCall()) {
685 CompilationInfo* info = linkage()->info(); 685 CompilationInfo* info = this->info();
686 __ Prologue(info->IsCodePreAgingActive()); 686 __ Prologue(info->IsCodePreAgingActive());
687 frame()->SetRegisterSaveAreaSize( 687 frame()->SetRegisterSaveAreaSize(
688 StandardFrameConstants::kFixedFrameSizeFromFp); 688 StandardFrameConstants::kFixedFrameSizeFromFp);
689 689
690 // Sloppy mode functions and builtins need to replace the receiver with the 690 // Sloppy mode functions and builtins need to replace the receiver with the
691 // global proxy when called as functions (without an explicit receiver 691 // global proxy when called as functions (without an explicit receiver
692 // object). 692 // object).
693 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC? 693 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC?
694 if (info->strict_mode() == SLOPPY && !info->is_native()) { 694 if (info->strict_mode() == SLOPPY && !info->is_native()) {
695 Label ok; 695 Label ok;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } 907 }
908 908
909 909
910 void CodeGenerator::AddNopForSmiCodeInlining() { 910 void CodeGenerator::AddNopForSmiCodeInlining() {
911 // On 32-bit ARM we do not insert nops for inlined Smi code. 911 // On 32-bit ARM we do not insert nops for inlined Smi code.
912 } 912 }
913 913
914 914
915 void CodeGenerator::EnsureSpaceForLazyDeopt() { 915 void CodeGenerator::EnsureSpaceForLazyDeopt() {
916 int space_needed = Deoptimizer::patch_size(); 916 int space_needed = Deoptimizer::patch_size();
917 if (!linkage()->info()->IsStub()) { 917 if (!info()->IsStub()) {
918 // Ensure that we have enough space after the previous lazy-bailout 918 // Ensure that we have enough space after the previous lazy-bailout
919 // instruction for patching the code here. 919 // instruction for patching the code here.
920 int current_pc = masm()->pc_offset(); 920 int current_pc = masm()->pc_offset();
921 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 921 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
922 // Block literal pool emission for duration of padding. 922 // Block literal pool emission for duration of padding.
923 v8::internal::Assembler::BlockConstPoolScope block_const_pool(masm()); 923 v8::internal::Assembler::BlockConstPoolScope block_const_pool(masm());
924 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 924 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
925 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); 925 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize);
926 while (padding_size > 0) { 926 while (padding_size > 0) {
927 __ nop(); 927 __ nop();
928 padding_size -= v8::internal::Assembler::kInstrSize; 928 padding_size -= v8::internal::Assembler::kInstrSize;
929 } 929 }
930 } 930 }
931 } 931 }
932 MarkLazyDeoptSite(); 932 MarkLazyDeoptSite();
933 } 933 }
934 934
935 #undef __ 935 #undef __
936 936
937 } // namespace compiler 937 } // namespace compiler
938 } // namespace internal 938 } // namespace internal
939 } // namespace v8 939 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698