diff options
| author | Yong He <yonghe@outlook.com> | 2022-08-24 10:56:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-24 10:56:53 -0700 |
| commit | d245c72f2a92a74ccda83f41758c1948ae5132d3 (patch) | |
| tree | f036e1f2afb7febe2de9b09990bcde6c04f3bad1 /source/slang/slang-emit-c-like.cpp | |
| parent | 0b808453407f8feef8574cae99afd90771712185 (diff) | |
Compiler time evaluation of all int and bool operators. (#2376)
* Compiler time evaluation of all int and bool operators.
* Fix linux compile error.
* Fix.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index e98c8c6f3..7a7951ba1 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -3381,6 +3381,17 @@ void CLikeSourceEmitter::ensureInstOperandsRec(ComputeEmitActionsContext* ctx, I case kIROp_NativePtrType: requiredLevel = EmitAction::ForwardDeclaration; break; + case kIROp_lookup_interface_method: + case kIROp_FieldExtract: + case kIROp_FieldAddress: + { + auto opType = inst->getOperand(0)->getDataType(); + if (auto nativePtrType = as<IRNativePtrType>(opType)) + { + ensureInstOperand(ctx, nativePtrType->getValueType(), requiredLevel); + } + break; + } default: break; } |
