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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2935243002: Revert of [wasm] Increase WebAssembly.Memory maximum size to ~2GB (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/wasm/wasm-limits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 uintptr_t mem_start = reinterpret_cast<uintptr_t>( 2892 uintptr_t mem_start = reinterpret_cast<uintptr_t>(
2893 module_->instance ? module_->instance->mem_start : nullptr); 2893 module_->instance ? module_->instance->mem_start : nullptr);
2894 if (offset == 0) { 2894 if (offset == 0) {
2895 if (!mem_buffer_) { 2895 if (!mem_buffer_) {
2896 mem_buffer_ = jsgraph()->RelocatableIntPtrConstant( 2896 mem_buffer_ = jsgraph()->RelocatableIntPtrConstant(
2897 mem_start, RelocInfo::WASM_MEMORY_REFERENCE); 2897 mem_start, RelocInfo::WASM_MEMORY_REFERENCE);
2898 } 2898 }
2899 return mem_buffer_; 2899 return mem_buffer_;
2900 } else { 2900 } else {
2901 return jsgraph()->RelocatableIntPtrConstant( 2901 return jsgraph()->RelocatableIntPtrConstant(
2902 static_cast<uintptr_t>(mem_start + offset), 2902 mem_start + offset, RelocInfo::WASM_MEMORY_REFERENCE);
2903 RelocInfo::WASM_MEMORY_REFERENCE);
2904 } 2903 }
2905 } 2904 }
2906 2905
2907 Node* WasmGraphBuilder::CurrentMemoryPages() { 2906 Node* WasmGraphBuilder::CurrentMemoryPages() {
2908 // CurrentMemoryPages can not be called from asm.js. 2907 // CurrentMemoryPages can not be called from asm.js.
2909 DCHECK_EQ(wasm::kWasmOrigin, module_->module->get_origin()); 2908 DCHECK_EQ(wasm::kWasmOrigin, module_->module->get_origin());
2910 Node* call = 2909 Node* call =
2911 BuildCallToRuntime(Runtime::kWasmMemorySize, jsgraph(), centry_stub_node_, 2910 BuildCallToRuntime(Runtime::kWasmMemorySize, jsgraph(), centry_stub_node_,
2912 nullptr, 0, effect_, control_); 2911 nullptr, 0, effect_, control_);
2913 Node* result = BuildChangeSmiToInt32(call); 2912 Node* result = BuildChangeSmiToInt32(call);
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 wasm::ErrorThrower* thrower, Isolate* isolate, 4083 wasm::ErrorThrower* thrower, Isolate* isolate,
4085 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { 4084 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) {
4086 WasmCompilationUnit unit(isolate, module_env, function); 4085 WasmCompilationUnit unit(isolate, module_env, function);
4087 unit.ExecuteCompilation(); 4086 unit.ExecuteCompilation();
4088 return unit.FinishCompilation(thrower); 4087 return unit.FinishCompilation(thrower);
4089 } 4088 }
4090 4089
4091 } // namespace compiler 4090 } // namespace compiler
4092 } // namespace internal 4091 } // namespace internal
4093 } // namespace v8 4092 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/wasm/wasm-limits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698