Commit Graph

14 Commits

Author SHA1 Message Date
Ryan Macnak f60efb7e40 Reapply "[vm] Popcount via compiler intrinsics."
Add missing rename of CountOneBits in ARM assembler.

Change-Id: I735da06343248573a1b049109ebc2bf0d1634960
Reviewed-on: https://dart-review.googlesource.com/18504
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-03 17:39:16 +00:00
Ryan Macnak 2761c556ca Revert "[vm] Popcount via compiler intrinsics."
This reverts commit c4f4cdbf29.

Reason for revert: ARM compile-time errors

Original change's description:
> [vm] Popcount via compiler intrinsics.
> 
> Change-Id: I8913beea7b984f04cec7f9efc00673aa12095eda
> Reviewed-on: https://dart-review.googlesource.com/18423
> Reviewed-by: Zach Anderson <zra@google.com>

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

Change-Id: I5efe8100e3c1fa404b1c24f369dca5c137acd2b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/18640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-11-03 16:50:47 +00:00
Ryan Macnak c4f4cdbf29 [vm] Popcount via compiler intrinsics.
Change-Id: I8913beea7b984f04cec7f9efc00673aa12095eda
Reviewed-on: https://dart-review.googlesource.com/18423
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-03 16:34:35 +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
Ben Konyi f2fd150ea0 Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run while the VM is alive. Tests created using the RAW_UNIT_TEST_CASE macro will run after the VM has shutdown to avoid having any worker threads contaminating the test results.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2666133002 .
2017-01-31 15:16:38 -08:00
koda@google.com c12d38d5b9 Fix typo in unit test.
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40071 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 23:31:16 +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
srdjan@google.com a9ecc2118c Use xorps xmm1, xmm1 to creat a 0.0 cconstant. Add to utils a bitwise double test.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35718 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 23:50:22 +00:00
fschneider@google.com e174a4c18e Fix a compiler bug caused by Utils::IsPowerOfTwo treating zero as a power of two.
The IsPowerOfTwo function is used together with ShiftForPowerOfTwo.  Both function
do not work with zero. This caused the optimizing compiler to generate invalid code
for the expression

x ? 0 : 0

where it assumed that if one of the constants is a power-of-two, it can
be computed by (1 << n). We check for 0 in a number of places, but instead
I decided to fix Utils::IsPowerOfTwo itself and remove unnecessary checks
for the zero case.

TEST=tests/language/vm/if_conversion_vm_test.dart, runtime/vm/utils_test.cc
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27033 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 09:28:34 +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
regis@google.com 9993072ff2 Simplify integer arithmetic code.
Optimize Mint multiplication in 32-bit mode.
Review URL: https://chromiumcodereview.appspot.com//9112050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3417 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 22:00:40 +00:00
sgjesse@google.com 65896148c9 Move utils.h and utils.cc from runtime/vm to runtime/platform
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.

R=ager@google.com, iposva@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9209001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00
sgjesse@google.com bf67f24098 Move assert.h/assert.cc from runtime/vm to runtime/platform
The purpose of this change is twofold:

1. Source in the bin directory can now use the same assertions as
   source in the vm directory. The ASSERT macro used by the code
   in runtime/bin was just defined to use assert from the standard
   C library.
2. Moving other implementation parts from runtime/vm to
   runtime/platform (e.g. classes Monitor and Mutex) for sharing
   between runtime/bin and runtime/vm will be easier as these
   implementations rely on these assertion macros.

Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.

All the code for asserts is still in the dart namespace.

Also re-arranged the order of includes to be alphabetically in
the files touched.

R=ager@google.com, iposva@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9189003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 12:28:10 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00