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

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

Issue 2306403002: Revert of [wasm] reuse the first compiled module (Closed)
Patch Set: 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.h ('k') | src/wasm/wasm-module.h » ('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 #include "src/snapshot/code-serializer.h" 5 #include "src/snapshot/code-serializer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/log.h" 10 #include "src/log.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 case Code::FUNCTION: 91 case Code::FUNCTION:
92 DCHECK(code_object->has_reloc_info_for_serialization()); 92 DCHECK(code_object->has_reloc_info_for_serialization());
93 SerializeGeneric(code_object, how_to_code, where_to_point); 93 SerializeGeneric(code_object, how_to_code, where_to_point);
94 return; 94 return;
95 default: 95 default:
96 return SerializeCodeObject(code_object, how_to_code, where_to_point); 96 return SerializeCodeObject(code_object, how_to_code, where_to_point);
97 } 97 }
98 UNREACHABLE(); 98 UNREACHABLE();
99 } 99 }
100 100
101 if (SkipOver(obj)) {
102 return SerializeObject(*isolate()->factory()->undefined_value(),
103 how_to_code, where_to_point, skip);
104 }
105 // Past this point we should not see any (context-specific) maps anymore. 101 // Past this point we should not see any (context-specific) maps anymore.
106 CHECK(!obj->IsMap()); 102 CHECK(!obj->IsMap());
107 // There should be no references to the global object embedded. 103 // There should be no references to the global object embedded.
108 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject()); 104 CHECK(!obj->IsJSGlobalProxy() && !obj->IsJSGlobalObject());
109 // There should be no hash table embedded. They would require rehashing. 105 // There should be no hash table embedded. They would require rehashing.
110 CHECK(!obj->IsHashTable()); 106 CHECK(!obj->IsHashTable());
111 // We expect no instantiated function objects or contexts. 107 // We expect no instantiated function objects or contexts.
112 CHECK(!obj->IsJSFunction() && !obj->IsContext()); 108 CHECK(!obj->IsJSFunction() && !obj->IsContext());
113 109
114 SerializeGeneric(obj, how_to_code, where_to_point); 110 SerializeGeneric(obj, how_to_code, where_to_point);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 *rejection_result = scd.SanityCheck(isolate, expected_source_hash); 405 *rejection_result = scd.SanityCheck(isolate, expected_source_hash);
410 if (*rejection_result != CHECK_SUCCESS) { 406 if (*rejection_result != CHECK_SUCCESS) {
411 cached_data->Reject(); 407 cached_data->Reject();
412 return SerializedCodeData(nullptr, 0); 408 return SerializedCodeData(nullptr, 0);
413 } 409 }
414 return scd; 410 return scd;
415 } 411 }
416 412
417 } // namespace internal 413 } // namespace internal
418 } // namespace v8 414 } // namespace v8
OLDNEW
« no previous file with comments | « src/snapshot/code-serializer.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698