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

Unified Diff: src/v8memory.h

Issue 2056633002: [wasm] Separate compilation from instantiation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: feedback Created 4 years, 6 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
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8memory.h
diff --git a/src/v8memory.h b/src/v8memory.h
index b1ae939f845949b3dd02b26517385f39c7ae2b32..d34bce77464ae7b09a971875c9398ad3d3893feb 100644
--- a/src/v8memory.h
+++ b/src/v8memory.h
@@ -64,6 +64,13 @@ class Memory {
static Handle<Object>& Object_Handle_at(Address addr) {
return *reinterpret_cast<Handle<Object>*>(addr);
}
+
+ static bool IsAddressInRange(Address base, Address address, uint32_t size) {
+ uintptr_t numeric_base = reinterpret_cast<uintptr_t>(base);
+ uintptr_t numeric_address = reinterpret_cast<uintptr_t>(address);
+ return numeric_base <= numeric_address &&
+ numeric_address < numeric_base + size;
+ }
};
} // namespace internal
« no previous file with comments | « src/mips64/assembler-mips64.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698