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

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

Issue 2594973003: [wasm] Rename ast-decoder.* to function-body-decoder.* (Closed)
Patch Set: Created 3 years, 12 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/debug/debug-interface.h" 8 #include "src/debug/debug-interface.h"
9 #include "src/wasm/module-decoder.h" 9 #include "src/wasm/module-decoder.h"
10 #include "src/wasm/wasm-module.h" 10 #include "src/wasm/wasm-module.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 788
789 AccountingAllocator alloc; 789 AccountingAllocator alloc;
790 Zone tmp(&alloc, ZONE_NAME); 790 Zone tmp(&alloc, ZONE_NAME);
791 const byte* module_start = module_bytes()->GetChars(); 791 const byte* module_start = module_bytes()->GetChars();
792 792
793 for (uint32_t func_idx = start_func_index; func_idx <= end_func_index; 793 for (uint32_t func_idx = start_func_index; func_idx <= end_func_index;
794 ++func_idx) { 794 ++func_idx) {
795 WasmFunction& func = functions[func_idx]; 795 WasmFunction& func = functions[func_idx];
796 if (func.code_start_offset == func.code_end_offset) continue; 796 if (func.code_start_offset == func.code_end_offset) continue;
797 797
798 AstLocalDecls locals(&tmp); 798 BodyLocalDecls locals(&tmp);
799 BytecodeIterator iterator(module_start + func.code_start_offset, 799 BytecodeIterator iterator(module_start + func.code_start_offset,
800 module_start + func.code_end_offset, &locals); 800 module_start + func.code_end_offset, &locals);
801 DCHECK_LT(0u, locals.decls_encoded_size); 801 DCHECK_LT(0u, locals.decls_encoded_size);
802 for (uint32_t offset : iterator.offsets()) { 802 for (uint32_t offset : iterator.offsets()) {
803 uint32_t total_offset = func.code_start_offset + offset; 803 uint32_t total_offset = func.code_start_offset + offset;
804 if (total_offset >= end_offset) { 804 if (total_offset >= end_offset) {
805 DCHECK_EQ(end_func_index, func_idx); 805 DCHECK_EQ(end_func_index, func_idx);
806 break; 806 break;
807 } 807 }
808 if (total_offset < start_offset) continue; 808 if (total_offset < start_offset) continue;
(...skipping 26 matching lines...) Expand all
835 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) 835 !array->get(kPreviousInstanceWrapper)->IsFixedArray())
836 return false; 836 return false;
837 return true; 837 return true;
838 } 838 }
839 839
840 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance, 840 void WasmInstanceWrapper::set_instance_object(Handle<JSObject> instance,
841 Isolate* isolate) { 841 Isolate* isolate) {
842 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance); 842 Handle<WeakCell> cell = isolate->factory()->NewWeakCell(instance);
843 set(kWrapperInstanceObject, *cell); 843 set(kWrapperInstanceObject, *cell);
844 } 844 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698