diff options
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r-- | src/lanes.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index a82e4ba..04b0955 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
@@ -85,6 +85,7 @@ THE SOFTWARE. | |||
85 | #include "intercopycontext.h" | 85 | #include "intercopycontext.h" |
86 | #include "keeper.h" | 86 | #include "keeper.h" |
87 | #include "lane.h" | 87 | #include "lane.h" |
88 | #include "nameof.h" | ||
88 | #include "state.h" | 89 | #include "state.h" |
89 | #include "threading.h" | 90 | #include "threading.h" |
90 | #include "tools.h" | 91 | #include "tools.h" |
@@ -175,7 +176,7 @@ LUAG_FUNC(require) | |||
175 | lua_pushvalue(L_, lua_upvalueindex(1)); // L_: "name" ... require | 176 | lua_pushvalue(L_, lua_upvalueindex(1)); // L_: "name" ... require |
176 | lua_insert(L_, 1); // L_: require "name" ... | 177 | lua_insert(L_, 1); // L_: require "name" ... |
177 | lua_call(L_, _nargs, 1); // L_: module | 178 | lua_call(L_, _nargs, 1); // L_: module |
178 | populate_func_lookup_table(L_, -1, _name); | 179 | tools::PopulateFuncLookupTable(L_, -1, _name); |
179 | DEBUGSPEW_CODE(DebugSpew(_U) << "lanes.require '" << _name << "' END" << std::endl); | 180 | DEBUGSPEW_CODE(DebugSpew(_U) << "lanes.require '" << _name << "' END" << std::endl); |
180 | STACK_CHECK(L_, 0); | 181 | STACK_CHECK(L_, 0); |
181 | return 1; | 182 | return 1; |
@@ -197,7 +198,7 @@ LUAG_FUNC(register) | |||
197 | STACK_CHECK_START_REL(L_, 0); // "name" mod_table | 198 | STACK_CHECK_START_REL(L_, 0); // "name" mod_table |
198 | DEBUGSPEW_CODE(DebugSpew(_U) << "lanes.register '" << _name << "' BEGIN" << std::endl); | 199 | DEBUGSPEW_CODE(DebugSpew(_U) << "lanes.register '" << _name << "' BEGIN" << std::endl); |
199 | DEBUGSPEW_CODE(DebugSpewIndentScope _scope{ _U }); | 200 | DEBUGSPEW_CODE(DebugSpewIndentScope _scope{ _U }); |
200 | populate_func_lookup_table(L_, -1, _name); | 201 | tools::PopulateFuncLookupTable(L_, -1, _name); |
201 | DEBUGSPEW_CODE(DebugSpew(_U) << "lanes.register '" << _name << "' END" << std::endl); | 202 | DEBUGSPEW_CODE(DebugSpew(_U) << "lanes.register '" << _name << "' END" << std::endl); |
202 | STACK_CHECK(L_, 0); | 203 | STACK_CHECK(L_, 0); |
203 | return 0; | 204 | return 0; |
@@ -414,7 +415,7 @@ LUAG_FUNC(lane_new) | |||
414 | } | 415 | } |
415 | // here the module was successfully required // L_: [fixed] args... n "modname" L2: ret | 416 | // here the module was successfully required // L_: [fixed] args... n "modname" L2: ret |
416 | // after requiring the module, register the functions it exported in our name<->function database | 417 | // after requiring the module, register the functions it exported in our name<->function database |
417 | populate_func_lookup_table(_L2, -1, _name); | 418 | tools::PopulateFuncLookupTable(_L2, -1, _name); |
418 | lua_pop(_L2, 1); // L_: [fixed] args... n "modname" L2: | 419 | lua_pop(_L2, 1); // L_: [fixed] args... n "modname" L2: |
419 | } | 420 | } |
420 | } | 421 | } |
@@ -596,7 +597,7 @@ namespace { | |||
596 | { "wakeup_conv", LG_wakeup_conv }, | 597 | { "wakeup_conv", LG_wakeup_conv }, |
597 | { "set_thread_priority", LG_set_thread_priority }, | 598 | { "set_thread_priority", LG_set_thread_priority }, |
598 | { "set_thread_affinity", LG_set_thread_affinity }, | 599 | { "set_thread_affinity", LG_set_thread_affinity }, |
599 | { "nameof", luaG_nameof }, | 600 | { "nameof", LG_nameof }, |
600 | { "register", LG_register }, | 601 | { "register", LG_register }, |
601 | { Universe::kFinally, Universe::InitializeFinalizer }, | 602 | { Universe::kFinally, Universe::InitializeFinalizer }, |
602 | { "set_singlethreaded", LG_set_singlethreaded }, | 603 | { "set_singlethreaded", LG_set_singlethreaded }, |
@@ -742,7 +743,7 @@ LUAG_FUNC(configure) | |||
742 | // register all native functions found in that module in the transferable functions database | 743 | // register all native functions found in that module in the transferable functions database |
743 | // we process it before _G because we don't want to find the module when scanning _G (this would generate longer names) | 744 | // we process it before _G because we don't want to find the module when scanning _G (this would generate longer names) |
744 | // for example in package.loaded["lanes.core"].* | 745 | // for example in package.loaded["lanes.core"].* |
745 | populate_func_lookup_table(L_, -1, _name); | 746 | tools::PopulateFuncLookupTable(L_, -1, _name); |
746 | STACK_CHECK(L_, 2); | 747 | STACK_CHECK(L_, 2); |
747 | 748 | ||
748 | // record all existing C/JIT-fast functions | 749 | // record all existing C/JIT-fast functions |
@@ -752,7 +753,7 @@ LUAG_FUNC(configure) | |||
752 | // because we will do it after on_state_create() is called, | 753 | // because we will do it after on_state_create() is called, |
753 | // and we don't want to skip _G because of caching in case globals are created then | 754 | // and we don't want to skip _G because of caching in case globals are created then |
754 | lua_pushglobaltable(L_); // L_: settings M _G | 755 | lua_pushglobaltable(L_); // L_: settings M _G |
755 | populate_func_lookup_table(L_, -1, {}); | 756 | tools::PopulateFuncLookupTable(L_, -1, {}); |
756 | lua_pop(L_, 1); // L_: settings M | 757 | lua_pop(L_, 1); // L_: settings M |
757 | } | 758 | } |
758 | lua_pop(L_, 1); // L_: settings | 759 | lua_pop(L_, 1); // L_: settings |