Uh oh!
There was an error while loading. Please reload this page.
[cdac] Read/store globals from contract descriptor - #101450
Conversation
Tagging subscribers to this area: @tommcdon |
| value = pointerData[value].Value; | ||
| } | ||
| globals[name] = (value, global.Type); |
There was a problem hiding this comment.
This is just using the (optional) type string for now. I expect we'll do some mapping that isn't just string-based once we also read in the types.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
a6c9402 to
03ab101CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Uh oh!
There was an error while loading. Please reload this page.
lambdageek
left a comment
There was a problem hiding this comment.
Mostly LGTM
- I'm not sure we want to do global type validation on every read. But it doesn't seem like we have enough info to know if there's a better place to do it in contracts. ok for now.
- nit: I like validation methods in unit tests to include the name of the failing test (and possibly line info) of the actual test, not just the validation method, right in the message, not only in the stack trace
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
- Map indirect global values to corresponding values in `pointer_data` array from contract descriptor - Add `[Try]Read<T>`, `[Try]ReadPointer`, `[Try]ReadGlobal<T>` and `[Try]ReadGlobalPointer` to `Target` - Make cDAC implementation of `ISOSDacInterface9.GetBreakingChangeVersion` read value from globals - Create test helpers for mocking out reading from the target and providing a contract descriptor for different bitness/endianness - Add unit tests for reading global values (direct and indirect)
- Map indirect global values to corresponding values in `pointer_data` array from contract descriptor - Add `[Try]Read<T>`, `[Try]ReadPointer`, `[Try]ReadGlobal<T>` and `[Try]ReadGlobalPointer` to `Target` - Make cDAC implementation of `ISOSDacInterface9.GetBreakingChangeVersion` read value from globals - Create test helpers for mocking out reading from the target and providing a contract descriptor for different bitness/endianness - Add unit tests for reading global values (direct and indirect)
pointer_dataarray from contract descriptor[Try]Read<T>,[Try]ReadPointer,[Try]ReadGlobal<T>and[Try]ReadGlobalPointertoTargetISOSDacInterface9.GetBreakingChangeVersionread value from globalsContributes to #99298