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

Unified Diff: src/compiler/code-generator.cc

Issue 514643002: [turbofan] Explicitly mark call sites as patchable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 243ef02fa73ff140384f528810b98b994a7b0eaf..98b3e5a9cb25974ebb10ef53600d63e5af20e1e1 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -240,17 +240,15 @@ void CodeGenerator::PopulateDeoptimizationData(Handle<Code> code_object) {
void CodeGenerator::AddSafepointAndDeopt(Instruction* instr) {
- CallDescriptor::DeoptimizationSupport deopt =
- static_cast<CallDescriptor::DeoptimizationSupport>(
- MiscField::decode(instr->opcode()));
+ CallDescriptor::Flags flags(MiscField::decode(instr->opcode()));
- bool needs_frame_state = (deopt & CallDescriptor::kNeedsFrameState) != 0;
+ bool needs_frame_state = (flags & CallDescriptor::kNeedsFrameState);
Safepoint::Id safepoint_id = RecordSafepoint(
instr->pointer_map(), Safepoint::kSimple, 0,
needs_frame_state ? Safepoint::kLazyDeopt : Safepoint::kNoLazyDeopt);
- if ((deopt & CallDescriptor::kLazyDeoptimization) != 0) {
+ if (flags & CallDescriptor::kLazyDeoptimization) {
RecordLazyDeoptimizationEntry(instr, safepoint_id);
}
@@ -276,6 +274,10 @@ void CodeGenerator::AddSafepointAndDeopt(Instruction* instr) {
BuildTranslation(instr, first_state_value_offset, deoptimization_id);
safepoints()->RecordLazyDeoptimizationIndex(deoptimization_id);
}
+
+ if (flags & CallDescriptor::kNeedsNopAfterCall) {
+ AddNopForSmiCodeInlining();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698