Commit graph

100 commits

Author SHA1 Message Date
Brett Morgan
740cd89ad8 Fix link markup in ffi README
Closes #39196
https://github.com/dart-lang/sdk/pull/39196

GitOrigin-RevId: 0a3c0cf7fb3abd496fc54c018e5603a79c767a17
Change-Id: I67d5e0a3408e24bd732a0c8f2d1f4674965acf99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123691
Reviewed-by: Michael Thomsen <mit@google.com>
2019-11-04 09:31:27 +00:00
Daco Harkes
75bee2083a [samples/ffi] Add bitfield sample
Issue: https://github.com/dart-lang/sdk/issues/38954
Change-Id: I04b2b81d83a19c5ff88d4364256b23594fe2139b
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122762
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-24 17:40:27 +00:00
Daco Harkes
e4f7893545 [samples/ffi] Fix samples and run them as test - fix status file
Follow up of: https://dart-review.googlesource.com/c/sdk/+/122382.

Change-Id: I366f24d2330aa4743bcec3598321ff54b00ac25e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122763
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-10-24 15:57:44 +00:00
Daco Harkes
aa36c1fbc5 [samples/ffi] Fix samples and run them as test
Change-Id: I49eeba32d99c9cf916d25150b46fa6d74ece0092
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122382
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-23 22:20:37 +00:00
Sam Rawlins
4f0c8cba56 Add README for samples/sample_extension
Bug: https://github.com/dart-lang/sdk/issues/35839
Change-Id: I35fe0d5b6be7ead081e164ddce2f8dc8e273158a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122160
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-10-18 15:33:06 +00:00
Daco Harkes
d82ca1a9c7 [vm/ffi] Remove Struct type argument
This has coupled changes in package:ffi and package:tflite_native which are pinned in DEPS.

This CL includes the required analyzer changes from https://dart-review.googlesource.com/c/sdk/+/121647.

Issue: https://github.com/dart-lang/sdk/issues/38611

Change-Id: I712a886fd28ce0a2954fc42c90e1dfa495057732
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,dart-sdk-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121422
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-15 18:35:57 +00:00
Samir Jindel
4ee5ef9f10 [vm/ffi] Use Pointer<Null> as the type of nullptr.
Also clean up test/benchmark/sample code using nullptr and fix pubspec.yaml in the SQLite sample.

Fixes https://github.com/dart-lang/sdk/issues/37362

Change-Id: I6fa0522374af28020ef8f096ac22b23712aedb5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121122
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-11 14:39:47 +00:00
Samir Jindel
8859206dba [vm/ffi] Remove Pointer.offsetBy.
Fixes https://github.com/dart-lang/sdk/issues/35883

Change-Id: Idf4b113d655a6cf7063f1ee7732ddd2001247dee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121124
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-10-10 15:44:27 +00:00
Samir Jindel
63d3012e68 [vm/ffi] Deprecate Pointer.allocate/free.
Fixes https://dart-review.googlesource.com/c/sdk/+/118442.

Also updates untested sample code in samples/ffi.

Change-Id: Id40a7b8fbb35c5d989269646ebb22864cebcfcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118441
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-10 13:17:43 +00:00
Daco Harkes
ee0b1df4a6 [vm/ffi] Migrate tests/samples/benchmarks to extension methods
I used the regex replaces documented on the `load` and `store` deprecated methods.
I manually replaced some `.val` to `.ref` when a regex could not detect whether something was a primitive value or a struct.

Issue: https://github.com/dart-lang/sdk/issues/37773

Change-Id: I3534b6dd00d9ac45fa1a11fe75c80fb3cccc07dc
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118993
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-10-08 16:49:41 +00:00
Robert Nystrom
89ad636b58 Remove the old "preview Dart 2" flags from the test runner.
Dart 2 shipped a year ago, so we're pretty well past a "preview". :)

Change-Id: I6c5d21ae4181e4228cc1fc49b6344cdb8fc43794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115544
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-09-05 16:59:43 +00:00
djpnewton
8678df0c4d ffi example: android.md - fix example code
gradle does not expand variables if the string has single quotes

Closes #37516
https://github.com/dart-lang/sdk/pull/37516

GitOrigin-RevId: ec4cfb0e7cf56d9ec5eb613ce56d553cf44e9bb6
Change-Id: I07eb51bfdbd6a32f2739d2ff7a0882280aec40a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108941
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-07-14 23:10:15 +00:00
Samir Jindel
7acecda2cc [vm/ffi] Fix FFI Utf8 example.
Change-Id: Ic6c93c94f1187595b0dab2c912ebf4851ac85fe5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108406
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-07-09 11:37:44 +00:00
Samir Jindel
fc6cb0ac21 [vm/ffi] Revamp struct representation in FFI.
See dartbug.com/37229 for details.

Change-Id: I63490e41c512ffc9312803985a6f6d4be1586c0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101291
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-02 23:12:13 +00:00
Alexander Markov
1eb113ba27 [vm/bytecode] Support native extensions
Change-Id: I224f740db674e20d643191605d0a7463bf85d39f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107451
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-06-27 20:24:25 +00:00
Nate Bosch
cf03e96b90 Remove appJit and precompiled compiler options
Towards #37318

- appJit has been replaced by appJitk and is no longer.
- precompiled has been replaced by dartkp and is no longer used.
- For the precompiled runtime, default to dartkp.
- Remove status file references to these compiler options and normalize
  status files.

Change-Id: I48728db13dc84737092a92314e2f474a9309f4d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106942
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-06-24 16:07:27 +00:00
Nate Bosch
2b56c2c58a Normalize status files
Run `pkg/status_file/bin/normalize.dart` across all status files.

This should solve most presubmit warnings about "existing and possibly
new status file issues".

There are remaining issues in pkg/front_end/testcases/strong.status and
pkg/front_end/testcases/text_serialization.status which will need to be
fixed manually.

Change-Id: Iceae8992c4907442481590d75c1b0a84ce29521b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106726
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2019-06-19 23:04:01 +00:00
Daco Harkes
04c1a2886f [vm/ffi] SimDBC64 align stack frame
And regression test for dartbug.com/37069

Fixes: https://github.com/dart-lang/sdk/issues/37176
Follow up of: https://dart-review.googlesource.com/c/sdk/+/103814
Bug: https://github.com/dart-lang/sdk/issues/37069
Change-Id: I066561b487c691952496e2ca6878ac82cee0e02e
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-reload-mac-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105941
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-06-13 16:26:40 +00:00
Samir Jindel
68b2d53da5 Revert "[vm/ffi] SimDBC64 align stack frame"
This reverts commit f1038ee771.

Reason for revert: breaks function_gc_test on ARM64

Original change's description:
> [vm/ffi] SimDBC64 align stack frame
> 
> And regression test for dartbug.com/37069
> 
> Fixes: https://github.com/dart-lang/sdk/issues/37176
> Follow up of: https://dart-review.googlesource.com/c/sdk/+/103814
> Bug: https://github.com/dart-lang/sdk/issues/37069
> Change-Id: I2c791271f936580d66a48485a60ab6cddb1ba4f8
> Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-reload-mac-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104824
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>

TBR=sjindel@google.com,dacoharkes@google.com

Change-Id: Ibefa2e854f4a58b41384aca73a3bbbe86d75bf80
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37069
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try, vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105840
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-06-12 22:31:11 +00:00
Daco Harkes
f1038ee771 [vm/ffi] SimDBC64 align stack frame
And regression test for dartbug.com/37069

Fixes: https://github.com/dart-lang/sdk/issues/37176
Follow up of: https://dart-review.googlesource.com/c/sdk/+/103814
Bug: https://github.com/dart-lang/sdk/issues/37069
Change-Id: I2c791271f936580d66a48485a60ab6cddb1ba4f8
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, app-kernel-linux-debug-x64-try, vm-kernel-linux-debug-simdbc64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-reload-mac-debug-simdbc64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104824
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-06-12 16:25:34 +00:00
Daco Harkes
e7f7984995 [doc/ffi] Fix CString implementation in dart:ffi sample
Change-Id: I3dcb9fefe3d13f21da1c923dd69cc2a994ccf51e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103128
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-05-21 08:53:08 +00:00
Zichang Guo
7b893ce825 Check return value from Dart_PostCObject() in sample extension
Improve the sample code to check Dart_PostCobject(). It prevents
possible VM hangs when users sent invalid messages and add error
messages.

Bug: https://github.com/dart-lang/sdk/issues/35647
Change-Id: Ib0e752c063b0f6c14385de06000f6195c3caf530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98743
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-12 19:34:50 +00:00
Samir Jindel
991c9da720 [vm/ffi] Add copyright headers to sqlite example and incorporate Michael's feedback.
Change-Id: I83555a81bb6394a8c2a740a5127175be85aabf3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98007
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-03-27 14:11:17 +00:00
Samir Jindel
7a15b02935 [vm/ffi] Add demo docs for using FFI on Android.
Change-Id: I0cc753ba9f8b2880634696a07dd4bac57df9c491
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97937
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-03-27 13:16:46 +00:00
Samir Jindel
f3fd1943fc [vm/ffi] Update status file for FFI sqlite sample.
Change-Id: Id7d95aa54ad0a23cd84925aca92d06f63279ddd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97938
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-03-26 15:49:45 +00:00
Samir Jindel
28a2416320 Fix sqlite sample import.
Change-Id: I71bde1d7f15912a628e15572b51350bb768c78c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97935
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-03-26 14:47:15 +00:00
Daco Harkes
f135a49861 [doc] dart:ffi SQLite sample
Issue: https://github.com/dart-lang/sdk/issues/35775

Change-Id: I2ce86c554ffd6f49050cf63ead60809c08fb02e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97504
Reviewed-by: Michael Thomsen <mit@google.com>
2019-03-26 14:46:09 +00:00
Daco Harkes
a43c525de2 Reland "[vm/ffi] Support Windows 64 bit"
Enables dart:ffi on Windows 64 bit.

Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138

Relanding: Fixed compilation on Android.

Closes: https://github.com/dart-lang/sdk/issues/35771
Change-Id: I7d0c8b64ca8c1726b7d264d4fd9213299a9f7df6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96781
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-03-13 11:47:37 +00:00
Vyacheslav Egorov
23eb57c2bf Revert "[vm/ffi] Support Windows 64 bit"
This reverts commit 7f812dea1a.

Reason for revert: Flutter build is broken on Golem.

Original change's description:
> [vm/ffi] Support Windows 64 bit
> 
> Enables dart:ffi on Windows 64 bit.
> 
> Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138
> 
> Closes: https://github.com/dart-lang/sdk/issues/35771
> Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com,dacoharkes@google.com

Change-Id: I5be4538e3c99632a852e4dfb856248eb437fb3ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-03-12 19:55:17 +00:00
Daco Harkes
7f812dea1a [vm/ffi] Support Windows 64 bit
Enables dart:ffi on Windows 64 bit.

Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138

Closes: https://github.com/dart-lang/sdk/issues/35771
Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-12 17:30:26 +00:00
Samir Jindel
a5d396cd25 [vm/extensions] Fix native extensions in hot-reload and running from snapshot.
This is a re-land of "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."

The native extension test was failing in hot-reload: this has been fixed.

Change-Id: Ic18da8cfbc6a3dba8aac09d654dce616487a67d7
Reviewed-on: https://dart-review.googlesource.com/c/92800
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-02-14 17:47:28 +00:00
Daco Harkes
3abc7d34d7 [vm/ffi] Remove platform specific logic from DynamicLibrary.open
Change-Id: Id69e17563c4d64f6ead5e143077a7364520f65a0
Reviewed-on: https://dart-review.googlesource.com/c/93173
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-02-14 16:08:28 +00:00
Daco Harkes
7d46d4b5cb [vm / library] Foreign function interface prototype
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13


issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-02-13 12:42:47 +00:00
Samir Jindel
754e5f404c Revert "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."
This reverts commit 4118d3c793.

Crashes on hot reload/rollback bots.

Original change's description:
> [vm/extensions] Fix Loader::ReloadNativeExtensions(...).
> 
> This method was not doing anything since the switch to Dart 2
> because extensions no longer were added as imports to the libraries
> which loaded them.
> 
> This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.
> 
> Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
> Reviewed-on: https://dart-review.googlesource.com/c/92180
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,sjindel@google.com

Change-Id: If8c8d6cf8ee2cb0a354601f94c609d3d7b5ddf03
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/92640
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-02-11 18:16:21 +00:00
Samir Jindel
4118d3c793 [vm/extensions] Fix Loader::ReloadNativeExtensions(...).
This method was not doing anything since the switch to Dart 2
because extensions no longer were added as imports to the libraries
which loaded them.

This is a commandeer of https://dart-review.googlesource.com/c/sdk/+/90240 with a bug fix.

Change-Id: Idfe2ec16ae714b5a31ed53332da6704248949915
Reviewed-on: https://dart-review.googlesource.com/c/92180
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-11 16:52:20 +00:00
Ryan Macnak
49142b49e7 Revert "[gardening] mark sample_extension_test as error"
This reverts commit 679108ea7b.

Revert "Update 'samples/sample_extension' to Dart 2"

This reverts commit fba5a58b47.

Reason for revert: Broken app-kernel and app-reload bots

TBR=asiva@google.com,kathyw@google.com

Change-Id: I690694ec974fa316b25934a1f0f62b5e665a28ba
Reviewed-on: https://dart-review.googlesource.com/c/86800
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-12-10 19:37:33 +00:00
Stevie Strickland
679108ea7b [gardening] mark sample_extension_test as error
sample_extension/test/sample_extension_test is still a RuntimeError on
dartk for now (see commentary on #33711).

Change-Id: I55ec54fa8c8ff2ebb42409a38cc216a2e7faeb2a
Reviewed-on: https://dart-review.googlesource.com/c/86763
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Auto-Submit: Stevie Strickland <sstrickl@google.com>
2018-12-10 17:31:57 +00:00
Patrice Chalin
fba5a58b47 Update 'samples/sample_extension' to Dart 2
- Ran `dartfmt --fix`
- Fixed Dart 2 type errors
- Other misc cleanup (to conform to Effective Dart)

Contributes to https://github.com/dart-lang/site-www/issues/980

cc @a-siva @kwalrath @kevmoo

Closes #33711
https://github.com/dart-lang/sdk/pull/33711

GitOrigin-RevId: a832220272fe50a8bd96c6bc71692d54dcbf9465
Change-Id: Ia542ce073d2f9a4c78934a74ee17b60156a49d25
Reviewed-on: https://dart-review.googlesource.com/c/63260
Commit-Queue: Kathy Walrath <kathyw@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-12-09 03:34:04 +00:00
Ryan Macnak
2f25dcda16 [vm] Remove script snapshots.
Change-Id: I5bc692b754c0909de4aa5f05af81b074578b16f4
Reviewed-on: https://dart-review.googlesource.com/76706
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-26 22:49:27 +00:00
asiva
355c73d4ee [VM] Remove support for option --no-preview-dart-2
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2

Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-09-24 20:38:08 +00:00
Zach Anderson
d0510501d2 [build] Add -a kbc for interpreter
This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:

$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2

Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-07-17 21:51:41 +00:00
Peter von der Ahé
cc1a7b35d0 Update SDK wrt to void and invalid returns
Change-Id: Ia1a6b056351beb9faddc2c6e86280983a2395d45
Reviewed-on: https://dart-review.googlesource.com/65140
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-07-17 13:37:47 +00:00
Devon Carew
d1bf825c0f Remove some broad dart2analyzer status file exclusions.
Change-Id: Ibbcfa13b572bd02a821da1150d673b438c7ab504
Reviewed-on: https://dart-review.googlesource.com/64760
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-13 04:20:21 +00:00
Devon Carew
fcde5ca4c4 Remove old samples.
Change-Id: I07773e6d9095c17f6ad4ed223d456838ddf122b5
Reviewed-on: https://dart-review.googlesource.com/64700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-12 16:11:03 +00:00
Ryan Macnak
dbd1b2f533 [test] Reload harness now reloads from, e.g. the URI of a snapshot or kernel file instead of the URI of the source from which it was derived.
Change-Id: I6652c6594532e911e68eb29904a9e95927910ee0
Reviewed-on: https://dart-review.googlesource.com/64665
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-07-12 00:46:01 +00:00
Martin Kustermann
92c24a1ee7 Skip sample_extension_app_snapshot_test on opt-counter-threshold builders
Change-Id: Ia7ae955cc16995a1dd0917142e56309ec6b060ca
Reviewed-on: https://dart-review.googlesource.com/60964
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-06-19 16:02:37 +00:00
Martin Kustermann
b024432a29 [VM] Disable test in reload/rollback mode due to snapshot generation
This should fix the vm-linux-release-x64-reload-be builder.

Change-Id: I24f4d53ff0859fc617913afa8e1a508a0457b137
Reviewed-on: https://dart-review.googlesource.com/60926
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-19 14:24:15 +00:00
asiva
6fcc95d2a4 Adjust status files.
Change-Id: Ia94c7477b73ae1f5fa90ffa072436355fcbacf0e
Reviewed-on: https://dart-review.googlesource.com/60830
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-19 03:38:20 +00:00
asiva
a69d922794 Adjust some of the test expectations based on the flip to Dart 2 mode.
Change-Id: I84491b161959050b3fab2493f125ab23c8078ec4
Reviewed-on: https://dart-review.googlesource.com/60823
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-19 00:04:57 +00:00
asiva
bc7220a4fd [VM] Turn dart2 on by default on the command line VM
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations

Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-18 22:31:32 +00:00