Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MemoryReg 異動 #197

Open
shewer opened this issue Sep 24, 2022 · 0 comments
Open

MemoryReg 異動 #197

shewer opened this issue Sep 24, 2022 · 0 comments

Comments

@shewer
Copy link
Contributor

shewer commented Sep 24, 2022

  1. Memory() 初始化增加 argv[4] callback_func

    local function init(env)
    env.mem = Memory(env.engine,env.engine.schema) -- ns= "translator"
    -- env.mem = Memory(env.engine,env.engine.schema, env.name_space )
    -- env.mem = Memory(env.engine,Schema("cangjie5") ) -- ns= "translator-
    env.mem:memorize(function(commit) memoryCallback(env.mem, commit) end)

    -- ex1 
     env.mem = Memory(env.engne,env.engine.schema)
     env.mem:memorize( callback_func) -- callback_func
    -- ex2
    env.mem = Memory(env.engne,env.engine.schema, 'translator',callback_func)
     
  2. memoize(func) 直接 callback 免去 function(commit) return callback_func end

    auto r = lua_->call<bool, an<LuaObj>, const CommitEntry &>(memorize_callback, commit_entry);

        auto r = lua_->call<bool, an<LuaObj>, T &, const CommitEntry &>(memorize_callback, *this, commit_entry);
  3. lookup func return an 可以同時產生多組 iter 組合應用

  4. 增加 DictEntryIterReg UserDictEntryIterReg 配合 第四項

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant