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

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

Issue 763963002: [turbofan] Add checked load/store operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reapply fix. Created 6 years 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
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 6789f3a9fee75c5c1b6e1b08180e9eb390087f10..d4622c0a351d1962c415bee3d9f92050e1e53d50 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -27,7 +27,8 @@ CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage,
deoptimization_states_(code->zone()),
deoptimization_literals_(code->zone()),
translations_(code->zone()),
- last_lazy_deopt_pc_(0) {
+ last_lazy_deopt_pc_(0),
+ ools_(nullptr) {
for (int i = 0; i < code->InstructionBlockCount(); ++i) {
new (&labels_[i]) Label;
}
@@ -71,6 +72,16 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
}
+ // Assemble all out-of-line code.
+ if (ools_) {
+ masm()->RecordComment("-- Out of line code --");
+ for (OutOfLineCode* ool = ools_; ool; ool = ool->next()) {
+ masm()->bind(ool->entry());
+ ool->Generate();
+ masm()->jmp(ool->exit());
+ }
+ }
+
FinishCode(masm());
// Ensure there is space for lazy deopt.
@@ -555,6 +566,15 @@ void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); }
#endif // !V8_TURBOFAN_BACKEND
+
+OutOfLineCode::OutOfLineCode(CodeGenerator* gen)
+ : masm_(gen->masm()), next_(gen->ools_) {
+ gen->ools_ = this;
+}
+
+
+OutOfLineCode::~OutOfLineCode() {}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/code-generator-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698