feat: at least it compiles, right?
This commit is contained in:
@@ -14,7 +14,7 @@ impl JITCompile for Attrs {
|
||||
}
|
||||
}
|
||||
|
||||
impl JITCompile for List {
|
||||
impl JITCompile for List {
|
||||
fn compile<'gc>(self, ctx: &JITContext<'gc>) {
|
||||
todo!()
|
||||
}
|
||||
@@ -32,7 +32,7 @@ impl JITCompile for BinOp {
|
||||
}
|
||||
}
|
||||
|
||||
impl JITCompile for UnOp {
|
||||
impl JITCompile for UnOp {
|
||||
fn compile<'gc>(self, ctx: &JITContext<'gc>) {
|
||||
todo!()
|
||||
}
|
||||
@@ -91,13 +91,13 @@ impl JITCompile for Const {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl JITCompile for String {
|
||||
fn compile<'gc>(self, ctx: &JITContext<'gc>) {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl JITCompile for Var {
|
||||
fn compile<'gc>(self, ctx: &JITContext<'gc>) {
|
||||
todo!()
|
||||
@@ -124,6 +124,6 @@ impl JITCompile for Thunk {
|
||||
|
||||
impl JITCompile for Path {
|
||||
fn compile<'gc>(self, ctx: &JITContext<'gc>) {
|
||||
todo!()
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use inkwell::values::{BasicValueEnum, FunctionValue};
|
||||
use crate::env::VmEnv;
|
||||
use crate::eval::Engine;
|
||||
|
||||
use super::{JITContext, JITValue, ValueTag, JITValueData};
|
||||
use super::{JITContext, JITValue, JITValueData, ValueTag};
|
||||
|
||||
pub struct Helpers<'ctx> {
|
||||
pub int_type: IntType<'ctx>,
|
||||
@@ -341,9 +341,7 @@ extern "C" fn helper_arg(idx: usize, env: *const VmEnv) -> JITValue {
|
||||
}
|
||||
|
||||
extern "C" fn helper_lookup_let(level: usize, idx: usize, env: *const VmEnv) -> JITValue {
|
||||
let env = unsafe { env.as_ref() }.unwrap();
|
||||
let val: JITValue = env.lookup_let(level, idx).clone().into();
|
||||
val
|
||||
todo!()
|
||||
}
|
||||
|
||||
extern "C" fn helper_lookup(sym: usize, env: *const VmEnv) -> JITValue {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use std::ops::Deref;
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Deref;
|
||||
|
||||
use inkwell::OptimizationLevel;
|
||||
use inkwell::builder::Builder;
|
||||
@@ -10,8 +10,8 @@ use inkwell::module::Module;
|
||||
use crate::env::VmEnv;
|
||||
use crate::ty::internal::Value;
|
||||
|
||||
mod helpers;
|
||||
mod compile;
|
||||
mod helpers;
|
||||
|
||||
pub use compile::JITCompile;
|
||||
use helpers::Helpers;
|
||||
@@ -105,7 +105,6 @@ impl Deref for JITFunc<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub struct JITContext<'ctx> {
|
||||
context: &'ctx Context,
|
||||
module: Module<'ctx>,
|
||||
|
||||
@@ -8,8 +8,8 @@ use inkwell::context::Context;
|
||||
|
||||
use ecow::EcoString;
|
||||
|
||||
use crate::ir::downgrade;
|
||||
use super::JITContext;
|
||||
use crate::ir::downgrade;
|
||||
use crate::ty::common::Const;
|
||||
use crate::ty::public::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user