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

Side by Side Diff: src/compiler/mips/code-generator-mips.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 | « src/compiler/linkage.cc ('k') | src/compiler/pipeline.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 #include "src/compiler/code-generator-impl.h" 6 #include "src/compiler/code-generator-impl.h"
7 #include "src/compiler/gap-resolver.h" 7 #include "src/compiler/gap-resolver.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/mips/macro-assembler-mips.h" 10 #include "src/mips/macro-assembler-mips.h"
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 // TODO(plind): make callee save size const, possibly DCHECK it. 702 // TODO(plind): make callee save size const, possibly DCHECK it.
703 int register_save_area_size = 0; 703 int register_save_area_size = 0;
704 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { 704 for (int i = Register::kNumRegisters - 1; i >= 0; i--) {
705 if (!((1 << i) & saves)) continue; 705 if (!((1 << i) & saves)) continue;
706 register_save_area_size += kPointerSize; 706 register_save_area_size += kPointerSize;
707 } 707 }
708 frame()->SetRegisterSaveAreaSize(register_save_area_size); 708 frame()->SetRegisterSaveAreaSize(register_save_area_size);
709 __ MultiPush(saves); 709 __ MultiPush(saves);
710 } 710 }
711 } else if (descriptor->IsJSFunctionCall()) { 711 } else if (descriptor->IsJSFunctionCall()) {
712 CompilationInfo* info = linkage()->info(); 712 CompilationInfo* info = this->info();
713 __ Prologue(info->IsCodePreAgingActive()); 713 __ Prologue(info->IsCodePreAgingActive());
714 frame()->SetRegisterSaveAreaSize( 714 frame()->SetRegisterSaveAreaSize(
715 StandardFrameConstants::kFixedFrameSizeFromFp); 715 StandardFrameConstants::kFixedFrameSizeFromFp);
716 716
717 // Sloppy mode functions and builtins need to replace the receiver with the 717 // Sloppy mode functions and builtins need to replace the receiver with the
718 // global proxy when called as functions (without an explicit receiver 718 // global proxy when called as functions (without an explicit receiver
719 // object). 719 // object).
720 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC? 720 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC?
721 if (info->strict_mode() == SLOPPY && !info->is_native()) { 721 if (info->strict_mode() == SLOPPY && !info->is_native()) {
722 Label ok; 722 Label ok;
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 935
936 void CodeGenerator::AddNopForSmiCodeInlining() { 936 void CodeGenerator::AddNopForSmiCodeInlining() {
937 // Unused on 32-bit ARM. Still exists on 64-bit arm. 937 // Unused on 32-bit ARM. Still exists on 64-bit arm.
938 // TODO(plind): Unclear when this is called now. Understand, fix if needed. 938 // TODO(plind): Unclear when this is called now. Understand, fix if needed.
939 __ nop(); // Maybe PROPERTY_ACCESS_INLINED? 939 __ nop(); // Maybe PROPERTY_ACCESS_INLINED?
940 } 940 }
941 941
942 942
943 void CodeGenerator::EnsureSpaceForLazyDeopt() { 943 void CodeGenerator::EnsureSpaceForLazyDeopt() {
944 int space_needed = Deoptimizer::patch_size(); 944 int space_needed = Deoptimizer::patch_size();
945 if (!linkage()->info()->IsStub()) { 945 if (!info()->IsStub()) {
946 // Ensure that we have enough space after the previous lazy-bailout 946 // Ensure that we have enough space after the previous lazy-bailout
947 // instruction for patching the code here. 947 // instruction for patching the code here.
948 int current_pc = masm()->pc_offset(); 948 int current_pc = masm()->pc_offset();
949 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 949 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
950 // Block tramoline pool emission for duration of padding. 950 // Block tramoline pool emission for duration of padding.
951 v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( 951 v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool(
952 masm()); 952 masm());
953 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 953 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
954 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); 954 DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize);
955 while (padding_size > 0) { 955 while (padding_size > 0) {
956 __ nop(); 956 __ nop();
957 padding_size -= v8::internal::Assembler::kInstrSize; 957 padding_size -= v8::internal::Assembler::kInstrSize;
958 } 958 }
959 } 959 }
960 } 960 }
961 MarkLazyDeoptSite(); 961 MarkLazyDeoptSite();
962 } 962 }
963 963
964 #undef __ 964 #undef __
965 965
966 } // namespace compiler 966 } // namespace compiler
967 } // namespace internal 967 } // namespace internal
968 } // namespace v8 968 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698