Lines Matching defs:name
37 constexpr char kNameString[] = "name";
120 const char* name) {
126 decoder->consume_bytes(length, name);
129 decoder->errorf(string_start, "%s: no valid UTF-8 string", name);
137 WireBytesRef string = consume_string(decoder, true, "section name");
144 TRACE(" +%d section name : \"%.*s\"\n",
229 // Reads the section code/name at the current position and sets up
251 // Check for the known "name", "sourceMappingURL", or "compilationHints"
254 // the end of the custom section, so that we do not read the section name
429 // TODO(titzer): report out of place name section as a warning.
430 // Be lenient with placement of name section. All except first
791 import->module_name = consume_string(this, true, "module name");
792 import->field_name = consume_string(this, true, "field name");
823 errorf(type_position, "Invalid table type %s", type.name().c_str());
972 {0, 0}, // name
978 exp->name = consume_string(this, true, "field name");
1041 if (a.name.length() != b.name.length()) {
1042 return a.name.length() < b.name.length();
1044 const byte* left = start() + GetBufferRelativeOffset(a.name.offset());
1045 const byte* right = start() + GetBufferRelativeOffset(b.name.offset());
1046 return memcmp(left, right, a.name.length()) < 0;
1055 const byte* pc = start() + GetBufferRelativeOffset(it->name.offset());
1056 TruncatedUserString<> name(pc, it->name.length());
1057 errorf(pc, "Duplicate export name '%.*s' for %s %d and %s %d",
1058 name.length(), name.start(), ExternalKindName(last->kind),
1211 // TODO(titzer): find a way to report name errors as warnings.
1212 // Ignore all but the first occurrence of name section.
1217 // Decode all name subsections.
1220 uint8_t name_type = inner.consume_u8("name type");
1221 if (name_type & 0x80) inner.error("name type if not varuint7");
1223 uint32_t name_payload_len = inner.consume_u32v("name payload length");
1226 // Decode module name, ignore the rest.
1229 WireBytesRef name = consume_string(&inner, false, "module name");
1230 if (inner.ok() && validate_utf8(&inner, name)) {
1231 module_->name = name;
1234 inner.consume_bytes(name_payload_len, "name subsection payload");
1244 WireBytesRef url = wasm::consume_string(&inner, true, "module name");
1715 uint32_t consume_count(const char* name, size_t maximum) {
1717 uint32_t count = consume_u32v(name);
1719 errorf(p, "%s of %u exceeds internal limit of %zu", name, count, maximum);
1726 const char* name) {
1727 return consume_index(name, &module->functions, func);
1743 uint32_t consume_index(const char* name, std::vector<T>* vector, T** ptr) {
1745 uint32_t index = consume_u32v(name);
1747 errorf(pos, "%s %u out of bounds (%d entr%s)", name, index,
1757 uint8_t validate_table_flags(const char* name) {
1761 errorf(pc() - 1, "invalid %s limits flags", name);
1806 void consume_resizable_limits(const char* name, const char* units,
1821 name, initial_64, units, max_initial);
1833 name, maximum_64, units, max_maximum);
1838 name, maximum_64, units, *initial, units);
1848 bool expect_u8(const char* name, uint8_t expected) {
1850 uint8_t value = consume_u8(name);
1852 errorf(pos, "expected %s 0x%02x, got 0x%02x", name, expected, value);
1866 expected.name().c_str(), found.name().c_str()); \
2128 type.name().c_str(), table_index, table_type.name().c_str());
2157 table_index, table_type.name().c_str());
2214 expected.name().c_str(), entry_type.name().c_str());
2442 uint32_t name_length = decoder.consume_u32v("name length");
2444 decoder.consume_bytes(name_length, "section name");
2475 // Reset the decoder to not read beyond the name section end.
2490 uint8_t name_type = decoder.consume_u8("name type");
2493 uint32_t name_payload_len = decoder.consume_u32v("name payload length");
2497 decoder.consume_bytes(name_payload_len, "name subsection payload");
2504 WireBytesRef name = consume_string(&decoder, false, "function name");
2506 // Be lenient with errors in the name section: Ignore non-UTF8 names.
2509 if (decoder.ok() && validate_utf8(&decoder, name)) {
2510 names->insert(std::make_pair(function_index, name));
2524 uint8_t name_type = decoder.consume_u8("name type");
2527 uint32_t name_payload_len = decoder.consume_u32v("name payload length");
2531 decoder.consume_bytes(name_payload_len, "name subsection payload");
2538 WireBytesRef name = consume_string(&decoder, false, "name");
2541 if (!validate_utf8(&decoder, name)) continue;
2542 names.emplace_back(static_cast<int>(index), name);
2556 uint8_t name_type = decoder.consume_u8("name type");
2559 uint32_t name_payload_len = decoder.consume_u32v("name payload length");
2563 decoder.consume_bytes(name_payload_len, "name subsection payload");
2575 WireBytesRef name = consume_string(&decoder, false, "name");
2579 if (!validate_utf8(&decoder, name)) continue;
2580 names.emplace_back(static_cast<int>(inner_index), name);