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

Unified Diff: src/value-serializer.cc

Issue 2490663002: [wasm] Move all heap-allocated WASM structures into wasm-objects.h. (Closed)
Patch Set: More dead code Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/v8.gyp ('k') | src/wasm/wasm-debug.h » ('j') | src/wasm/wasm-module.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/value-serializer.cc
diff --git a/src/value-serializer.cc b/src/value-serializer.cc
index 86c96dac16b430ab7a5bc433a1a8f607d52267da..94f2c390854cc126eafa1be4772184447c590e8f 100644
--- a/src/value-serializer.cc
+++ b/src/value-serializer.cc
@@ -17,6 +17,7 @@
#include "src/snapshot/code-serializer.h"
#include "src/transitions.h"
#include "src/wasm/wasm-module.h"
+#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-result.h"
namespace v8 {
@@ -739,8 +740,8 @@ Maybe<bool> ValueSerializer::WriteJSArrayBufferView(JSArrayBufferView* view) {
}
Maybe<bool> ValueSerializer::WriteWasmModule(Handle<JSObject> object) {
- Handle<wasm::WasmCompiledModule> compiled_part(
- wasm::WasmCompiledModule::cast(object->GetInternalField(0)), isolate_);
+ Handle<WasmCompiledModule> compiled_part(
+ WasmCompiledModule::cast(object->GetInternalField(0)), isolate_);
WasmEncodingTag encoding_tag = WasmEncodingTag::kRawBytes;
WriteTag(SerializationTag::kWasmModule);
WriteRawBytes(&encoding_tag, sizeof(encoding_tag));
@@ -1508,9 +1509,8 @@ MaybeHandle<JSObject> ValueDeserializer::ReadWasmModule() {
if (WasmCompiledModuleSerializer::DeserializeWasmModule(
isolate_, &script_data, wire_bytes)
.ToHandle(&compiled_part)) {
- return wasm::CreateWasmModuleObject(
- isolate_, Handle<wasm::WasmCompiledModule>::cast(compiled_part),
- wasm::ModuleOrigin::kWasmOrigin);
+ return WasmModuleObject::New(
+ isolate_, Handle<WasmCompiledModule>::cast(compiled_part));
}
// If that fails, recompile.
« no previous file with comments | « src/v8.gyp ('k') | src/wasm/wasm-debug.h » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698