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

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

Issue 2920523002: PPC/s390: [compiler] Ask compilation info, not isolate, about source positions flag. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | src/compiler/s390/code-generator-s390.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 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 // We use the context register as the scratch register, because we do 2074 // We use the context register as the scratch register, because we do
2075 // not have a context here. 2075 // not have a context here.
2076 __ PrepareCallCFunction(0, 0, cp); 2076 __ PrepareCallCFunction(0, 0, cp);
2077 __ CallCFunction( 2077 __ CallCFunction(
2078 ExternalReference::wasm_call_trap_callback_for_testing(isolate()), 2078 ExternalReference::wasm_call_trap_callback_for_testing(isolate()),
2079 0); 2079 0);
2080 __ LeaveFrame(StackFrame::WASM_COMPILED); 2080 __ LeaveFrame(StackFrame::WASM_COMPILED);
2081 __ Ret(); 2081 __ Ret();
2082 } else { 2082 } else {
2083 gen_->AssembleSourcePosition(instr_); 2083 gen_->AssembleSourcePosition(instr_);
2084 __ Call(handle(isolate()->builtins()->builtin(trap_id), isolate()), 2084 __ Call(isolate()->builtins()->builtin_handle(trap_id),
2085 RelocInfo::CODE_TARGET); 2085 RelocInfo::CODE_TARGET);
2086 ReferenceMap* reference_map = 2086 ReferenceMap* reference_map =
2087 new (gen_->zone()) ReferenceMap(gen_->zone()); 2087 new (gen_->zone()) ReferenceMap(gen_->zone());
2088 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0, 2088 gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0,
2089 Safepoint::kNoLazyDeopt); 2089 Safepoint::kNoLazyDeopt);
2090 if (FLAG_debug_code) { 2090 if (FLAG_debug_code) {
2091 __ stop(GetBailoutReason(kUnexpectedReturnFromWasmTrap)); 2091 __ stop(GetBailoutReason(kUnexpectedReturnFromWasmTrap));
2092 } 2092 }
2093 } 2093 }
2094 } 2094 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 GetDeoptimizationReason(deoptimization_id); 2212 GetDeoptimizationReason(deoptimization_id);
2213 Deoptimizer::BailoutType bailout_type = 2213 Deoptimizer::BailoutType bailout_type =
2214 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT 2214 deoptimization_kind == DeoptimizeKind::kSoft ? Deoptimizer::SOFT
2215 : Deoptimizer::EAGER; 2215 : Deoptimizer::EAGER;
2216 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( 2216 Address deopt_entry = Deoptimizer::GetDeoptimizationEntry(
2217 isolate(), deoptimization_id, bailout_type); 2217 isolate(), deoptimization_id, bailout_type);
2218 // TODO(turbofan): We should be able to generate better code by sharing the 2218 // TODO(turbofan): We should be able to generate better code by sharing the
2219 // actual final call site and just bl'ing to it here, similar to what we do 2219 // actual final call site and just bl'ing to it here, similar to what we do
2220 // in the lithium backend. 2220 // in the lithium backend.
2221 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts; 2221 if (deopt_entry == nullptr) return kTooManyDeoptimizationBailouts;
2222 if (isolate()->NeedsSourcePositionsForProfiling()) { 2222 if (info()->is_source_positions_enabled()) {
2223 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id); 2223 __ RecordDeoptReason(deoptimization_reason, pos, deoptimization_id);
2224 } 2224 }
2225 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); 2225 __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY);
2226 return kSuccess; 2226 return kSuccess;
2227 } 2227 }
2228 2228
2229 void CodeGenerator::FinishFrame(Frame* frame) { 2229 void CodeGenerator::FinishFrame(Frame* frame) {
2230 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); 2230 CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
2231 const RegList double_saves = descriptor->CalleeSavedFPRegisters(); 2231 const RegList double_saves = descriptor->CalleeSavedFPRegisters();
2232 2232
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 padding_size -= v8::internal::Assembler::kInstrSize; 2618 padding_size -= v8::internal::Assembler::kInstrSize;
2619 } 2619 }
2620 } 2620 }
2621 } 2621 }
2622 2622
2623 #undef __ 2623 #undef __
2624 2624
2625 } // namespace compiler 2625 } // namespace compiler
2626 } // namespace internal 2626 } // namespace internal
2627 } // namespace v8 2627 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/s390/code-generator-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698