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