6 Commits

Author SHA1 Message Date
Timm Baeder
048bc67276
[clang][bytecode] Start implementing fixed point types (#110216)
Add the primitive type and implement to-bool casts.
2024-09-27 11:32:43 +02:00
Timm Baeder
83fea8b809
[clang][bytecode] Allow continuing when discarded MemberExpr Base fails (#107231)
We don't need the value in this case, since we're discarding it anyway.
Allow continuing the interpretation but note the side effect.
2024-09-07 09:33:27 +02:00
Timm Baeder
eef8116be1
[clang][bytecode] Only visit local variables if they have constant init (#107576)
See the comment I added for why this is weird. We might want to have a
different mechanism for this in the future.

Fixes https://github.com/llvm/llvm-project/issues/101801
2024-09-07 06:36:21 +02:00
Timm Baeder
ca148b2150
[clang][bytecode] Support ObjC blocks (#104551)
I started out by adding a new pointer type for blocks, and I was fully
prepared to compile their AST to bytecode and later call them.

... then I found out that the current interpreter doesn't support
calling blocks at all. So we reuse `Function` to support sources other
than `FunctionDecl`s and classify `BlockPointerType` as `PT_FnPtr`.
2024-08-20 06:08:53 +02:00
Timm Baeder
f620c5b692
[clang][bytecode] Classify 1-bit unsigned integers as bool (#104662)
This happens for enum types with bool parent types. isBooleanType()
returns false for them however.

The previous version did the same thing by re-classifying the enum
integer type, but that breaks with forward-declared enums.
2024-08-17 22:06:46 +02:00
Timm Baeder
a07aba5d44
[clang] Rename all AST/Interp stuff to AST/ByteCode (#104552)
"Interp" clashes with the clang interpreter and people often confuse
this.
2024-08-16 17:13:12 +02:00