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

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

Issue 2903153002: [wasm] Increase WebAssembly.Memory maximum size to ~2GB (Closed)
Patch Set: Remove incorrect DCHECK 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 | « src/assembler.cc ('k') | 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 mem_start + offset, RelocInfo::WASM_MEMORY_REFERENCE); 2902 static_cast<uintptr_t>(mem_start + offset),
2903 RelocInfo::WASM_MEMORY_REFERENCE);
2903 } 2904 }
2904 } 2905 }
2905 2906
2906 Node* WasmGraphBuilder::CurrentMemoryPages() { 2907 Node* WasmGraphBuilder::CurrentMemoryPages() {
2907 // CurrentMemoryPages can not be called from asm.js. 2908 // CurrentMemoryPages can not be called from asm.js.
2908 DCHECK_EQ(wasm::kWasmOrigin, module_->module->get_origin()); 2909 DCHECK_EQ(wasm::kWasmOrigin, module_->module->get_origin());
2909 Node* call = 2910 Node* call =
2910 BuildCallToRuntime(Runtime::kWasmMemorySize, jsgraph(), centry_stub_node_, 2911 BuildCallToRuntime(Runtime::kWasmMemorySize, jsgraph(), centry_stub_node_,
2911 nullptr, 0, effect_, control_); 2912 nullptr, 0, effect_, control_);
2912 Node* result = BuildChangeSmiToInt32(call); 2913 Node* result = BuildChangeSmiToInt32(call);
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
4072 wasm::ErrorThrower* thrower, Isolate* isolate, 4073 wasm::ErrorThrower* thrower, Isolate* isolate,
4073 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) { 4074 wasm::ModuleBytesEnv* module_env, const wasm::WasmFunction* function) {
4074 WasmCompilationUnit unit(isolate, module_env, function); 4075 WasmCompilationUnit unit(isolate, module_env, function);
4075 unit.ExecuteCompilation(); 4076 unit.ExecuteCompilation();
4076 return unit.FinishCompilation(thrower); 4077 return unit.FinishCompilation(thrower);
4077 } 4078 }
4078 4079
4079 } // namespace compiler 4080 } // namespace compiler
4080 } // namespace internal 4081 } // namespace internal
4081 } // namespace v8 4082 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/wasm/wasm-limits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698