| 1390 | } |
| 1391 | |
| 1392 | static std::string GetMemoryAPIString(const Memory& memory, std::string api) { |
| 1393 | std::string suffix; |
| 1394 | if (memory.page_limits.is_shared) { |
| 1395 | suffix += "_shared"; |
| 1396 | } |
| 1397 | |
| 1398 | // Memory load and store routines can be optimized for default-page-size, |
| 1399 | // 32-bit memories (by using hardware to bounds-check memory access). |
| 1400 | // Append "_default32" to these function names to choose the (possibly) fast |
| 1401 | // path. |
| 1402 | // |
| 1403 | // We don't need to do this for runtime routines; those can check the |
| 1404 | // wasm_rt_memory_t structure. |
| 1405 | if (api.substr(0, 8) != "wasm_rt_" && |
| 1406 | memory.page_size == WABT_DEFAULT_PAGE_SIZE && |
| 1407 | memory.page_limits.is_64 == false) { |
| 1408 | suffix += "_default32"; |
| 1409 | } |
| 1410 | return api + suffix; |
| 1411 | } |
| 1412 | |
| 1413 | void CWriter::WriteInitExpr(const ExprList& expr_list) { |
| 1414 | if (expr_list.empty()) { |
no outgoing calls
no test coverage detected