Timm Baeder
55d51dd9dc
[clang][bytecode] Fix temporary lvalue base expression ( #111808 )
...
We need to use the MaterializeTemporaryExpr here so the checks in
ExprConstant.cpp do the right thing.
2024-10-10 14:10:38 +02:00
Timm Baeder
95ce78b742
[clang][bytecode] Implement fixed-point-to-int casts ( #110417 )
...
And some cleanups around overflow handling.
2024-09-29 13:31:44 +02:00
Timm Baeder
6b62e04e30
[clang][bytecode] Implement (N)EQ between fixed point and integral ( #110358 )
...
Convert the non-fixed-point side to a fixed-point type before doing the
comparison.
2024-09-28 15:38:33 +02:00
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
3ea55d3cb0
[clang][bytecode] Add a source location to destructor calls ( #110121 )
...
The added test case is still diagnosed differently, but I'm not sure
which version is better.
2024-09-26 16:50:56 +02:00
Timm Baeder
3928edecfb
[clang][bytecode] Fix local destructor order ( #107951 )
...
Add appropriate scopes and use reverse-order iteration in
LocalScope::emitDestructors().
2024-09-10 06:26:46 +02:00
Timm Baeder
6f67c38684
[clang][bytecode] Fix a variable scope problem with continue/break jumps ( #107738 )
...
Cleaning up _all_ the scopes is a little too much. Only clean up until
the point here we started the scope relevant for the break/continue
statement.
2024-09-08 19:22:18 +02:00
Timm Baeder
78cf9b830c
[clang][bytecode] Implement using operator new/operator delete ( #107679 )
...
Reuse the __builtin_operator_{new,delete} implementations.
2024-09-07 12:17:54 +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
yronglin
67f9183c11
[clang][bytecode] Implement comparsion operators for vector type ( #107258 )
...
Implement ==, !=, <, <=, >, >= comparsion operators for vector type.
---------
Signed-off-by: yronglin <yronglin777@gmail.com>
2024-09-06 20:27:11 +08:00
Timm Baeder
0f5f440f24
[clang][bytecode] Pass FPOptions to floating point ops ( #107063 )
...
So we don't have to retrieve them from the InterpFrame, which is slow.
2024-09-03 14:24:11 +02:00
yronglin
ee0d706338
[clang][bytecode] Implement constexpr vector unary operators +, -, ~, ! ( #105996 )
...
Implement constexpr vector unary operators +, -, ~ and ! .
- Follow the current constant interpreter. All of our boolean operations
on vector types should be '-1' for the 'truth' type.
- Move the following functions from `Sema` to `ASTContext`, because we
used it in new interpreter.
```C++
QualType GetSignedVectorType(QualType V);
QualType GetSignedSizelessVectorType(QualType V);
```
---------
Signed-off-by: yronglin <yronglin777@gmail.com>
2024-08-29 06:10:30 +08: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
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