Chromium Code Reviews| Index: src/compiler/wasm-compiler.cc |
| diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc |
| index c52b45269229296c1b93a7fbb31e3f945aa64c13..89d4e1da0717a95f8b635d401253641f7da0e066 100644 |
| --- a/src/compiler/wasm-compiler.cc |
| +++ b/src/compiler/wasm-compiler.cc |
| @@ -2855,6 +2855,14 @@ void WasmGraphBuilder::BoundsCheckMem(MachineType memtype, Node* index, |
| // Check against the effective size. |
| size_t effective_size; |
| if (size == 0) { |
| + // TODO(gdeepti): Remove filler check used here to stash the size of |
| + // memtype for when code is relocated. |
|
bradn
2016/10/13 22:43:41
Maybe a single reloc type will work after all?
If
gdeepti
2016/10/14 01:28:44
Done.
|
| + Node* cond = graph()->NewNode(jsgraph()->machine()->Uint32LessThan(), |
| + jsgraph()->Int32Constant(0), |
| + jsgraph()->RelocatableInt32Constant( |
| + static_cast<uint32_t>(memsize), |
| + RelocInfo::WASM_MEMTYPE_SIZE_REFERENCE)); |
| + trap_->AddTrapIfFalse(wasm::kTrapMemOutOfBounds, cond, position); |
| effective_size = 0; |
| } else if (offset >= size || |
| (static_cast<uint64_t>(offset) + memsize) > size) { |