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

View File

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