Commit Graph

12 Commits

Author SHA1 Message Date
Aart Bik c38e19cbbe [vm/compiler] bit utilities
Rationale:
Useful in the future when compiler wants to constant fold
operations related to leading/trailing/counting (non)zeros.

https://github.com/dart-lang/sdk/issues/38346

Change-Id: I158aca125d3a15019af20ca7c2a516b74e4d84c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-10-07 18:13:06 +00:00
Clement Skau f546362691 [SDK] Adds dart2exe to create standalone executables.
Tested:
  ./tools/build.py --arch x64 --mode release --verbose create_sdk copy_gen_kernel_snapshot copy_dart2aot
  ./tools/build.py --arch x64 --mode product --verbose copy_gen_snapshot copy_dartaotruntime
  cp -r out/ProductX64/dart-sdk/bin/{dartaotruntime,utils/} out/ReleaseX64/dart-sdk/bin/
  out/ReleaseX64/dart-sdk/bin/dart2native ~/src/hello_world.dart
  ~/tmp/hello_world.exe

  dart tools/bots/aot_smoke_tests.dart

  python tools/test.py -n dartkp-linux-release-x64 vm/dart/run_appended_aot_snapshot_test

Change-Id: I149fcd18405cdf0a87b8f4b4072c0f0e8f98c067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117140
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-23 12:00:08 +00:00
Martin Kustermann a64b06ec83 [gardening] Migrate most files to be implicit-bool-conversion free
Issue https://dart-review.googlesource.com/c/sdk/+/115701

Change-Id: Ib579f0bbc8d694aec74afd837217316a10baf910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115707
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-09-05 21:41:42 +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
Zachary Anderson 103881d01c Make header include guards great again
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER

This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.

R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07:00
koda@google.com c7c45f8ba3 Fix Windows build (BitScanReverse returns position, not count).
Review URL: https://codereview.chromium.org//557993002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40074 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 00:40:20 +00:00
koda@google.com d70cfe1f52 Fix ancient Windows freelist bug.
Since r9836 (July 2012), we have been searching the freelists in the wrong order on Windows. The recently added bit_set_test.cc uncovered this bug.

Also add dedicated unit test case for Utils::Count*Zeros.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40067 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 22:59:04 +00:00
koda@google.com 06fb635a93 Speed up freelist by using intrinsics to find last set bit.
Also add unit test for BitSet.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40057 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:17:07 +00:00
asiva@google.com fc88f85589 Add utilities for converting from Host endianity to big endian and little endian formats for the various OSs.
Review URL: https://codereview.chromium.org//14299008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21593 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 23:29:26 +00:00
cshapiro@google.com 2f9f822c76 Fix the build breakage on Windows caused by CountTrailingZeros.
Review URL: https://chromiumcodereview.appspot.com//10818020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9838 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 03:12:57 +00:00
cshapiro@google.com d7ffa1a784 Fix the build breakage on MacOS and Windows caused by CountTrailingZeros.
Review URL: https://chromiumcodereview.appspot.com//10805080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9837 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 03:03:43 +00:00
cshapiro@google.com 547383694b Improve the performance of bit set searches with a compiler intrinsic.
Review URL: https://chromiumcodereview.appspot.com//10806078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9836 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 02:45:31 +00:00