Commit Graph

58 Commits

Author SHA1 Message Date
Alexander Aprelev 95f5efc697 [vm/concurrent] Use ffi native resolver for dart:concurrent native functions.
Ffi native interface should be faster, more effecient for Dart->C++ communication, so switching to it.
TEST=ci

Change-Id: I9e1d18a666737799194c0435c300e4b81783c0ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377541
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-07-26 19:26:11 +00:00
Alexander Aprelev d2bc055651 [vm/shared] Add 'dart:concurrent' core library.
This brings Mutex and ConditionVariable classes to guard access to shared variables.

TEST=shared_test, shared_primitives_test
BUG=https://github.com/dart-lang/sdk/issues/55991
CoreLibraryReviewExempt: dart:concurrent library is experimental, restricted to main/dev channels, vm-only at this point.
Change-Id: I64ca7a0434cbe0079976133ccbf9de2dd4c0d7b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372181
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-07-10 19:45:29 +00:00
Ryan Macnak 2d0e514583 Update clang to 0f61051f541a5b8cfce25c84262dfdbadb9ca688.
Account for new -Werror,-Wcast-function-type-mismatch.

Re-run clang-format.

TEST=ci
Change-Id: I70d30548cf2e2f86b3d654962f0e73561b6e6de2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363722
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-04-19 19:46:47 +00:00
Daco Harkes e5bb28bc4d [vm/ffi] Pointer.asTypedList finalizer
TEST=tests/ffi/external_typed_data_finalizer_test.dart

Closes: https://github.com/dart-lang/sdk/issues/50507
CoreLibraryReviewExempt: https://github.com/dart-lang/sdk/issues/52261
Change-Id: I1a82dcca15961b28c0de64637970fe38a39286e5
Cq-Include-Trybots: luci.dart.try:vm-asan-linux-release-x64-try,vm-aot-asan-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-qemu-linux-release-arm-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-aot-win-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-aot-mac-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301001
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-05-10 11:38:57 +00:00
Ryan Macnak f9a6a5bdd2 [vm] Update NULL to nullptr in runtime/vm.
TEST=build
Change-Id: I2834ef7cf7cb7c8770f8167a2438cbedcee5c623
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292063
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-04-10 18:15:12 +00:00
Daco Harkes 532c116cd2 [vm] Implement NativeFinalizer
This CL implements `NativeFinalizer` in the GC.

`FinalizerEntry`s are extended to track `external_size` and in which
`Heap::Space` the finalizable value is.

On attaching a native finalizer, the external size is added to the
relevant heap. When the finalizable value is promoted from new to old
space, the external size is promoted as well. And when a native
finalizer is run or is detached, the external size is removed from the
relevant heap again.

In contrast to Dart `Finalizer`s, `NativeFinalizer`s are run on isolate
shutdown.

When the `NativeFinalizer`s themselves are collected, the finalizers are
not run. Users should stick the native finalizer in a global variable to
ensure finalization. We will revisit this design when we add send and
exit support, because there is a design space to explore what to do in
that case. This current solution promises the least to users.

In this implementation native finalizers have a Dart entry to clean up
the entries from the `all_entries` field of the finalizer. We should
consider using another data structure that avoids the need for this Dart
entry. See the TODO left in the code.

Bug: https://github.com/dart-lang/sdk/issues/47777

TEST=runtime/tests/vm/dart(_2)/isolates/fast_object_copy_test.dart
TEST=runtime/vm/object_test.cc
TEST=tests/ffi(_2)/vmspecific_native_finalizer_*

Change-Id: I8f594c80c3c344ad83e1f2de10de028eb8456121
Cq-Include-Trybots: luci.dart.try:vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-ffi-android-debug-arm64c-try,dart-sdk-mac-arm64-try,vm-kernel-mac-release-arm64-try,pkg-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-win-debug-x64c-try,vm-kernel-win-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,vm-kernel-nnbd-win-release-ia32-try,vm-ffi-android-debug-arm-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-mac-debug-x64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,benchmark-linux-try,flutter-frontend-try,pkg-linux-debug-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-gcc-linux-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236320
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-03-26 09:41:21 +00:00
Ryan Macnak e5bc0f0b86 [vm] Make various arrays const.
TEST=build
Change-Id: I8d3445b87caa979472c9a37df62507f152a4aefb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203202
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-06-14 20:45:18 +00:00
Liam Appelbe 504e9a32f9 Reland "[wasm] Remove dart:wasm"
This is a reland of ade333dd54

Original change's description:
> [wasm] Remove dart:wasm
>
> I'm not entirely sure why I had to modify a random set of fingerprints
> in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
> build it had some fingerprint errors.
>
> Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
> TEST= Deleting stuff, so not really necessary
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: I0d1388f6312358cc62bb32f5ac7b88a3187223c9
TEST= Deleting stuff, so not really necessary
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171940
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-11-13 20:40:24 +00:00
Siva Annamalai 54a91f26c4 Revert "[wasm] Remove dart:wasm"
This reverts commit ade333dd54.

Reason for revert: This broke both the Flutter HHH and Google3 bots. It looks like some co-ordination is required between the Google3 and Flutter engine build changes for this CL to land.

Original change's description:
> [wasm] Remove dart:wasm
>
> I'm not entirely sure why I had to modify a random set of fingerprints
> in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
> build it had some fingerprint errors.
>
> Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
> TEST= Deleting stuff, so not really necessary
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I244d7b3549845dd71719176a62b6ec3a4c4b5f86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171860
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-13 01:54:10 +00:00
Liam Appelbe ade333dd54 [wasm] Remove dart:wasm
I'm not entirely sure why I had to modify a random set of fingerprints
in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
build it had some fingerprint errors.

Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
TEST= Deleting stuff, so not really necessary
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-11-12 19:22:29 +00:00
Ryan Macnak 9e5dbadc73 [vm] Use consistent signatures for native call wrappers and native function symbolizers.
Bug: https://github.com/dart-lang/sdk/issues/39427
Change-Id: I0d52d935c15f4d01d56e5e99bc4b83b31678a6ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146940
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-05-07 16:16:08 +00:00
Ryan Macnak 830f291773 [vm] Use a wrapper for bootstrap natives too.
-80k (-0.33%) out/ProductX64/exe.stripped/dart
-76k (-1.59%) out/ProductX64/exe.stripped/dart_precompiled_runtime

Change-Id: Ib19aea40aa7a556ae90852ac30c8c08ce0a8b677
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125306
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-11-18 19:54:53 +00:00
asiva 4b6ab33cfa [SDK] Reland: Remove dart:profiler library which has been deprecated since Dart 1.2
and remove all references to it in tests and the SDK build scripts.

Change-Id: I728770c460042596ddd14efecdc52bcf0580f592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117584
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-09-17 23:19:20 +00:00
David Morgan 54b95f1c8b Revert "[SDK] Remove dart:profiler library which has been deprecated since Dart 1.2"
This reverts commit 6f85cb83cf.

Reason for revert: CFE built before this CL breaks with dill built after; it expects dart:profiler to be present in the dill.

Original change's description:
> [SDK] Remove dart:profiler library which has been deprecated since Dart 1.2
>       and remove all references to it in tests and the SDK build scripts.
> 
> Change-Id: I65a4d71b74c66ca090eba28e922e2f70a7b2989d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114965
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I5fec5c7aec55377ba5cba0b55a25e67682220276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115242
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-09-03 14:26:26 +00:00
asiva 6f85cb83cf [SDK] Remove dart:profiler library which has been deprecated since Dart 1.2
and remove all references to it in tests and the SDK build scripts.

Change-Id: I65a4d71b74c66ca090eba28e922e2f70a7b2989d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114965
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-08-30 17:03:04 +00:00
Liam Appelbe 05c28c6115 Reland "Scaffolding for dart:wasm"
This reverts commit 9198813a55.

Reason for revert: Relanding with a fix

Original change's description:
> Revert "Scaffolding for dart:wasm"
> 
> This reverts commit f39a3f188e.
> 
> Reason for revert: https://golem.corp.goog/BuildInfo?target=flutter-profile&machine-type=android-armv7&revision=84750
> 
> Original change's description:
> > Scaffolding for dart:wasm
> > 
> > This CL doesn't have any tests because it's just boilerplate. I'll
> > add a test in the follow up CLs where I add actual functionality.
> > 
> > Bug: https://github.com/dart-lang/sdk/issues/37882
> > Change-Id: I47c81f5f1be724f8226e756ba5d01880a45f1ac7
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112841
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Liam Appelbe <liama@google.com>
> > Commit-Queue: Liam Appelbe <liama@google.com>
> 
> TBR=asiva@google.com,liama@google.com
> 
> Change-Id: I0fd0f29d66a07fc29e840ddaec2d4161c8d599cb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/37882
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114044
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: Idb43cbd3a0521776ac420bfef91c8a9a4362f18e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114757
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-28 23:11:21 +00:00
Liam Appelbe 9198813a55 Revert "Scaffolding for dart:wasm"
This reverts commit f39a3f188e.

Reason for revert: https://golem.corp.goog/BuildInfo?target=flutter-profile&machine-type=android-armv7&revision=84750

Original change's description:
> Scaffolding for dart:wasm
> 
> This CL doesn't have any tests because it's just boilerplate. I'll
> add a test in the follow up CLs where I add actual functionality.
> 
> Bug: https://github.com/dart-lang/sdk/issues/37882
> Change-Id: I47c81f5f1be724f8226e756ba5d01880a45f1ac7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112841
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I0fd0f29d66a07fc29e840ddaec2d4161c8d599cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114044
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-21 21:06:10 +00:00
Liam Appelbe f39a3f188e Scaffolding for dart:wasm
This CL doesn't have any tests because it's just boilerplate. I'll
add a test in the follow up CLs where I add actual functionality.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I47c81f5f1be724f8226e756ba5d01880a45f1ac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112841
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-08-21 19:55:04 +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
Ryan Macnak 7514ce941e [vm] Assert handles are only allocated when the thread is preventing safepoints.
Threads in the native or blocked states don't prevent safepoints, so they may run concurrently with a safepoint operation like GC. It is not safe for handles to be allocated while the GC is visiting them, so these threads must not allocate handles. Assert only threads in the VM or generated states, which prevent safepoints until they check in, may allocate handles. (Generated code does not allocate handles, but leaf runtime entries remain in the generated state.)

Bug: https://github.com/dart-lang/sdk/issues/34883
Change-Id: I1a211778f7ef96b53a2405f0ee9dde7871b122b6
Reviewed-on: https://dart-review.googlesource.com/c/81540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-31 19:51:52 +00:00
Régis Crelier 12b33ada44 [VM interpreter] Support NativeCall kernel bytecode.
Change-Id: I89c905d17fb48447239ee4b0c1c8c50060239b88
Reviewed-on: https://dart-review.googlesource.com/59560
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-13 23:30:44 +00:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Ryan Macnak f20b32b793 [vm] Enable mirrors in product mode. Allows building a product mode SDK.
Fixes https://github.com/dart-lang/sdk/issues/29972

R=zra@google.com

Review-Url: https://codereview.chromium.org/2972883002 .
2017-07-12 12:55:58 -07:00
Ryan Macnak 508e735b8f More ifdefs to make everything build at -O0 and without --gc-sections.
R=regis@google.com

Review-Url: https://codereview.chromium.org/2644163002 .
2017-01-19 12:16:48 -08:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
John McCutchan 8266501a72 Remove mirrors in product mode
(stripped) dart_product before: 5307888
(stripped) dart_product after: 5232976

Reduction in size: 74912 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1712843002 .
2016-02-22 09:55:20 -08:00
Florian Loitsch be025b8412 Revert "Remove deprecated dart:profiler library"
This reverts commit 535a9715ac.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1415843008 .
2015-11-04 01:59:53 +01:00
John McCutchan 535a9715ac Remove deprecated dart:profiler library
Fixes #24510

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1398433002 .
2015-10-07 10:01:33 -07:00
John McCutchan 150e8d2757 Move dart:_vmservice native entries into bootstrap natives
With this CL the dart:_vmservice library is made regular with respect to other dart: builtin libraries.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1390803002 .
2015-10-06 09:16:39 -07:00
John McCutchan af0ab36f7c Make dart:_vmservice a proper builtin library
- Drops custom resource table for sources.
- Stops loading dart:vmservice library by sources.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1387043002 .
2015-10-06 07:58:14 -07:00
johnmccutchan@google.com f01c1490f7 Revert 45783
BUG=

Review URL: https://codereview.chromium.org//1138993005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com 95515238cc Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1139503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
johnmccutchan@google.com 1f851efdbb Rename 'dart:debugger' to 'dart:developer'
- Rename 'dart:debugger' to 'dart:developer'
- Make 'breakHere' and 'breakHereIf' top level functions.

R=iposva@google.com

Review URL: https://codereview.chromium.org//1132113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45658 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 21:24:57 +00:00
johnmccutchan@google.com a19cd071e5 Add 'dart:debugger' library
- Add the 'dart:debugger' library.
- Add the 'Debugger' class.
- Add explicit Dart breakpoint triggered by a call to: Debugger.breakHere();
- Add Debugger.breakHereIf(bool expr)

R=hausner@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//1116263004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45529 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:05:37 +00:00
koda@google.com 1cdcb12b4e Add VM class for Map/LinkedHashMap.
Introduces a new internal class for the most common case, the default Map.

Passes all functionality tests.
Slow: Dart side simply calls into runtime for now.
Hidden behind "--use_internal_hash_map".

Add copies of hash map tests to exercise this implementation.

R=asiva@google.com

Review URL: https://codereview.chromium.org//380333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38588 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 20:04:11 +00:00
lrn@google.com cf8ac68c0d Make VM JSON parser parse doubles without doing substring.
R=fschneider@google.com

Review URL: https://codereview.chromium.org//385163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38155 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 12:14:23 +00:00
johnmccutchan@google.com 8f0056371d Initial UserTag and dart:profiler library
R=asiva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//230863005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34949 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 22:32:45 +00:00
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

Review URL: https://codereview.chromium.org//227433004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
lrn@google.com 0dbb989cb8 Add internal operation that converts a growable list to a fixed list.
The conversion breaks the original list, but doesn't copy data.
Currently only used in List.from(Iterable).

BUG= http://dartbug.com/9458
R=floitsch@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//134893003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32896 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 13:15:16 +00:00
asiva@google.com a576fec3c0 Allow the native resolver to setup whether it needs the Dart API scope to
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.

R=hausner@google.com, zra@google.com

Review URL: https://codereview.chromium.org//117723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +00:00
whesse@google.com 3b54950144 Remove dart:platform library.
This reverts commits r29154, r29244, r29251, r29268, and r29272.
The dart:io Platform class will not be moved to a dart:platform library.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//50573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29435 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 11:33:34 +00:00
ajohnsen@google.com 28efa85e19 Add empty dart:platform library.
dart:platform will be a library that contains information about the runtime
platform. While it's not written in stones, this is examples of properties that
may be queried:

- OS
- Browser
- Browser version
- Dart Version
- numberOfProcessors
- pathSeparator
- Native or JS VM

BUG=
R=ahe@google.com, asiva@google.com, floitsch@google.com, iposva@google.com, kasperl@google.com

Review URL: https://codereview.chromium.org//32683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29154 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 06:56:36 +00:00
asiva@google.com b4d9e0d620 Auto create ApiLocalScope before calling native functions, this ensures that
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.

Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.

R=regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//22303002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
asiva@google.com 2f7ca6843f Remove support for 'dart:scalarlist' in the Dart VM.
Review URL: https://codereview.chromium.org//13139002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20680 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-29 18:33:54 +00:00
asiva@google.com 3f14a14ee7 Implement 'dart:typeddata' directly in the VM instead of using 'dart:scalarlist'
Review URL: https://codereview.chromium.org//12544015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19656 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 21:50:33 +00:00
iposva@google.com b564104ea5 - Properly load the core libraries as libraries and not as scripts.
This will honor their imports and library names.
Review URL: https://codereview.chromium.org//12321082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19017 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:25:29 +00:00
srdjan@google.com 06cd4ed7b2 Fix native lookup. Fix external byte arrays.
Review URL: https://codereview.chromium.org//12033036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17478 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 17:43:58 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
iposva@google.com 7ae807a19c - Move MathNatives from dart:core to dart:math.
- Split out double and integer parsing from MathNatives.
Review URL: https://codereview.chromium.org//11316031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15032 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 19:42:02 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

Review URL: https://codereview.chromium.org//11365196

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00