Skip to content

Conversation

@NiceAndPeter
Copy link
Owner

…ions

Removed redundant 'inline' keywords from member functions defined inside class bodies. In C++, such functions are implicitly inline, making the explicit keyword unnecessary and verbose.

Changes:

  • ltable.h: Node class (20 methods), Table class (8 methods)
  • lproto.h: ProtoDebugInfo (29 methods), Proto (58 methods)
  • lparser.h: Labellist (11 methods), Dyndata (11 methods), ActvarAccessor (4 methods), CodeBuffer (13 methods), ConstantPool (5 methods), VariableScope (7 methods), RegisterAllocator (4 methods), UpvalueTracker (4 methods)
  • lstack.h: LuaStack class (19 methods)
  • llex.h: InputScanner (11 methods), TokenState (4 methods), StringInterner (10 methods)

Total: ~218 redundant inline specifiers removed across 5 header files.

This change improves code clarity without affecting performance. Member functions defined within class bodies are implicitly inline per C++ standard.

Note: Free functions and member functions defined outside class bodies still require explicit 'inline' to avoid ODR violations.

Performance: 4.33s avg (5 runs: 4.70s, 4.25s, 4.15s, 4.34s, 4.20s)
Target: ≤4.33s ✅
Tests: All passing ✅

…ions

Removed redundant 'inline' keywords from member functions defined inside
class bodies. In C++, such functions are implicitly inline, making the
explicit keyword unnecessary and verbose.

Changes:
- ltable.h: Node class (20 methods), Table class (8 methods)
- lproto.h: ProtoDebugInfo (29 methods), Proto (58 methods)
- lparser.h: Labellist (11 methods), Dyndata (11 methods), ActvarAccessor (4 methods),
  CodeBuffer (13 methods), ConstantPool (5 methods), VariableScope (7 methods),
  RegisterAllocator (4 methods), UpvalueTracker (4 methods)
- lstack.h: LuaStack class (19 methods)
- llex.h: InputScanner (11 methods), TokenState (4 methods), StringInterner (10 methods)

Total: ~218 redundant inline specifiers removed across 5 header files.

This change improves code clarity without affecting performance. Member functions
defined within class bodies are implicitly inline per C++ standard.

Note: Free functions and member functions defined outside class bodies still
require explicit 'inline' to avoid ODR violations.

Performance: 4.33s avg (5 runs: 4.70s, 4.25s, 4.15s, 4.34s, 4.20s)
Target: ≤4.33s ✅
Tests: All passing ✅
@NiceAndPeter NiceAndPeter merged commit 8fa3882 into main Nov 22, 2025
11 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants