Skip to content

Commit 88b60a4

Browse files
committed
feat: checkpoint
1 parent 72fccc3 commit 88b60a4

1 file changed

Lines changed: 0 additions & 49 deletions

File tree

libs/@local/hashql/mir/src/intrinsic.rs

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -30,52 +30,3 @@ pub struct Intrinsic {
3030
// Hint to any optimization passes that this intrinsic should not be optimized in any way.
3131
pub optimize: bool,
3232
}
33-
34-
pub(crate) fn entity_property_access_body<'heap>(
35-
env: &Environment<'heap>,
36-
id: DefId,
37-
span: SpanId,
38-
) -> Body<'heap> {
39-
// Intrinsic body for property access, we **cannot** mock this specific intrinsic, because it's
40-
// semantics are - while expressible - compile-time only. We cannot index into a struct at
41-
// run-time from a runtime-defined value, without sacrifing correctness guarantees the MIR
42-
// relies on. Meaning that indeed we must mock this specific intrinsic on all backends that
43-
// support it.
44-
let builder = TypeBuilder::spanned(span, env);
45-
46-
let mut local_decls = IdVec::with_capacity_in(2, env.heap);
47-
local_decls.push(LocalDecl {
48-
span,
49-
r#type: entity(&builder, builder.unknown(), None),
50-
name: Some(sym::entity),
51-
});
52-
local_decls.push(LocalDecl {
53-
span,
54-
r#type: json::types::json_path(&builder, None),
55-
name: Some(sym::pointer),
56-
});
57-
58-
let mut blocks = BasicBlockVec::with_capacity_in(1, env.heap);
59-
blocks.push(BasicBlock {
60-
params: Interned::empty(),
61-
statements: Vec::new_in(env.heap),
62-
terminator: Terminator {
63-
span,
64-
kind: TerminatorKind::Unreachable,
65-
},
66-
});
67-
let basic_blocks = BasicBlocks::new(blocks);
68-
69-
Body {
70-
id,
71-
span,
72-
return_type: TypeBuilder::spanned(span, env).unknown(),
73-
source: Source::Intrinsic(Intrinsic {
74-
id: IntrinsicId::EntityPropertyAccess,
75-
optimize: false,
76-
}),
77-
local_decls,
78-
basic_blocks,
79-
args: 2,
80-
}
81-
}

0 commit comments

Comments
 (0)