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

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

Issue 2305903002: [wasm] reuse the first compiled module (Closed)
Patch Set: GC before cloning Created 4 years, 3 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/snapshot/code-serializer.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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 const byte* end, 407 const byte* end,
408 ErrorThrower* thrower, 408 ErrorThrower* thrower,
409 ModuleOrigin origin); 409 ModuleOrigin origin);
410 410
411 // Assumed to be called with a code object associated to a wasm module instance. 411 // Assumed to be called with a code object associated to a wasm module instance.
412 // Intended to be called from runtime functions. 412 // Intended to be called from runtime functions.
413 // Returns undefined if the runtime support was not setup, nullptr if the 413 // Returns undefined if the runtime support was not setup, nullptr if the
414 // instance 414 // instance
415 // was collected, or the instance object owning the Code object 415 // was collected, or the instance object owning the Code object
416 Object* GetOwningWasmInstance(Object* undefined, Code* code); 416 Object* GetOwningWasmInstance(Object* undefined, Code* code);
417
418 MaybeHandle<JSArrayBuffer> GetInstanceMemory(Isolate* isolate,
419 Handle<JSObject> instance);
420 void SetInstanceMemory(Handle<JSObject> instance, JSArrayBuffer* buffer);
421
422 namespace testing {
423
424 void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> module_obj,
425 int instance_count);
426 void ValidateModuleState(Isolate* isolate, Handle<JSObject> module_obj);
427 void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
428
429 } // namespace testing
417 } // namespace wasm 430 } // namespace wasm
418 } // namespace internal 431 } // namespace internal
419 } // namespace v8 432 } // namespace v8
420 433
421 #endif // V8_WASM_MODULE_H_ 434 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/snapshot/code-serializer.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698