xtype (halted)

Check-in [06e6fcb534]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix chunkname for generated code.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 06e6fcb5347dbd7dd32fabf4ee2e08fd5d5e13d79daf082b9b7d4200e25bb6f1
User & Date: imagic 2021-11-26 18:24:28.000
Context
2021-11-26
18:31
Release 1.1. ... (check-in: 7ebae51af7 user: imagic tags: trunk, 1.1)
18:24
Fix chunkname for generated code. ... (check-in: 06e6fcb534 user: imagic tags: trunk)
18:21
Implement "any" keyword and `eq` default behavior. ... (check-in: 9463c12ff0 user: imagic tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/xtype.lua.
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
    hcode = hcode.."elseif n == "..i.." then\n"
    hcode = hcode.."local "..xtype.tpllist("a$", 1, i, ", ").." = ...\n"
    hcode = hcode.."hash = self.hsign"..xtype.tpllist("[xtype_get(a$)]", 1, i, "").."[1]\n"
  end
  hcode = hcode.."end\n"
  local code = xtype.tplsub(main, {hash_code = hcode})
  -- compile
  mfcall = loadstring(code, "xtype multifunction call("..n..")")(xtype_get, mf_call)
  -- cache
  mfcalls[n] = mfcall
  return mfcall
end

-- Define a multifunction signature.
-- The keyword "any" matches any type. It is the least specific match for a







|







355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
    hcode = hcode.."elseif n == "..i.." then\n"
    hcode = hcode.."local "..xtype.tpllist("a$", 1, i, ", ").." = ...\n"
    hcode = hcode.."hash = self.hsign"..xtype.tpllist("[xtype_get(a$)]", 1, i, "").."[1]\n"
  end
  hcode = hcode.."end\n"
  local code = xtype.tplsub(main, {hash_code = hcode})
  -- compile
  mfcall = loadstring(code, "=[xtype-opt-mfcall #"..n.."]")(xtype_get, mf_call)
  -- cache
  mfcalls[n] = mfcall
  return mfcall
end

-- Define a multifunction signature.
-- The keyword "any" matches any type. It is the least specific match for a