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

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

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization Created 6 years, 3 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 | Annotate | Revision Log
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/arm64/macro-assembler-arm64.h" 7 #include "src/arm64/macro-assembler-arm64.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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 case kArchCallJSFunction: { 151 case kArchCallJSFunction: {
152 // TODO(jarin) The load of the context should be separated from the call. 152 // TODO(jarin) The load of the context should be separated from the call.
153 Register func = i.InputRegister(0); 153 Register func = i.InputRegister(0);
154 __ Ldr(cp, FieldMemOperand(func, JSFunction::kContextOffset)); 154 __ Ldr(cp, FieldMemOperand(func, JSFunction::kContextOffset));
155 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset)); 155 __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
156 __ Call(x10); 156 __ Call(x10);
157 AddSafepointAndDeopt(instr); 157 AddSafepointAndDeopt(instr);
158 break; 158 break;
159 } 159 }
160 case kArchDeoptimize: {
161 int deoptimization_id = BuildTranslation(instr, 0);
162
163 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry(
164 isolate(), deoptimization_id, Deoptimizer::LAZY);
165 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY);
166 break;
167 }
168 case kArchDrop: { 160 case kArchDrop: {
169 int words = MiscField::decode(instr->opcode()); 161 int words = MiscField::decode(instr->opcode());
170 __ Drop(words); 162 __ Drop(words);
171 break; 163 break;
172 } 164 }
173 case kArchJmp: 165 case kArchJmp:
174 __ B(code_->GetLabel(i.InputBlock(0))); 166 __ B(code_->GetLabel(i.InputBlock(0)));
175 break; 167 break;
176 case kArchNop: 168 case kArchNop:
177 // don't emit code for nops. 169 // don't emit code for nops.
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 case kNotOverflow: 612 case kNotOverflow:
621 cc = vc; 613 cc = vc;
622 break; 614 break;
623 } 615 }
624 __ bind(&check); 616 __ bind(&check);
625 __ Cset(reg, cc); 617 __ Cset(reg, cc);
626 __ Bind(&done); 618 __ Bind(&done);
627 } 619 }
628 620
629 621
622 void CodeGenerator::AssembleDeoptimizerCall(int deoptimization_id) {
623 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry(
624 isolate(), deoptimization_id, Deoptimizer::LAZY);
625 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY);
626 }
627
628
630 // TODO(dcarney): increase stack slots in frame once before first use. 629 // TODO(dcarney): increase stack slots in frame once before first use.
631 static int AlignedStackSlots(int stack_slots) { 630 static int AlignedStackSlots(int stack_slots) {
632 if (stack_slots & 1) stack_slots++; 631 if (stack_slots & 1) stack_slots++;
633 return stack_slots; 632 return stack_slots;
634 } 633 }
635 634
636 635
637 void CodeGenerator::AssemblePrologue() { 636 void CodeGenerator::AssemblePrologue() {
638 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); 637 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
639 if (descriptor->kind() == CallDescriptor::kCallAddress) { 638 if (descriptor->kind() == CallDescriptor::kCallAddress) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 } 839 }
841 840
842 841
843 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } 842 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); }
844 843
845 #undef __ 844 #undef __
846 845
847 } // namespace compiler 846 } // namespace compiler
848 } // namespace internal 847 } // namespace internal
849 } // namespace v8 848 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698