mirror of
https://github.com/usatiuk/psil.git
synced 2025-10-28 10:47:49 +01:00
const refs in compiler
This commit is contained in:
@@ -10,10 +10,10 @@
|
||||
|
||||
class Compiler {
|
||||
public:
|
||||
static Handle compile(Handle src, Handle fake_env = nullptr, Handle suffix = nullptr);
|
||||
static Handle compile(const Handle &src, Handle fake_env = nullptr, const Handle &suffix = nullptr);
|
||||
|
||||
private:
|
||||
static Handle findIndex(Handle symbol, Handle env);
|
||||
static Handle findIndex(const Handle &symbol, const Handle &env);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
using namespace Command;
|
||||
|
||||
Handle Compiler::compile(Handle src, Handle fake_env, Handle suffix) {
|
||||
Handle Compiler::compile(const Handle &src, Handle fake_env, const Handle &suffix) {
|
||||
Handle out;
|
||||
|
||||
std::function<Handle(Handle)> compileArgsRaw = [&](Handle args) {
|
||||
@@ -119,7 +119,7 @@ Handle Compiler::compile(Handle src, Handle fake_env, Handle suffix) {
|
||||
out.splice(suffix);
|
||||
return out;
|
||||
}
|
||||
Handle Compiler::findIndex(Handle symbol, Handle env) {
|
||||
Handle Compiler::findIndex(const Handle &symbol, const Handle &env) {
|
||||
int64_t frame = 1;
|
||||
|
||||
Handle curFrame = env;
|
||||
|
||||
Reference in New Issue
Block a user