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

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

Issue 2161543002: [turbofan] Add support for eager/soft deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Do the ports properly Created 4 years, 5 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 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/ast/scopes.h" 7 #include "src/ast/scopes.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 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 __ cmp(input, Immediate(case_count)); 2210 __ cmp(input, Immediate(case_count));
2211 __ j(above_equal, GetLabel(i.InputRpo(1))); 2211 __ j(above_equal, GetLabel(i.InputRpo(1)));
2212 __ jmp(Operand::JumpTable(input, times_4, table)); 2212 __ jmp(Operand::JumpTable(input, times_4, table));
2213 } 2213 }
2214 2214
2215 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall( 2215 CodeGenerator::CodeGenResult CodeGenerator::AssembleDeoptimizerCall(
2216 int deoptimization_id, Deoptimizer::BailoutType bailout_type) { 2216 int deoptimization_id, Deoptimizer::BailoutType bailout_type) {
2217 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( 2217 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry(
2218 isolate(), deoptimization_id, bailout_type); 2218 isolate(), deoptimization_id, bailout_type);
2219 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; 2219 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts;
2220 DeoptimizeReason deoptimization_reason =
2221 GetDeoptimizationReason(deoptimization_id);
2222 __ RecordDeoptReason(deoptimization_reason, 0, deoptimization_id);
2220 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY); 2223 __ call(deopt_entry, RelocInfo::RUNTIME_ENTRY);
2221 return kSuccess; 2224 return kSuccess;
2222 } 2225 }
2223 2226
2224 2227
2225 // The calling convention for JSFunctions on X87 passes arguments on the 2228 // The calling convention for JSFunctions on X87 passes arguments on the
2226 // stack and the JSFunction and context in EDI and ESI, respectively, thus 2229 // stack and the JSFunction and context in EDI and ESI, respectively, thus
2227 // the steps of the call look as follows: 2230 // the steps of the call look as follows:
2228 2231
2229 // --{ before the call instruction }-------------------------------------------- 2232 // --{ before the call instruction }--------------------------------------------
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2699 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2697 __ Nop(padding_size); 2700 __ Nop(padding_size);
2698 } 2701 }
2699 } 2702 }
2700 2703
2701 #undef __ 2704 #undef __
2702 2705
2703 } // namespace compiler 2706 } // namespace compiler
2704 } // namespace internal 2707 } // namespace internal
2705 } // namespace v8 2708 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/compiler/x87/instruction-selector-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698