Lines Matching refs:WasmCode
151 Address WasmCode::constant_pool() const { in constant_pool()
160 Address WasmCode::handler_table() const { in handler_table()
164 int WasmCode::handler_table_size() const { in handler_table_size()
169 Address WasmCode::code_comments() const { in code_comments()
173 int WasmCode::code_comments_size() const { in code_comments_size()
178 std::unique_ptr<const byte[]> WasmCode::ConcatenateBytes( in ConcatenateBytes()
193 void WasmCode::RegisterTrapHandlerData() { in RegisterTrapHandlerData()
195 if (kind() != WasmCode::kWasmFunction) return; in RegisterTrapHandlerData()
212 bool WasmCode::ShouldBeLogged(Isolate* isolate) { in ShouldBeLogged()
221 std::string WasmCode::DebugName() const { in DebugName()
257 void WasmCode::LogCode(Isolate* isolate, const char* source_url, in LogCode()
295 void WasmCode::Validate() const { in Validate()
317 WasmCode* code = native_module_->Lookup(target); in Validate()
319 CHECK_EQ(WasmCode::kJumpTable, code->kind()); in Validate()
325 WasmCode* code = native_module_->Lookup(target); in Validate()
327 CHECK_EQ(WasmCode::kJumpTable, code->kind()); in Validate()
349 void WasmCode::MaybePrint() const { in MaybePrint()
362 void WasmCode::Print(const char* name) const { in Print()
375 void WasmCode::Disassemble(const char* name, std::ostream& os, in Disassemble()
457 const char* GetWasmCodeKindAsString(WasmCode::Kind kind) { in GetWasmCodeKindAsString()
459 case WasmCode::kWasmFunction: in GetWasmCodeKindAsString()
461 case WasmCode::kWasmToCapiWrapper: in GetWasmCodeKindAsString()
463 case WasmCode::kWasmToJsWrapper: in GetWasmCodeKindAsString()
465 case WasmCode::kJumpTable: in GetWasmCodeKindAsString()
471 WasmCode::~WasmCode() { in ~WasmCode()
477 V8_WARN_UNUSED_RESULT bool WasmCode::DecRefOnPotentiallyDeadCode() { in DecRefOnPotentiallyDeadCode()
490 void WasmCode::DecrementRefCount(base::Vector<WasmCode* const> code_vec) { in DecrementRefCount()
494 for (WasmCode* code : code_vec) { in DecrementRefCount()
504 int WasmCode::GetSourcePositionBefore(int offset) { in GetSourcePositionBefore()
601 WasmCode::kRuntimeStubCount, in OverheadPerCodeSpace()
838 void WasmCodeAllocator::FreeCode(base::Vector<WasmCode* const> codes) { in FreeCode()
842 for (WasmCode* code : codes) { in FreeCode()
1000 std::make_unique<WasmCode*[]>(module_->num_declared_functions); in NativeModule()
1020 auto new_table = std::make_unique<WasmCode*[]>(max_functions); in ReserveCodeTableForTesting()
1023 module_->num_declared_functions * sizeof(WasmCode*)); in ReserveCodeTableForTesting()
1040 if (!WasmCode::ShouldBeLogged(isolate)) return; in LogWasmCodes()
1063 WasmCode* NativeModule::AddCodeForTesting(Handle<Code> code) { in AddCodeForTesting()
1120 DCHECK_LT(stub_call_tag, WasmCode::kRuntimeStubCount); in AddCodeForTesting()
1122 static_cast<WasmCode::RuntimeStubId>(stub_call_tag), jump_tables_ref); in AddCodeForTesting()
1132 std::unique_ptr<WasmCode> new_code{ in AddCodeForTesting()
1133 new WasmCode{this, // native_module in AddCodeForTesting()
1146 WasmCode::kWasmFunction, // kind in AddCodeForTesting()
1176 WasmCode::kWasmCompileLazy, in UseLazyStub()
1190 std::unique_ptr<WasmCode> NativeModule::AddCode( in AddCode()
1194 base::Vector<const byte> source_position_table, WasmCode::Kind kind, in AddCode()
1210 std::unique_ptr<WasmCode> NativeModule::AddCodeWithCodeSpace( in AddCodeWithCodeSpace()
1214 base::Vector<const byte> source_position_table, WasmCode::Kind kind, in AddCodeWithCodeSpace()
1252 DCHECK_LT(stub_call_tag, WasmCode::kRuntimeStubCount); in AddCodeWithCodeSpace()
1254 static_cast<WasmCode::RuntimeStubId>(stub_call_tag), jump_tables); in AddCodeWithCodeSpace()
1268 std::unique_ptr<WasmCode> code{new WasmCode{ in AddCodeWithCodeSpace()
1280 WasmCode* NativeModule::PublishCode(std::unique_ptr<WasmCode> code) { in PublishCode()
1288 std::vector<WasmCode*> NativeModule::PublishCode( in PublishCode()
1289 base::Vector<std::unique_ptr<WasmCode>> codes) { in PublishCode()
1295 std::vector<WasmCode*> published_code; in PublishCode()
1305 WasmCode::Kind GetCodeKind(const WasmCompilationResult& result) { in GetCodeKind()
1308 return WasmCode::Kind::kWasmToJsWrapper; in GetCodeKind()
1310 return WasmCode::Kind::kWasmFunction; in GetCodeKind()
1316 WasmCode* NativeModule::PublishCodeLocked( in PublishCodeLocked()
1317 std::unique_ptr<WasmCode> owned_code) { in PublishCodeLocked()
1320 WasmCode* code = owned_code.get(); in PublishCodeLocked()
1345 WasmCode* prior_code = code_table_[slot_idx]; in PublishCodeLocked()
1384 void NativeModule::ReinstallDebugCode(WasmCode* code) { in ReinstallDebugCode()
1397 if (WasmCode* prior_code = code_table_[slot_idx]) { in ReinstallDebugCode()
1420 std::unique_ptr<WasmCode> NativeModule::AddDeserializedCode( in AddDeserializedCode()
1427 base::Vector<const byte> source_position_table, WasmCode::Kind kind, in AddDeserializedCode()
1431 return std::unique_ptr<WasmCode>{new WasmCode{ in AddDeserializedCode()
1438 std::vector<WasmCode*> NativeModule::SnapshotCodeTable() const { in SnapshotCodeTable()
1440 WasmCode** start = code_table_.get(); in SnapshotCodeTable()
1441 WasmCode** end = start + module_->num_declared_functions; in SnapshotCodeTable()
1442 for (WasmCode* code : base::VectorOf(start, end - start)) { in SnapshotCodeTable()
1445 return std::vector<WasmCode*>{start, end}; in SnapshotCodeTable()
1448 std::vector<WasmCode*> NativeModule::SnapshotAllOwnedCode() const { in SnapshotAllOwnedCode()
1452 std::vector<WasmCode*> all_code(owned_code_.size()); in SnapshotAllOwnedCode()
1459 WasmCode* NativeModule::GetCode(uint32_t index) const { in GetCode()
1461 WasmCode* code = code_table_[declared_function_index(module(), index)]; in GetCode()
1486 WasmCode* NativeModule::CreateEmptyJumpTableInRegionLocked( in CreateEmptyJumpTableInRegionLocked()
1497 std::unique_ptr<WasmCode> code{ in CreateEmptyJumpTableInRegionLocked()
1498 new WasmCode{this, // native_module in CreateEmptyJumpTableInRegionLocked()
1511 WasmCode::kJumpTable, // kind in CreateEmptyJumpTableInRegionLocked()
1564 WasmCode::kRuntimeStubCount + slot_index); in PatchJumpTableLocked()
1606 WasmCode* jump_table = nullptr; in AddCodeSpaceLocked()
1607 WasmCode* far_jump_table = nullptr; in AddCodeSpaceLocked()
1625 WasmCode::kRuntimeStubCount, in AddCodeSpaceLocked()
1632 Builtin stub_names[WasmCode::kRuntimeStubCount] = { in AddCodeSpaceLocked()
1637 Address builtin_addresses[WasmCode::kRuntimeStubCount]; in AddCodeSpaceLocked()
1638 for (int i = 0; i < WasmCode::kRuntimeStubCount; ++i) { in AddCodeSpaceLocked()
1644 WasmCode::kRuntimeStubCount, num_function_slots); in AddCodeSpaceLocked()
1732 [](const std::unique_ptr<WasmCode>& a, in TransferNewOwnedCodeLocked()
1733 const std::unique_ptr<WasmCode>& b) { in TransferNewOwnedCodeLocked()
1748 void NativeModule::InsertToCodeCache(WasmCode* code) { in InsertToCodeCache()
1764 WasmCode* NativeModule::Lookup(Address pc) const { in Lookup()
1770 WasmCode* candidate = iter->second.get(); in Lookup()
1793 auto jump_table_usable = [code_region](const WasmCode* jump_table) { in FindJumpTablesForRegionLocked()
1835 WasmCode::RuntimeStubId index, const JumpTablesRef& jump_tables) const { in GetNearRuntimeStubEntry()
1844 WasmCode* code = Lookup(slot_address); in GetFunctionIndexFromJumpTableSlot()
1846 DCHECK_EQ(WasmCode::kJumpTable, code->kind()); in GetFunctionIndexFromJumpTableSlot()
1857 WasmCode::RuntimeStubId NativeModule::GetRuntimeStubId(Address target) const { in GetRuntimeStubId()
1866 if (index >= WasmCode::kRuntimeStubCount) continue; in GetRuntimeStubId()
1870 return static_cast<WasmCode::RuntimeStubId>(index); in GetRuntimeStubId()
1875 return WasmCode::kRuntimeStubCount; in GetRuntimeStubId()
2130 (sizeof(WasmCode*) * num_wasm_functions) + // code table size in EstimateNativeModuleMetaDataSize()
2131 (sizeof(WasmCode) * num_wasm_functions); // code object size in EstimateNativeModuleMetaDataSize()
2137 WasmCode::kRuntimeStubCount, in EstimateNativeModuleMetaDataSize()
2284 std::unique_ptr<WasmCode> NativeModule::AddCompiledCode( in AddCompiledCode()
2286 std::vector<std::unique_ptr<WasmCode>> code = AddCompiledCode({&result, 1}); in AddCompiledCode()
2290 std::vector<std::unique_ptr<WasmCode>> NativeModule::AddCompiledCode( in AddCompiledCode()
2327 std::vector<std::unique_ptr<WasmCode>> generated_code; in AddCompiledCode()
2380 std::map<std::pair<ExecutionTier, int>, WasmCode*>>(); in RecompileForTiering()
2403 WasmCode* old_code = code_table_[slot_index]; in FindFunctionsToRecompile()
2413 WasmCode* cached_code = cache_it->second; in FindFunctionsToRecompile()
2431 void NativeModule::FreeCode(base::Vector<WasmCode* const> codes) { in FreeCode()
2439 for (WasmCode* code : codes) { in FreeCode()
2509 WasmCode* WasmCodeManager::LookupCode(Address pc) const { in LookupCode()
2526 WasmCode::DecrementRefCount(base::VectorOf(code_ptrs_)); in ~WasmCodeRefScope()
2530 void WasmCodeRefScope::AddRef(WasmCode* code) { in AddRef()
2538 Builtin RuntimeStubIdToBuiltinName(WasmCode::RuntimeStubId stub_id) { in RuntimeStubIdToBuiltinName()
2545 STATIC_ASSERT(arraysize(builtin_names) == WasmCode::kRuntimeStubCount); in RuntimeStubIdToBuiltinName()
2551 const char* GetRuntimeStubName(WasmCode::RuntimeStubId stub_id) { in GetRuntimeStubName()
2559 WasmCode::kRuntimeStubCount + 1); in GetRuntimeStubName()