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

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

Issue 2396473003: [wasm] Refactor GrowMemory runtime call. (Closed)
Patch Set: Rebase again for weird trybot failures 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
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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // Get the number of imported functions for a WASM instance. 507 // Get the number of imported functions for a WASM instance.
508 uint32_t GetNumImportedFunctions(Handle<JSObject> wasm_object); 508 uint32_t GetNumImportedFunctions(Handle<JSObject> wasm_object);
509 509
510 // Assumed to be called with a code object associated to a wasm module instance. 510 // Assumed to be called with a code object associated to a wasm module instance.
511 // Intended to be called from runtime functions. 511 // Intended to be called from runtime functions.
512 // Returns nullptr on failing to get owning instance. 512 // Returns nullptr on failing to get owning instance.
513 Object* GetOwningWasmInstance(Code* code); 513 Object* GetOwningWasmInstance(Code* code);
514 514
515 MaybeHandle<JSArrayBuffer> GetInstanceMemory(Isolate* isolate, 515 MaybeHandle<JSArrayBuffer> GetInstanceMemory(Isolate* isolate,
516 Handle<JSObject> instance); 516 Handle<JSObject> instance);
517 void SetInstanceMemory(Handle<JSObject> instance, JSArrayBuffer* buffer); 517 void SetInstanceMemory(Handle<JSObject> instance, JSArrayBuffer* buffer);
Mircea Trofin 2016/10/04 22:01:53 We can delete SetInstanceMemory, I think. It was t
gdeepti 2016/10/05 02:59:57 Removed from header, retaining in wasm-module.cc f
518 518
519 int32_t GrowInstanceMemory(Isolate* isolate, Handle<JSObject> instance,
520 uint32_t pages);
521
519 namespace testing { 522 namespace testing {
520 523
521 void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> module_obj, 524 void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> module_obj,
522 int instance_count); 525 int instance_count);
523 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj); 526 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj);
524 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance); 527 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
525 528
526 } // namespace testing 529 } // namespace testing
527 } // namespace wasm 530 } // namespace wasm
528 } // namespace internal 531 } // namespace internal
529 } // namespace v8 532 } // namespace v8
530 533
531 #endif // V8_WASM_MODULE_H_ 534 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-wasm.cc ('k') | src/wasm/wasm-module.cc » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698