mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Use roc_target over target_lexicon
Tailors a target class for our needs. Replaces tons of uses across the entire compiler. This is a base for later adding new targets like thumb.
This commit is contained in:
parent
185262510c
commit
6dc5bfb1b7
72 changed files with 1008 additions and 1371 deletions
|
@ -1,7 +1,7 @@
|
|||
//! Provides the functionality for the REPL to evaluate Roc expressions.
|
||||
use roc_parse::ast::Expr;
|
||||
use roc_std::RocDec;
|
||||
use roc_target::TargetInfo;
|
||||
use roc_target::Target;
|
||||
|
||||
pub mod eval;
|
||||
pub mod gen;
|
||||
|
@ -28,7 +28,7 @@ pub trait ReplApp<'a> {
|
|||
/// When the executed code calls roc_panic, this function will return None
|
||||
fn call_function_returns_roc_str<T, F>(
|
||||
&mut self,
|
||||
target_info: TargetInfo,
|
||||
target: Target,
|
||||
main_fn_name: &str,
|
||||
transform: F,
|
||||
) -> Option<T>
|
||||
|
@ -36,7 +36,7 @@ pub trait ReplApp<'a> {
|
|||
F: Fn(&'a Self::Memory, usize) -> T,
|
||||
Self::Memory: 'a,
|
||||
{
|
||||
let roc_str_width = match target_info.ptr_width() {
|
||||
let roc_str_width = match target.ptr_width() {
|
||||
roc_target::PtrWidth::Bytes4 => 12,
|
||||
roc_target::PtrWidth::Bytes8 => 24,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue