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

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

Issue 961973002: [turbofan] First shot at eager deoptimization in Turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 2 Created 5 years, 9 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/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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 break; 361 break;
362 case kArchTableSwitch: 362 case kArchTableSwitch:
363 AssembleArchTableSwitch(instr); 363 AssembleArchTableSwitch(instr);
364 break; 364 break;
365 case kArchLookupSwitch: 365 case kArchLookupSwitch:
366 AssembleArchLookupSwitch(instr); 366 AssembleArchLookupSwitch(instr);
367 break; 367 break;
368 case kArchNop: 368 case kArchNop:
369 // don't emit code for nops. 369 // don't emit code for nops.
370 break; 370 break;
371 case kArchDeoptimize: {
372 int deopt_state_id =
373 BuildTranslation(instr, -1, 0, OutputFrameStateCombine::Ignore());
374 AssembleDeoptimizerCall(deopt_state_id, Deoptimizer::EAGER);
375 break;
376 }
371 case kArchRet: 377 case kArchRet:
372 AssembleReturn(); 378 AssembleReturn();
373 break; 379 break;
374 case kArchStackPointer: 380 case kArchStackPointer:
375 __ mov(i.OutputRegister(), masm()->StackPointer()); 381 __ mov(i.OutputRegister(), masm()->StackPointer());
376 break; 382 break;
377 case kArchTruncateDoubleToI: 383 case kArchTruncateDoubleToI:
378 __ TruncateDoubleToI(i.OutputRegister(), i.InputDoubleRegister(0)); 384 __ TruncateDoubleToI(i.OutputRegister(), i.InputDoubleRegister(0));
379 break; 385 break;
380 case kArm64Float64Ceil: 386 case kArm64Float64Ceil:
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 __ Br(temp); 891 __ Br(temp);
886 __ StartBlockPools(); 892 __ StartBlockPools();
887 __ Bind(&table); 893 __ Bind(&table);
888 for (size_t index = 0; index < case_count; ++index) { 894 for (size_t index = 0; index < case_count; ++index) {
889 __ B(GetLabel(i.InputRpo(index + 2))); 895 __ B(GetLabel(i.InputRpo(index + 2)));
890 } 896 }
891 __ EndBlockPools(); 897 __ EndBlockPools();
892 } 898 }
893 899
894 900
895 void CodeGenerator::AssembleDeoptimizerCall(int deoptimization_id) { 901 void CodeGenerator::AssembleDeoptimizerCall(
902 int deoptimization_id, Deoptimizer::BailoutType bailout_type) {
896 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( 903 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry(
897 isolate(), deoptimization_id, Deoptimizer::LAZY); 904 isolate(), deoptimization_id, bailout_type);
898 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); 905 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY);
899 } 906 }
900 907
901 908
902 // TODO(dcarney): increase stack slots in frame once before first use. 909 // TODO(dcarney): increase stack slots in frame once before first use.
903 static int AlignedStackSlots(int stack_slots) { 910 static int AlignedStackSlots(int stack_slots) {
904 if (stack_slots & 1) stack_slots++; 911 if (stack_slots & 1) stack_slots++;
905 return stack_slots; 912 return stack_slots;
906 } 913 }
907 914
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 } 1162 }
1156 } 1163 }
1157 MarkLazyDeoptSite(); 1164 MarkLazyDeoptSite();
1158 } 1165 }
1159 1166
1160 #undef __ 1167 #undef __
1161 1168
1162 } // namespace compiler 1169 } // namespace compiler
1163 } // namespace internal 1170 } // namespace internal
1164 } // namespace v8 1171 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698