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

Unified Diff: src/compiler/wasm-compiler.h

Issue 2500443004: [wasm] OOB traps: build protected instruction list during codegen (Closed)
Patch Set: Merging with master 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
Index: src/compiler/wasm-compiler.h
diff --git a/src/compiler/wasm-compiler.h b/src/compiler/wasm-compiler.h
index b4bc3502976b819b17aed7767eeb377b32e38ea3..b17b80fee00876e52c80df058158f6c261947e2d 100644
--- a/src/compiler/wasm-compiler.h
+++ b/src/compiler/wasm-compiler.h
@@ -11,6 +11,7 @@
// Do not include anything from src/compiler here!
#include "src/compilation-info.h"
#include "src/compiler.h"
+#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-opcodes.h"
#include "src/wasm/wasm-result.h"
#include "src/zone/zone.h"
@@ -56,13 +57,15 @@ class WasmCompilationUnit final {
Isolate* isolate,
wasm::ModuleEnv* module_env,
const wasm::WasmFunction* function) {
- WasmCompilationUnit unit(thrower, isolate, module_env, function, 0);
+ WasmCompilationUnit unit(thrower, isolate, module_env, function,
+ function->func_index);
unit.ExecuteCompilation();
return unit.FinishCompilation();
}
private:
SourcePositionTable* BuildGraphForWasmFunction(double* decode_ms);
+ Handle<FixedArray> PackProtectedInstructions() const;
wasm::ErrorThrower* thrower_;
Isolate* isolate_;
@@ -77,6 +80,9 @@ class WasmCompilationUnit final {
uint32_t index_;
wasm::Result<wasm::DecodeStruct*> graph_construction_result_;
bool ok_;
+ ProtectedInstructionList protected_instructions_; // Instructions that are
+ // protected by the signal
+ // handler.
DISALLOW_COPY_AND_ASSIGN(WasmCompilationUnit);
};

Powered by Google App Engine
This is Rietveld 408576698