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

Side by Side Diff: src/wasm/wasm-module.h

Issue 2386183004: [wasm] Call a runtime function for a MemorySize instruction. (Closed)
Patch Set: Comments addressed Created 4 years, 2 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/runtime/runtime-wasm.cc ('k') | src/wasm/wasm-module.cc » ('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 #ifndef V8_WASM_MODULE_H_ 5 #ifndef V8_WASM_MODULE_H_
6 #define V8_WASM_MODULE_H_ 6 #define V8_WASM_MODULE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 ModuleOrigin origin); 527 ModuleOrigin origin);
528 528
529 // Get the number of imported functions for a WASM instance. 529 // Get the number of imported functions for a WASM instance.
530 uint32_t GetNumImportedFunctions(Handle<JSObject> wasm_object); 530 uint32_t GetNumImportedFunctions(Handle<JSObject> wasm_object);
531 531
532 // Assumed to be called with a code object associated to a wasm module instance. 532 // Assumed to be called with a code object associated to a wasm module instance.
533 // Intended to be called from runtime functions. 533 // Intended to be called from runtime functions.
534 // Returns nullptr on failing to get owning instance. 534 // Returns nullptr on failing to get owning instance.
535 Object* GetOwningWasmInstance(Code* code); 535 Object* GetOwningWasmInstance(Code* code);
536 536
537 int32_t GetInstanceMemorySize(Isolate* isolate, Handle<JSObject> instance);
538
537 int32_t GrowInstanceMemory(Isolate* isolate, Handle<JSObject> instance, 539 int32_t GrowInstanceMemory(Isolate* isolate, Handle<JSObject> instance,
538 uint32_t pages); 540 uint32_t pages);
539 541
540 namespace testing { 542 namespace testing {
541 543
542 void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> module_obj, 544 void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> module_obj,
543 int instance_count); 545 int instance_count);
544 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj); 546 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj);
545 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); 547 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
546 548
547 } // namespace testing 549 } // namespace testing
548 } // namespace wasm 550 } // namespace wasm
549 } // namespace internal 551 } // namespace internal
550 } // namespace v8 552 } // namespace v8
551 553
552 #endif // V8_WASM_MODULE_H_ 554 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-wasm.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698