diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2018-09-19 15:27:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-19 15:27:50 -0400 |
| commit | 653fe976af88fcf86162ca5bb1b46d4378864572 (patch) | |
| tree | 882307a3377e6a4587231721d681daa061a56c78 /source/slang/bytecode.cpp | |
| parent | a37b3539d94c434c5d74ab524eae2988e48e0756 (diff) | |
Support for IRStringLit (#645)
* * Added support for strings in IR with IRStringLit - with storage of chars after it
* Added kIRDecorationOp_Transitory - can be used for detecting instructions constructed on stack
* Made IRConstant hashing work off type
* Fix comment that is out of date about how an instruction is determines to hold a transitory string.
Diffstat (limited to 'source/slang/bytecode.cpp')
| -rw-r--r-- | source/slang/bytecode.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/bytecode.cpp b/source/slang/bytecode.cpp index 63af9512a..b92476cb1 100644 --- a/source/slang/bytecode.cpp +++ b/source/slang/bytecode.cpp @@ -382,7 +382,7 @@ void generateBytecodeForInst( // TODO: probably want distinct encodings // for signed vs. unsigned here. - encodeUInt(context, UInt(ii->u.intVal)); + encodeUInt(context, UInt(ii->value.intVal)); // destination: encodeOperand(context, inst); @@ -397,7 +397,7 @@ void generateBytecodeForInst( static const UInt size = sizeof(IRFloatingPointValue); unsigned char buffer[size]; - memcpy(buffer, &cInst->u.floatVal, sizeof(buffer)); + memcpy(buffer, &cInst->value.floatVal, sizeof(buffer)); for(UInt ii = 0; ii < size; ++ii) { @@ -413,7 +413,7 @@ void generateBytecodeForInst( { auto ii = (IRConstant*) inst; encodeUInt(context, ii->op); - encodeUInt(context, ii->u.intVal ? 1 : 0); + encodeUInt(context, ii->value.intVal ? 1 : 0); // destination: encodeOperand(context, inst); @@ -962,7 +962,7 @@ BytecodeGenerationPtr<BCModule> generateBytecodeForModule( case kIROp_IntLit: { auto ptr = allocate<IRIntegerValue>(context); - *ptr = irConstant->u.intVal; + *ptr = irConstant->value.intVal; bcConstants[cc].ptr = ptr.bitCast<uint8_t>(); } break; |
