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

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

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)
Patch Set: Fixing Windows better Created 4 years, 1 month 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 | « no previous file | src/compiler/code-generator.cc » ('j') | src/wasm/wasm-module.h » ('J')
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..218dd4650c3bc18a4e9cd857c9378195321c4b91 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/wasm/wasm-module.h"
namespace v8 {
namespace internal {
@@ -51,8 +52,10 @@ class InstructionOperandIterator {
// Generates native code for a sequence of instructions.
class CodeGenerator final : public GapResolver::Assembler {
public:
- explicit CodeGenerator(Frame* frame, Linkage* linkage,
- InstructionSequence* code, CompilationInfo* info);
+ explicit CodeGenerator(
+ Frame* frame, Linkage* linkage, InstructionSequence* code,
+ CompilationInfo* info,
+ wasm::ProtectedInstructionList* 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_;
+ wasm::ProtectedInstructionList* protected_instructions_;
};
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/code-generator.cc » ('j') | src/wasm/wasm-module.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698