4ee6a66270
The change in [0] increased the language version of pkg/dart2wasm. That in return changes how the package is formatted by the autoformatter. This CL runs now the formatter to re-format the code. Unfortunately this makes blame lists worse. But not doing it will make us have to disable auto-formatting before saving files which is very annoying. [0] https://dart-review.googlesource.com/c/sdk/+/487944 Change-Id: I6953fe0d6a824b2b79a26bbadb0bb977cec70b7a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490821 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
28 lines
902 B
Dart
28 lines
902 B
Dart
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// functionFilter=main
|
|
// compilerOption=--no-minify
|
|
// compilerOption=--enable-experimental-wasm-interop
|
|
|
|
import 'dart:_wasm';
|
|
|
|
@pragma('wasm:import', 'foo.mem')
|
|
@pragma('wasm:memory-type', MemoryType(limits: Limits(1)))
|
|
external Memory get memory;
|
|
|
|
@pragma('wasm:never-inline')
|
|
void main() {
|
|
memory.size;
|
|
memory.grow(1);
|
|
print(memory.loadFloat32(0, align: 2).toDouble());
|
|
print(memory.loadFloat32(0, align: 2).toDouble());
|
|
print(memory.loadFloat64(0, align: 3).toDouble());
|
|
|
|
print(memory.loadFloat32(0, offset: 1, align: 2).toDouble());
|
|
print(memory.loadFloat32(0, align: 2, offset: 1).toDouble());
|
|
|
|
memory.storeInt32(memory.size, WasmI32.fromInt(32), offset: 10);
|
|
}
|