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

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

Issue 2772363002: Separate function decoding counter into asm and wasm counters. (Closed)
Patch Set: Create dummy module environment for DecodeWasmFunction test. 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 #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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 FunctionSig* GetSignature(uint32_t index) { 328 FunctionSig* GetSignature(uint32_t index) {
329 DCHECK(IsValidSignature(index)); 329 DCHECK(IsValidSignature(index));
330 return module->signatures[index]; 330 return module->signatures[index];
331 } 331 }
332 const WasmIndirectFunctionTable* GetTable(uint32_t index) const { 332 const WasmIndirectFunctionTable* GetTable(uint32_t index) const {
333 DCHECK(IsValidTable(index)); 333 DCHECK(IsValidTable(index));
334 return &module->function_tables[index]; 334 return &module->function_tables[index];
335 } 335 }
336 336
337 bool asm_js() { return module->is_asm_js(); } 337 bool is_asm_js() const { return module->is_asm_js(); }
338 bool is_wasm() const { return module->is_wasm(); }
338 339
339 // Only used for testing. 340 // Only used for testing.
340 Handle<Code> GetFunctionCode(uint32_t index) { 341 Handle<Code> GetFunctionCode(uint32_t index) {
341 DCHECK_NOT_NULL(instance); 342 DCHECK_NOT_NULL(instance);
342 return instance->function_code[index]; 343 return instance->function_code[index];
343 } 344 }
344 345
345 // TODO(titzer): move these into src/compiler/wasm-compiler.cc 346 // TODO(titzer): move these into src/compiler/wasm-compiler.cc
346 static compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone, 347 static compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone,
347 FunctionSig* sig); 348 FunctionSig* sig);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 int instance_count); 521 int instance_count);
521 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); 522 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
522 void ValidateOrphanedInstance(Isolate* isolate, 523 void ValidateOrphanedInstance(Isolate* isolate,
523 Handle<WasmInstanceObject> instance); 524 Handle<WasmInstanceObject> instance);
524 } // namespace testing 525 } // namespace testing
525 } // namespace wasm 526 } // namespace wasm
526 } // namespace internal 527 } // namespace internal
527 } // namespace v8 528 } // namespace v8
528 529
529 #endif // V8_WASM_MODULE_H_ 530 #endif // V8_WASM_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698