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

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

Issue 1980483002: [wasm] Remove legacy encoding of local variables from asm->wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/wasm/wasm-module.h ('k') | test/cctest/wasm/test-wasm-function-name-table.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 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/base/atomic-utils.h" 5 #include "src/base/atomic-utils.h"
6 #include "src/macro-assembler.h" 6 #include "src/macro-assembler.h"
7 #include "src/objects.h" 7 #include "src/objects.h"
8 #include "src/property-descriptor.h" 8 #include "src/property-descriptor.h"
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 os << (module.max_mem_pages * module.kPageSize) << " max mem"; 81 os << (module.max_mem_pages * module.kPageSize) << " max mem";
82 os << module.functions.size() << " functions"; 82 os << module.functions.size() << " functions";
83 os << module.functions.size() << " globals"; 83 os << module.functions.size() << " globals";
84 os << module.functions.size() << " data segments"; 84 os << module.functions.size() << " data segments";
85 return os; 85 return os;
86 } 86 }
87 87
88 std::ostream& operator<<(std::ostream& os, const WasmFunction& function) { 88 std::ostream& operator<<(std::ostream& os, const WasmFunction& function) {
89 os << "WASM function with signature " << *function.sig; 89 os << "WASM function with signature " << *function.sig;
90 90
91 os << " locals: ";
92 if (function.local_i32_count) os << function.local_i32_count << " i32s ";
93 if (function.local_i64_count) os << function.local_i64_count << " i64s ";
94 if (function.local_f32_count) os << function.local_f32_count << " f32s ";
95 if (function.local_f64_count) os << function.local_f64_count << " f64s ";
96
97 os << " code bytes: " 91 os << " code bytes: "
98 << (function.code_end_offset - function.code_start_offset); 92 << (function.code_end_offset - function.code_start_offset);
99 return os; 93 return os;
100 } 94 }
101 95
102 std::ostream& operator<<(std::ostream& os, const WasmFunctionName& pair) { 96 std::ostream& operator<<(std::ostream& os, const WasmFunctionName& pair) {
103 os << "#" << pair.function_->func_index << ":"; 97 os << "#" << pair.function_->func_index << ":";
104 if (pair.function_->name_offset > 0) { 98 if (pair.function_->name_offset > 0) {
105 if (pair.module_) { 99 if (pair.module_) {
106 WasmName name = pair.module_->GetName(pair.function_->name_offset, 100 WasmName name = pair.module_->GetName(pair.function_->name_offset,
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 wasm->GetInternalField(kWasmFunctionNamesArray), wasm->GetIsolate()); 982 wasm->GetInternalField(kWasmFunctionNamesArray), wasm->GetIsolate());
989 if (func_names_arr_obj->IsUndefined()) 983 if (func_names_arr_obj->IsUndefined())
990 return func_names_arr_obj; // Return undefined. 984 return func_names_arr_obj; // Return undefined.
991 return GetWasmFunctionNameFromTable( 985 return GetWasmFunctionNameFromTable(
992 Handle<ByteArray>::cast(func_names_arr_obj), func_index); 986 Handle<ByteArray>::cast(func_names_arr_obj), func_index);
993 } 987 }
994 988
995 } // namespace wasm 989 } // namespace wasm
996 } // namespace internal 990 } // namespace internal
997 } // namespace v8 991 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.h ('k') | test/cctest/wasm/test-wasm-function-name-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698