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

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

Issue 2958283003: [wasm] Naming convention: get_origin() -> origin() (Closed)
Patch Set: Created 3 years, 5 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/module-compiler.cc ('k') | test/cctest/wasm/wasm-run-utils.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 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 #ifndef V8_WASM_MODULE_H_ 5 #ifndef V8_WASM_MODULE_H_
6 #define V8_WASM_MODULE_H_ 6 #define V8_WASM_MODULE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 std::vector<WasmFunction> functions; // functions in this module. 180 std::vector<WasmFunction> functions; // functions in this module.
181 std::vector<WasmDataSegment> data_segments; // data segments in this module. 181 std::vector<WasmDataSegment> data_segments; // data segments in this module.
182 std::vector<WasmIndirectFunctionTable> function_tables; // function tables. 182 std::vector<WasmIndirectFunctionTable> function_tables; // function tables.
183 std::vector<WasmImport> import_table; // import table. 183 std::vector<WasmImport> import_table; // import table.
184 std::vector<WasmExport> export_table; // export table. 184 std::vector<WasmExport> export_table; // export table.
185 std::vector<WasmTableInit> table_inits; // initializations of tables 185 std::vector<WasmTableInit> table_inits; // initializations of tables
186 186
187 WasmModule() : WasmModule(nullptr) {} 187 WasmModule() : WasmModule(nullptr) {}
188 WasmModule(std::unique_ptr<Zone> owned); 188 WasmModule(std::unique_ptr<Zone> owned);
189 189
190 ModuleOrigin get_origin() const { return origin_; } 190 ModuleOrigin origin() const { return origin_; }
191 void set_origin(ModuleOrigin new_value) { origin_ = new_value; } 191 void set_origin(ModuleOrigin new_value) { origin_ = new_value; }
192 bool is_wasm() const { return origin_ == kWasmOrigin; } 192 bool is_wasm() const { return origin_ == kWasmOrigin; }
193 bool is_asm_js() const { return origin_ == kAsmJsOrigin; } 193 bool is_asm_js() const { return origin_ == kAsmJsOrigin; }
194 194
195 private: 195 private:
196 // TODO(kschimpf) - Encapsulate more fields. 196 // TODO(kschimpf) - Encapsulate more fields.
197 ModuleOrigin origin_ = kWasmOrigin; // origin of the module 197 ModuleOrigin origin_ = kWasmOrigin; // origin of the module
198 }; 198 };
199 199
200 typedef Managed<WasmModule> WasmModuleWrapper; 200 typedef Managed<WasmModule> WasmModuleWrapper;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 int instance_count); 520 int instance_count);
521 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); 521 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
522 void ValidateOrphanedInstance(Isolate* isolate, 522 void ValidateOrphanedInstance(Isolate* isolate,
523 Handle<WasmInstanceObject> instance); 523 Handle<WasmInstanceObject> instance);
524 } // namespace testing 524 } // namespace testing
525 } // namespace wasm 525 } // namespace wasm
526 } // namespace internal 526 } // namespace internal
527 } // namespace v8 527 } // namespace v8
528 528
529 #endif // V8_WASM_MODULE_H_ 529 #endif // V8_WASM_MODULE_H_
OLDNEW
« no previous file with comments | « src/wasm/module-compiler.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698