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

Side by Side Diff: src/wasm/wasm-objects.cc

Issue 2807013002: [wasm] Misc fixes for async compilation (Closed)
Patch Set: [wasm] Fix async compile for empty modules, or modules with tables. Created 3 years, 8 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 #include "src/wasm/wasm-objects.h" 5 #include "src/wasm/wasm-objects.h"
6 #include "src/utils.h" 6 #include "src/utils.h"
7 7
8 #include "src/assembler-inl.h" 8 #include "src/assembler-inl.h"
9 #include "src/base/iterator.h" 9 #include "src/base/iterator.h"
10 #include "src/compiler/wasm-compiler.h" 10 #include "src/compiler/wasm-compiler.h"
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 compiled_module->set_shared(shared); 960 compiled_module->set_shared(shared);
961 compiled_module->set_native_context(isolate->native_context()); 961 compiled_module->set_native_context(isolate->native_context());
962 compiled_module->set_code_table(code_table); 962 compiled_module->set_code_table(code_table);
963 int function_table_count = 963 int function_table_count =
964 static_cast<int>(shared->module()->function_tables.size()); 964 static_cast<int>(shared->module()->function_tables.size());
965 if (function_table_count > 0) { 965 if (function_table_count > 0) {
966 compiled_module->set_signature_tables( 966 compiled_module->set_signature_tables(
967 maybe_signature_tables.ToHandleChecked()); 967 maybe_signature_tables.ToHandleChecked());
968 compiled_module->set_empty_function_tables( 968 compiled_module->set_empty_function_tables(
969 maybe_empty_function_tables.ToHandleChecked()); 969 maybe_empty_function_tables.ToHandleChecked());
970 compiled_module->set_function_tables(
971 maybe_empty_function_tables.ToHandleChecked());
970 } 972 }
971 // TODO(mtrofin): we copy these because the order of finalization isn't 973 // TODO(mtrofin): we copy these because the order of finalization isn't
972 // reliable, and we need these at Reset (which is called at 974 // reliable, and we need these at Reset (which is called at
973 // finalization). If the order were reliable, and top-down, we could instead 975 // finalization). If the order were reliable, and top-down, we could instead
974 // just get them from shared(). 976 // just get them from shared().
975 compiled_module->set_min_mem_pages(shared->module()->min_mem_pages); 977 compiled_module->set_min_mem_pages(shared->module()->min_mem_pages);
976 compiled_module->set_num_imported_functions( 978 compiled_module->set_num_imported_functions(
977 shared->module()->num_imported_functions); 979 shared->module()->num_imported_functions);
978 return compiled_module; 980 return compiled_module;
979 } 981 }
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 if (!array->get(kWrapperInstanceObject)->IsWeakCell()) return false; 1577 if (!array->get(kWrapperInstanceObject)->IsWeakCell()) return false;
1576 Isolate* isolate = array->GetIsolate(); 1578 Isolate* isolate = array->GetIsolate();
1577 if (!array->get(kNextInstanceWrapper)->IsUndefined(isolate) && 1579 if (!array->get(kNextInstanceWrapper)->IsUndefined(isolate) &&
1578 !array->get(kNextInstanceWrapper)->IsFixedArray()) 1580 !array->get(kNextInstanceWrapper)->IsFixedArray())
1579 return false; 1581 return false;
1580 if (!array->get(kPreviousInstanceWrapper)->IsUndefined(isolate) && 1582 if (!array->get(kPreviousInstanceWrapper)->IsUndefined(isolate) &&
1581 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) 1583 !array->get(kPreviousInstanceWrapper)->IsFixedArray())
1582 return false; 1584 return false;
1583 return true; 1585 return true;
1584 } 1586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698