Dart - fix flex-builder compilation error (#6722)

* Dart - fix flex-builder compilation error

* DartTest.sh - run all tests
This commit is contained in:
Ivan Dlugos 2021-07-09 18:53:27 +02:00 committed by GitHub
parent 089f48a4a6
commit 838c93b843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -559,12 +559,13 @@ class _StackValue {
BitWidth elementWidth(int size, int index) { BitWidth elementWidth(int size, int index) {
if (ValueTypeUtils.isInline(_type)) return _width; if (ValueTypeUtils.isInline(_type)) return _width;
final offset = offsetLoc - _offset!; final offset = _offset!;
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
final width = 1 << i; final width = 1 << i;
final offsetLoc = final bitWidth = BitWidthUtil.uwidth(size +
size + BitWidthUtil.paddingSize(size, width) + index * width; BitWidthUtil.paddingSize(size, width) +
final bitWidth = BitWidthUtil.uwidth(offset); index * width -
offset);
if (1 << bitWidth.index == width) { if (1 << bitWidth.index == width) {
return bitWidth; return bitWidth;
} }
@ -643,6 +644,7 @@ class _StackValue {
class _StackPointer { class _StackPointer {
int stackPosition; int stackPosition;
bool isVector; bool isVector;
_StackPointer(this.stackPosition, this.isVector); _StackPointer(this.stackPosition, this.isVector);
} }

View File

@ -27,7 +27,7 @@ cd ../dart
# update packages # update packages
dart pub get dart pub get
# Execute the sample. # Execute the sample.
dart test/flat_buffers_test.dart dart test
# cleanup # cleanup
rm ../dart/test/monsterdata_test.mon rm ../dart/test/monsterdata_test.mon