Commit 51d92984 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[trap-handler] Remove obsolete base pointer update.

Now that WebAssembly code has moved off the garbage collected heap, it
is no longer subject to relocation and support for updating the base
address for the purposes of trap handling can be removed.

R=eholk@chromium.org
BUG=v8:7549

Change-Id: I7a98f192e0c91274fa2ccdb59cdd106da6217948
Reviewed-on: https://chromium-review.googlesource.com/978248Reviewed-by: 's avatarEric Holk <eholk@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52207}
parent 7e5d34bf
...@@ -135,15 +135,6 @@ CodeProtectionInfo* CreateHandlerData( ...@@ -135,15 +135,6 @@ CodeProtectionInfo* CreateHandlerData(
return data; return data;
} }
void UpdateHandlerDataCodePointer(int index, void* base) {
MetadataLock lock;
if (static_cast<size_t>(index) >= gNumCodeObjects) {
abort();
}
CodeProtectionInfo* data = gCodeObjects[index].code_info;
data->base = base;
}
int RegisterHandlerData( int RegisterHandlerData(
void* base, size_t size, size_t num_protected_instructions, void* base, size_t size, size_t num_protected_instructions,
const ProtectedInstructionData* protected_instructions) { const ProtectedInstructionData* protected_instructions) {
......
...@@ -41,20 +41,17 @@ struct ProtectedInstructionData { ...@@ -41,20 +41,17 @@ struct ProtectedInstructionData {
const int kInvalidIndex = -1; const int kInvalidIndex = -1;
/// Adjusts the base code pointer.
void UpdateHandlerDataCodePointer(int index, void* base);
/// Adds the handler data to the place where the signal handler will find it. /// Adds the handler data to the place where the signal handler will find it.
/// ///
/// This returns a number that can be used to identify the handler data to /// This returns a number that can be used to identify the handler data to
/// UpdateHandlerDataCodePointer and ReleaseHandlerData, or -1 on failure. /// ReleaseHandlerData, or -1 on failure.
int RegisterHandlerData(void* base, size_t size, int RegisterHandlerData(void* base, size_t size,
size_t num_protected_instructions, size_t num_protected_instructions,
const ProtectedInstructionData* protected_instructions); const ProtectedInstructionData* protected_instructions);
/// Removes the data from the master list and frees any memory, if necessary. /// Removes the data from the master list and frees any memory, if necessary.
/// TODO(mtrofin): once FLAG_wasm_jit_to_native is not needed, we can switch /// TODO(mtrofin): We can switch to using size_t for index and not need
/// to using size_t for index and not need kInvalidIndex. /// kInvalidIndex.
void ReleaseHandlerData(int index); void ReleaseHandlerData(int index);
#if V8_OS_WIN #if V8_OS_WIN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment