aboutsummaryrefslogtreecommitdiff
path: root/src/tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools.cpp')
-rw-r--r--src/tools.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tools.cpp b/src/tools.cpp
index 52c70bc..98224ae 100644
--- a/src/tools.cpp
+++ b/src/tools.cpp
@@ -64,7 +64,7 @@ void push_registry_subtable_mode( lua_State* L, UniqueKey key_, const char* mode
64 STACK_GROW(L, 3); 64 STACK_GROW(L, 3);
65 STACK_CHECK_START_REL(L, 0); 65 STACK_CHECK_START_REL(L, 0);
66 66
67 key_.query_registry(L); // {}|nil 67 key_.pushValue(L); // {}|nil
68 STACK_CHECK(L, 1); 68 STACK_CHECK(L, 1);
69 69
70 if (lua_isnil(L, -1)) 70 if (lua_isnil(L, -1))
@@ -72,7 +72,7 @@ void push_registry_subtable_mode( lua_State* L, UniqueKey key_, const char* mode
72 lua_pop(L, 1); // 72 lua_pop(L, 1); //
73 lua_newtable(L); // {} 73 lua_newtable(L); // {}
74 // _R[key_] = {} 74 // _R[key_] = {}
75 key_.set_registry(L, [](lua_State* L) { lua_pushvalue(L, -2); }); // {} 75 key_.setValue(L, [](lua_State* L) { lua_pushvalue(L, -2); }); // {}
76 STACK_CHECK(L, 1); 76 STACK_CHECK(L, 1);
77 77
78 // Set its metatable if requested 78 // Set its metatable if requested
@@ -554,7 +554,7 @@ void populate_func_lookup_table( lua_State* L, int _i, char const* name_)
554 DEBUGSPEW_CODE( ++ U->debugspew_indent_depth); 554 DEBUGSPEW_CODE( ++ U->debugspew_indent_depth);
555 STACK_GROW( L, 3); 555 STACK_GROW( L, 3);
556 STACK_CHECK_START_REL(L, 0); 556 STACK_CHECK_START_REL(L, 0);
557 LOOKUP_REGKEY.query_registry(L); // {} 557 LOOKUP_REGKEY.pushValue(L); // {}
558 STACK_CHECK( L, 1); 558 STACK_CHECK( L, 1);
559 ASSERT_L( lua_istable( L, -1)); 559 ASSERT_L( lua_istable( L, -1));
560 if( lua_type( L, in_base) == LUA_TFUNCTION) // for example when a module is a simple function 560 if( lua_type( L, in_base) == LUA_TFUNCTION) // for example when a module is a simple function
@@ -570,7 +570,7 @@ void populate_func_lookup_table( lua_State* L, int _i, char const* name_)
570 } 570 }
571 else if( lua_type( L, in_base) == LUA_TTABLE) 571 else if( lua_type( L, in_base) == LUA_TTABLE)
572 { 572 {
573 lua_newtable( L); // {} {fqn} 573 lua_newtable(L); // {} {fqn}
574 if( name_) 574 if( name_)
575 { 575 {
576 STACK_CHECK( L, 2); 576 STACK_CHECK( L, 2);
@@ -584,12 +584,12 @@ void populate_func_lookup_table( lua_State* L, int _i, char const* name_)
584 STACK_CHECK( L, 2); 584 STACK_CHECK( L, 2);
585 } 585 }
586 // retrieve the cache, create it if we haven't done it yet 586 // retrieve the cache, create it if we haven't done it yet
587 LOOKUPCACHE_REGKEY.query_registry(L); // {} {fqn} {cache}? 587 LOOKUPCACHE_REGKEY.pushValue(L); // {} {fqn} {cache}?
588 if( lua_isnil( L, -1)) 588 if( lua_isnil( L, -1))
589 { 589 {
590 lua_pop( L, 1); // {} {fqn} 590 lua_pop( L, 1); // {} {fqn}
591 lua_newtable( L); // {} {fqn} {cache} 591 lua_newtable( L); // {} {fqn} {cache}
592 LOOKUPCACHE_REGKEY.set_registry(L, [](lua_State* L) { lua_pushvalue(L, -2); }); 592 LOOKUPCACHE_REGKEY.setValue(L, [](lua_State* L) { lua_pushvalue(L, -2); });
593 STACK_CHECK( L, 3); 593 STACK_CHECK( L, 3);
594 } 594 }
595 // process everything we find in that table, filling in lookup data for all functions and tables we see there 595 // process everything we find in that table, filling in lookup data for all functions and tables we see there
@@ -698,7 +698,7 @@ static char const* find_lookup_name(lua_State* L, int i, LookupMode mode_, char
698 else 698 else
699 { 699 {
700 // fetch the name from the source state's lookup table 700 // fetch the name from the source state's lookup table
701 LOOKUP_REGKEY.query_registry(L); // ... v ... {} 701 LOOKUP_REGKEY.pushValue(L); // ... v ... {}
702 STACK_CHECK( L, 1); 702 STACK_CHECK( L, 1);
703 ASSERT_L( lua_istable( L, -1)); 703 ASSERT_L( lua_istable( L, -1));
704 lua_pushvalue( L, i); // ... v ... {} v 704 lua_pushvalue( L, i); // ... v ... {} v
@@ -771,7 +771,7 @@ static bool lookup_table(lua_State* L2, lua_State* L, int i, LookupMode mode_, c
771 771
772 case eLM_LaneBody: 772 case eLM_LaneBody:
773 case eLM_FromKeeper: 773 case eLM_FromKeeper:
774 LOOKUP_REGKEY.query_registry(L2); // {} 774 LOOKUP_REGKEY.pushValue(L2); // {}
775 STACK_CHECK( L2, 1); 775 STACK_CHECK( L2, 1);
776 ASSERT_L( lua_istable( L2, -1)); 776 ASSERT_L( lua_istable( L2, -1));
777 lua_pushlstring( L2, fqn, len); // {} "f.q.n" 777 lua_pushlstring( L2, fqn, len); // {} "f.q.n"
@@ -1072,7 +1072,7 @@ static void lookup_native_func(lua_State* L2, lua_State* L, int i, LookupMode mo
1072 1072
1073 case eLM_LaneBody: 1073 case eLM_LaneBody:
1074 case eLM_FromKeeper: 1074 case eLM_FromKeeper:
1075 LOOKUP_REGKEY.query_registry(L2); // {} 1075 LOOKUP_REGKEY.pushValue(L2); // {}
1076 STACK_CHECK( L2, 1); 1076 STACK_CHECK( L2, 1);
1077 ASSERT_L( lua_istable( L2, -1)); 1077 ASSERT_L( lua_istable( L2, -1));
1078 lua_pushlstring( L2, fqn, len); // {} "f.q.n" 1078 lua_pushlstring( L2, fqn, len); // {} "f.q.n"