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

Side by Side Diff: src/compiler/x64/code-generator-x64.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/pipeline.cc ('k') | test/cctest/compiler/codegen-tester.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 if (saves != 0) { // Save callee-saved registers. 759 if (saves != 0) { // Save callee-saved registers.
760 int register_save_area_size = 0; 760 int register_save_area_size = 0;
761 for (int i = Register::kNumRegisters - 1; i >= 0; i--) { 761 for (int i = Register::kNumRegisters - 1; i >= 0; i--) {
762 if (!((1 << i) & saves)) continue; 762 if (!((1 << i) & saves)) continue;
763 __ pushq(Register::from_code(i)); 763 __ pushq(Register::from_code(i));
764 register_save_area_size += kPointerSize; 764 register_save_area_size += kPointerSize;
765 } 765 }
766 frame()->SetRegisterSaveAreaSize(register_save_area_size); 766 frame()->SetRegisterSaveAreaSize(register_save_area_size);
767 } 767 }
768 } else if (descriptor->IsJSFunctionCall()) { 768 } else if (descriptor->IsJSFunctionCall()) {
769 CompilationInfo* info = linkage()->info(); 769 CompilationInfo* info = this->info();
770 __ Prologue(info->IsCodePreAgingActive()); 770 __ Prologue(info->IsCodePreAgingActive());
771 frame()->SetRegisterSaveAreaSize( 771 frame()->SetRegisterSaveAreaSize(
772 StandardFrameConstants::kFixedFrameSizeFromFp); 772 StandardFrameConstants::kFixedFrameSizeFromFp);
773 773
774 // Sloppy mode functions and builtins need to replace the receiver with the 774 // Sloppy mode functions and builtins need to replace the receiver with the
775 // global proxy when called as functions (without an explicit receiver 775 // global proxy when called as functions (without an explicit receiver
776 // object). 776 // object).
777 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC? 777 // TODO(mstarzinger/verwaest): Should this be moved back into the CallIC?
778 if (info->strict_mode() == SLOPPY && !info->is_native()) { 778 if (info->strict_mode() == SLOPPY && !info->is_native()) {
779 Label ok; 779 Label ok;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 UNREACHABLE(); 985 UNREACHABLE();
986 } 986 }
987 } 987 }
988 988
989 989
990 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } 990 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); }
991 991
992 992
993 void CodeGenerator::EnsureSpaceForLazyDeopt() { 993 void CodeGenerator::EnsureSpaceForLazyDeopt() {
994 int space_needed = Deoptimizer::patch_size(); 994 int space_needed = Deoptimizer::patch_size();
995 if (!linkage()->info()->IsStub()) { 995 if (!info()->IsStub()) {
996 // Ensure that we have enough space after the previous lazy-bailout 996 // Ensure that we have enough space after the previous lazy-bailout
997 // instruction for patching the code here. 997 // instruction for patching the code here.
998 int current_pc = masm()->pc_offset(); 998 int current_pc = masm()->pc_offset();
999 if (current_pc < last_lazy_deopt_pc_ + space_needed) { 999 if (current_pc < last_lazy_deopt_pc_ + space_needed) {
1000 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1000 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1001 __ Nop(padding_size); 1001 __ Nop(padding_size);
1002 } 1002 }
1003 } 1003 }
1004 MarkLazyDeoptSite(); 1004 MarkLazyDeoptSite();
1005 } 1005 }
1006 1006
1007 #undef __ 1007 #undef __
1008 1008
1009 } // namespace internal 1009 } // namespace internal
1010 } // namespace compiler 1010 } // namespace compiler
1011 } // namespace v8 1011 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698