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

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

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)
Patch Set: Removing spurious changes Created 4 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 | « BUILD.gn ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.h
diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h
index 7aed85a37f439113db8082c09112d30d4a97735c..6737fe6bc6f530262fe398e4be5c3d2bb06af706 100644
--- a/src/compiler/code-generator.h
+++ b/src/compiler/code-generator.h
@@ -12,6 +12,7 @@
#include "src/macro-assembler.h"
#include "src/safepoint-table.h"
#include "src/source-position-table.h"
+#include "src/trap-handler/trap-handler.h"
namespace v8 {
namespace internal {
@@ -52,7 +53,9 @@ class InstructionOperandIterator {
class CodeGenerator final : public GapResolver::Assembler {
public:
explicit CodeGenerator(Frame* frame, Linkage* linkage,
- InstructionSequence* code, CompilationInfo* info);
+ InstructionSequence* code, CompilationInfo* info,
+ ZoneVector<trap_handler::ProtectedInstructionData>*
+ protected_instructions = nullptr);
// Generate native code.
Handle<Code> GenerateCode();
@@ -65,6 +68,8 @@ class CodeGenerator final : public GapResolver::Assembler {
Label* GetLabel(RpoNumber rpo) { return &labels_[rpo.ToSize()]; }
+ void AddProtectedInstruction(int instr_offset, int landing_offset);
+
private:
MacroAssembler* masm() { return &masm_; }
GapResolver* resolver() { return &resolver_; }
@@ -280,6 +285,7 @@ class CodeGenerator final : public GapResolver::Assembler {
OutOfLineCode* ools_;
int osr_pc_offset_;
SourcePositionTableBuilder source_position_table_builder_;
+ ZoneVector<trap_handler::ProtectedInstructionData>* protected_instructions_;
};
} // namespace compiler
« no previous file with comments | « BUILD.gn ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698