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

Side by Side Diff: src/snapshot/code-serializer.h

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)
Patch Set: [wasm] Use a Managed<WasmModule> to hold metadata about modules. 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/signature.h ('k') | src/snapshot/code-serializer.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_SNAPSHOT_CODE_SERIALIZER_H_ 5 #ifndef V8_SNAPSHOT_CODE_SERIALIZER_H_
6 #define V8_SNAPSHOT_CODE_SERIALIZER_H_ 6 #define V8_SNAPSHOT_CODE_SERIALIZER_H_
7 7
8 #include "src/parsing/preparse-data.h" 8 #include "src/parsing/preparse-data.h"
9 #include "src/snapshot/serializer.h" 9 #include "src/snapshot/serializer.h"
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 WhereToPoint where_to_point) override { 67 WhereToPoint where_to_point) override {
68 Code::Kind kind = code_object->kind(); 68 Code::Kind kind = code_object->kind();
69 if (kind == Code::WASM_FUNCTION || kind == Code::WASM_TO_JS_FUNCTION || 69 if (kind == Code::WASM_FUNCTION || kind == Code::WASM_TO_JS_FUNCTION ||
70 kind == Code::JS_TO_WASM_FUNCTION) { 70 kind == Code::JS_TO_WASM_FUNCTION) {
71 SerializeGeneric(code_object, how_to_code, where_to_point); 71 SerializeGeneric(code_object, how_to_code, where_to_point);
72 } else { 72 } else {
73 UNREACHABLE(); 73 UNREACHABLE();
74 } 74 }
75 } 75 }
76 76
77 bool ElideObject(Object* obj) override { return obj->IsWeakCell(); }; 77 bool ElideObject(Object* obj) override {
78 return obj->IsWeakCell() || obj->IsForeign();
79 };
78 80
79 private: 81 private:
80 WasmCompiledModuleSerializer(Isolate* isolate, uint32_t source_hash) 82 WasmCompiledModuleSerializer(Isolate* isolate, uint32_t source_hash)
81 : CodeSerializer(isolate, source_hash) {} 83 : CodeSerializer(isolate, source_hash) {}
82 DISALLOW_COPY_AND_ASSIGN(WasmCompiledModuleSerializer); 84 DISALLOW_COPY_AND_ASSIGN(WasmCompiledModuleSerializer);
83 }; 85 };
84 86
85 // Wrapper around ScriptData to provide code-serializer-specific functionality. 87 // Wrapper around ScriptData to provide code-serializer-specific functionality.
86 class SerializedCodeData : public SerializedData { 88 class SerializedCodeData : public SerializedData {
87 public: 89 public:
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 151 }
150 152
151 SanityCheckResult SanityCheck(Isolate* isolate, 153 SanityCheckResult SanityCheck(Isolate* isolate,
152 uint32_t expected_source_hash) const; 154 uint32_t expected_source_hash) const;
153 }; 155 };
154 156
155 } // namespace internal 157 } // namespace internal
156 } // namespace v8 158 } // namespace v8
157 159
158 #endif // V8_SNAPSHOT_CODE_SERIALIZER_H_ 160 #endif // V8_SNAPSHOT_CODE_SERIALIZER_H_
OLDNEW
« no previous file with comments | « src/signature.h ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698