Simplify by no longer using the signed unboxed int32 type on
64 bit platforms.
R=vegorov@google.com
Change-Id: Ic8eab7308f2ce01e5618344f50f72b95ce13a0dc
Reviewed-on: https://dart-review.googlesource.com/52762
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This change enables building a gen_snapshot that targets Fuchsia during
an SDK build that targets the host (Mac, Linux).
Change-Id: I4cfbcbe4e26e4be7108fc40c96122fe9a2fb4c19
Reviewed-on: https://dart-review.googlesource.com/48683
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Since the kernel reading helpers have been extended to not only work
with a kernel blob in C heap, but also work based on a [TypedData]
buffer in the VM heap, access to the [TypedData] buffer is on the hot
path now.
This hot path is slowing things down considerably, in particular due
to NoSafepoingScope's.
This CL removes a critical NoSafepoingScope when accessing the
[TypedData] in read-only mode. It also allows passing in the [Thread]
directly, to avoid TLS lookups.
Issue https://github.com/dart-lang/sdk/issues/32603
Change-Id: I91955bea5cd4eddbbd21c5d3bc6813504c2cece9
Reviewed-on: https://dart-review.googlesource.com/47222
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
(Strip out platform dill files and the kernel service dill file from a
product build)
After fixing the issue of using 'is_product' which is not present in the
flutter build environment.
Change-Id: I49dd68e63b1f6d7ac0981b28bf2b08618551ae2e
Reviewed-on: https://dart-review.googlesource.com/44024
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This reverts commit 92b5bf86a1.
Reason for revert: this breaks Flutter engine build because is_product is not defined.
Original change's description:
> Strip out platform dill files and the kernel service dill file from
> a product build.
> They only need to run a self contained '.dill' file as their application.
>
> Change-Id: I9a2566b9e552a7aef4ebf52c2ecb664088ad030c
> Reviewed-on: https://dart-review.googlesource.com/43497
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Chandra <sivachandra@google.com>
TBR=zra@google.com,sivachandra@google.com,asiva@google.com
Change-Id: Id55a3f749290813aba479cc705c6065b75a0ac9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/43980
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
a product build.
They only need to run a self contained '.dill' file as their application.
Change-Id: I9a2566b9e552a7aef4ebf52c2ecb664088ad030c
Reviewed-on: https://dart-review.googlesource.com/43497
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Chandra <sivachandra@google.com>
Be careful to free external data when reading or writing a message is interrupted, or releasing messaging without reading on shutdown.
Bug: https://github.com/dart-lang/sdk/issues/31959
Change-Id: Ia39acb9ca0e27cf9e8b83961741e5949b5930266
Reviewed-on: https://dart-review.googlesource.com/41561
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This CL corrects handling of overflows in range analysis to
account for wrap-around (which happens with new integer semantics).
* If there is an overflow while doing computations in range
analysis, the resulting range is approximated as full int64 range.
* For symbolic range boundaries 'symbol + offset', offset is checked
to stay within [kMinInt64 - kSmiMin, kMaxInt64 - kSmiMax] in order
to guarantee that overflow doesn't occur.
Issue: https://github.com/dart-lang/sdk/issues/31920
Change-Id: I2c16adbe3597e9b718ed2f6ce7210426fcc9e6a6
Reviewed-on: https://dart-review.googlesource.com/39423
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit 2d4c606e63.
The fix for the debug buildbot breakage now consists of skipping wide to utf8 conversion
altogether, instead move uri to path conversion directly into newly added File::OpenUri method.
Change-Id: Id3d7457d6a6b5045e5f38678548f4d7bed6d2c43
Reviewed-on: https://dart-review.googlesource.com/39801
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This reverts commit d78a41e0ee.
Revert "Fix length for WideToUTF8 conversion in UriToPath"
This reverts commit 011e1cc1c5.
Change-Id: I36140426a474962f77605e1aed6ddfd158bd064a
Reviewed-on: https://dart-review.googlesource.com/39480
Reviewed-by: Alexander Aprelev <aam@google.com>
This reverts commit 12759870a4.
Reason for revert: Broke many bots.
Original change's description:
> [VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables
>
> This fixes an issue when a program got loaded via dill, a function
> with a try-catch got optimized and the exception/stacktrace variables
> got captured.
>
> Change-Id: Ia6b62f2a0986c78b90afe7fae25025ca4e5b09db
> Reviewed-on: https://dart-review.googlesource.com/35182
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com
Change-Id: I2ec7b4bea401e6d5665f6e789eb8e241b99db7b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/36200
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This fixes an issue when a program got loaded via dill, a function
with a try-catch got optimized and the exception/stacktrace variables
got captured.
Change-Id: Ia6b62f2a0986c78b90afe7fae25025ca4e5b09db
Reviewed-on: https://dart-review.googlesource.com/35182
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit adf04d0ac6.
The original change used macros from stdint.h and it failed build on
the linux sdk bot:
https://uberchromegw.corp.google.com/i/client.dart/builders/dart-sdk-linux-be/builds/17348
In the newer version, constants from runtime/platform/globals.h are used
instead of the macros from stdint.h. Constants for int8 have been added as
they were not present already.
Change-Id: Ia4f27613fa5dca2cd6dbfeb37715ea70a85cec95
Reviewed-on: https://dart-review.googlesource.com/25083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
This fixes some incorrect asserts that were breaking the debug bots.
The original revision is available in Patchset 1.
This reverts commit 26735519cb.
Bug:
Change-Id: Ifa599b7bff752dec4c505e10fd6db206e1abd977
Reviewed-on: https://dart-review.googlesource.com/23820
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
This reverts commit f13f772bb2.
Reason for revert: dartk(p)-strong debug mode is completely broken
because we convert int values non-representable as Smi to Smi, which
triggers that assert. The code that does tagging checks that
Untag(Tag(x)) == x, however for our purposes this identity does not
need to hold because we only care about lower bits and ignore the sign.
Reverting to restore green-ness of DEBUG builds.
TBR=sjindel@google.com
Bug:
Change-Id: Id436cbe000d6dec8db3469070ed531327cc82d89
Reviewed-on: https://dart-review.googlesource.com/23661
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
R=vegorov@google.com
This removes the IA32 disassembler and uses the X64 disassembler for
both variants. Instructions that were in the IA32 assembler, but not
supported by the X64 disassembler have been added. It also adds some
regression tests for a lot of the disassembler output.
Bug:
Change-Id: I243abbb04c3a77810ce96ca74f7f42a5a1aea0cf
Reviewed-on: https://dart-review.googlesource.com/22982
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
The revision begins the implementation of:
https://docs.google.com/document/d/1KK8b6kzr0pQev5YNftSZhN3M6I8HcvOJwJ6U-cW4nfw/edit?ts=5a05b3e9#heading=h.7j21arix8p2
* The ArgumentsDescriptor is updated to hold a bitvector for positional arguments.
* The kernel flowgraph builder is updated to calculate the appropriate bits from
the interface target and pass them through the ArgumentsDescriptor
for regular MethodInvocations.
Bug:
Change-Id: I1cd9f43f697df1dd4f36103bbdfc0ba000125c02
Reviewed-on: https://dart-review.googlesource.com/21541
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
R=rmacnak@google.com
Also some minor cleanup in the way we encode ARM instructions.
I'll be needing these for 32 bit Smis on ARM64.
Bug:
Change-Id: I5f515590375a2c6ad11bc6f1a80a4f8e27cd82b4
Reviewed-on: https://dart-review.googlesource.com/20668
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
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>
This is a baby-step towards building an SDK targeting the host arch
during a cross-build. This will require a similar update to the use
of dart_config in the Flutter engine at //flutter/lib/io/BUILD.gn:19.
Change-Id: I8b871cceb53038cab8407264664c5ce545e6e010
Reviewed-on: https://dart-review.googlesource.com/17523
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This CL restores disassembler in precompiled mode after it was removed
in 8cb752f73b.
Without disassembler observatory is not able to show assembly code
in 'flutter run --profile' mode.
This CL also pulls BufferFormatter out of il_printer.h/.cc as it is also
used in disassembler.
Change-Id: I098ddb8d8f5a2426028c1f467d58e5c2d6a82d21
Reviewed-on: https://dart-review.googlesource.com/7486
Reviewed-by: Zach Anderson <zra@google.com>
Avoids string copies in C++ and map copies in Dart.
Also remove some vestiages of removed feature that allowed an embedder to add pre-encoded events to the timeline.
Change-Id: I962a67093ba461c991d9169b0391c44af1d489db
Bug: https://github.com/dart-lang/sdk/issues/30787
Reviewed-on: https://dart-review.googlesource.com/6762
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reapply 3d4838fc70 with the following
modifications:
* define PRIX64 to fix compilation errors on Windows;
* add and use short form format specifiers PX and PX64 to make it
uniform with other format specifiers.
Original review: https://codereview.chromium.org/2987183002
Description of the original CL:
Until this change, implementation of Dart_IntegerToHexCString()
always created Bigint objects and used Bigint::ToHexCString() to do
the work.
In --limit-ints-to-64-bits mode (with Dart integers limited to 64
bits) Bigints are banned and should not be used.
This CL revises Dart_IntegerToHexCString implementation to avoid
creating Bigint objects for Smi and Mint arguments, so it would
work in --limit-ints-to-64-bits mode.
Also, this CL adds test case to lock down the behavior of
Dart_IntegerToHexCString.
R=zra@google.com
Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2985423002 .
This changeset revises --limit-ints-to-64-bits option to
change range of integers from unlimited to int64.
On overflow, integer arithmetic operations silently wrap around and
discard extra bits. No Bigints are allocated in case of overflow.
This changeset is the 1st part in the series of changes, it revises the implementation of integer arithmetic operations. More changes will follow.
R=regis@google.com, zra@google.com
Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2974633003 .
This moves the hash code into the header word for strings on 64 bit
platforms. With the old layout, 9 character strings became 48-byte
objects. With the new layout you have to go to 17 characters before
you are bumped from 4 to 6 words (32 to 48 bytes).
As a side effect, the class ID field is now 16 bits on all platforms
instead of having two different sizes, and the size field is 8 bits
on all platforms.
This also paves the way for moving the hash code for instance objects
into the header, so we won't need the side-lookup in the
hash-table-of-hash-codes on 64 bit platforms.
This is a reapplication of https://codereview.chromium.org/2893553002/
after issues were fixed in https://codereview.chromium.org/2888413002/
and https://codereview.chromium.org/2896583002/R=vegorov@google.com
BUG=
Review-Url: https://codereview.chromium.org/2895183002 .
This moves the hash code into the header word for strings on 64 bit
platforms. With the old layout, 9 character strings became 48-byte
objects. With the new layout you have to go to 17 characters before
you are bumped from 4 to 6 words (32 to 48 bytes).
As a side effect, the class ID field is now 16 bits on all platforms
instead of having two different sizes, and the size field is 8 bits
on all platforms.
This also paves the way for moving the hash code for instance objects
into the header, so we won't need the side-lookup in the
hash-table-of-hash-codes on 64 bit platforms.
R=vegorov@google.com
BUG=
Review-Url: https://codereview.chromium.org/2893553002 .
If an Isolate touches the 'stdio' getter, a _NativeSocket with
attached finalizer is created for it. Previously, when such an
Isolate exited, the finalizer would close the underlying
file descriptor. This CL changes the finalizer for stdin such
that the native objects will be cleaned up, but the underlying
file descriptor will not be closed. The underlying file
descriptor will now only be closed if the stdin stream
subscription is explicitly canceled.
Accessing the stdin getter after the stream is explicitly
canceled will result in a FileSystemException.
See also: https://github.com/dart-lang/test/issues/583fixes#29229R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2791423002 .
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.
Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.
R=zra@google.com
Review-Url: https://codereview.chromium.org/2750843003 .
The way runtime/platform/hashmap.h:HashMap was implemented so far did not allow
deleting elements while iterating over the map. If one iterated like this
HashMap::Entry* cursor = map.Start();
while (cursor != NULL) {
if (cond) {
map.Remove(cursor->key, cursor->hash);
}
cursor = map.Next(cursor);
}
Then the iteration `cursor` will skip elements. This is due to the fact that
`HashMap::Remove()` is left-rotating elements in certain cases and
`HashMap::Next()` will unconditionally advance to the next position in the
backing store.
PROBLEM IS: There was existing code which did remove elements while iterating
over a HashMap.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2533303005 .
We have a racy read of the object header in the stack frame walker
called from the profiler (in this case the gc marker is running at
the same time).
It is appropriate to avoid this even though we think the access is
safe as the objects are in old space and never forwarded and only
the mark bits are manipulated while marking
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2517473002 .
libdart_vm_nosnapshot should not include dart_maybe_precompiled_runtime_config.
DART_NOSNAPSHOT and DART_PRECOMPILED_RUNTIME are mutually exclusive configurations
add a meaningful check in the globals.h to catch this instead of cryptic compile
time errors.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org/2515663002 .
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 .
- use attribute 'no msan' on NativeEntry::ReturnValueIsError function
as msan doesn't seem to track the return slot being set by a native
function
- vsnprintf seems to have issues with msan so unpoison the allocated
memory buffer everytime vsnprintf is used to suppress the error.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2383293003 .
- Conditionally remove fields of Code, Function and ICData that are not used in the AOT runtime.
- Don't include RawClosureData.context_scope_ in AOT snapshots.
- Remove parameter names not needed for method resolution.
- Remove parameter types not needed for function type tests.
- Deduplicate parameter name and parameter type lists.
- Shrink and share the initial MegamorphicCache table.
Flutter gallery (IsolateSnapshotReader event)
snapshot size 2731129 -> 2199999 (-19.4%)
initial heap 7899568 -> 5433176 (-31.2%)
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2326483005 .
This CL adds targets to the GN build that build the standalone Dart VM
without the observatory, and with dart:io enabled but with most of the
functionality stubbed out as UNIMPLEMENTED(). It also adds a simple
eventhandler for Fuchsia for implementing Timers.
R=asiva@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2168193002 .
This adds a GN target for the 'fuchsia_test' executable and teaches
the GN build about is_fuchsia. Key differences:
*) There's not currently a dart:io implementation for Fuchsia
*) Fuchsia's toolchain currently doesn't support (or need) ldl or lpthread
*) Fuchsia's buildconfig doesn't currently set the is_asan variable
Review URL: https://codereview.chromium.org/2149953003 .
Previously if one marker marked the weak property and another marker marked its key then the first marker might stop marking before it sees that the key was marked.
Here is a possible concurrent execution, assuming P is a WeakProperty and K is P.key:
(Marker A) (Marker B)
| |
[ mark property P ] |
| |
[ drain marking stack ] |
[ no more work to do ] |
| [ mark K ]
| [ draing marking stack ]
| [ no more work to do ]
| |
| |
... ...
| |
[Finalize] [Finalize]
|
[Clear P]
In this execution we end up clearing P even though P.key is marked.
To fix this issue without reintroducing central WeakProperty processing
we change the marking phase loop in such a way that markers consider the
marking done only if all of them agree that they have no more weak properties
with marked keys.
Essentially the marking loop now has a separate phase where all markers check
their pending weak properties. The decision to proceed to the next marking phase
(weak handles processing) is done in lock step using barrier - either all threads
advance to the next stage or one of the threads finds a weak property
with marked key and unmarked value and all threads resume marking.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2041413005 .
Allow controlling the target ABI by defining TARGET_ABI_IOS or TARGET_ABI_EABI. If neither is defined, default to the previous behavior.
Make Linux, Mac, Android and iOS agree on the value of PreferredCodeAlignment for all architectures.
BUG=http://dartbug.com/26464R=zra@google.com
Review URL: https://codereview.chromium.org/1982613003 .
1. Add "dart_runtime_mode" GN argument. This is an enum with three valid values: "release", "profile", and "develop".
*) "release" builds product precompiled-runtime.
*) "profile" builds non-product precompiled-runtime.
*) "develop" builds non-product non-precompiled-runtime.
2. Remove the redundant "dart_product" GN argument.
3. Kill all *precompiled_runtime static library variants and the related config.
4. Always include the precompiler in gen_snapshot.
5. Support multiple --embedder_entry_points_manifest arguments to gen_snapshot.
6. Update our test harness to use gen_snapshot and pass the same kinds of command line arguments the Flutter folks are using.
7. ASSERT that both DART_PRECOMPILED_RUNTIME and DART_PRECOMPILER are not set at the same time.
R=fschneider@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1903583002 .
This fixes some flaky failures and timeouts on Windows in tests where
an ASSERT fails.
This change requires Using OS::Abort in platform/assert.cc so that the
flag disabling tls destructors can be set.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1572913002 .
- Add the "isolate" command which allows the user to switch isolate by name or number. Supports completion.
- Add the "isolate name" command which allows the user to rename an isolate. Add the "setName" method to the service protocol to support this. Isolates now have a debugger_name() in the vm.
- The new IsolateUpdate event notifies the client when an isolate name changes.
- When an isolate is updated, update the page's isolate too, so the navbar is accurate.
- Update isolate summary to display isolate number.
- Rework how the isolate's name is computed because we were getting garbagey names in the IsolateStart event (SpawnState was not yet set).
- Make sure that the debugger doesn't subscribe to events multiple times.
- "info isolates" is now "isolate list".
- Rework reporting of vm and isolate startTime in the service protocol and in Observatory.
- Fix bug in command completion when subcommands and other completions share common prefixes.
- Rework isolate accounting in the VM object in Observatory. We now create Isolates in getFromMap rather than from IsolateStart events, per se. Rewrite the isolate updating code.
- IsolateStart and IsolateExit events are now owned by the Isolate itself, rather than the vm.
- Return the actual result in pause/resume/etc.
- Add assertion in JSONStream::PrintProperty64 that the result fits in a javascript double. Sigh.
- Stop sending GC events for the service isolate. Add assertions to guard against this happening in the future.
- Misc improvements in error reporting.
Review URL: https://codereview.chromium.org//1007863003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44718 260f80e4-7a28-3924-810f-c04153c831b5
Under certain conditions GCC on x86 decides to copy simd128_value_t through FPU stack.
For example Int32x4::value getter would contain the following code:
212d5: d9 46 07 fld DWORD PTR [esi+0x7]
212d8: d9 46 0b fld DWORD PTR [esi+0xb]
212db: 8b 46 03 mov eax,DWORD PTR [esi+0x3]
212de: d9 46 0f fld DWORD PTR [esi+0xf]
212e1: d9 ca fxch st(2)
212e3: d9 5b 04 fstp DWORD PTR [ebx+0x4]
212e6: d9 5b 08 fstp DWORD PTR [ebx+0x8]
212e9: 89 03 mov DWORD PTR [ebx],eax
212eb: d9 5b 0c fstp DWORD PTR [ebx+0xc]
This code is incorrect. For example an attempt to copy an int32_t value that
looks like sNaN will result in it turning into a qNaN which changes
the value being copied.
GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416
This was causing flakiness when people were running WebSocket related tests
locally on Dart VM binaries built with GCC as our WebSocket implementation uses
Int32x4 values to speed up payload masking/unmasking.
Bots were not affected because they are building with clang.
BUG=http://dartbug.com/21220R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//692703003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41581 260f80e4-7a28-3924-810f-c04153c831b5
- Convert many private static functions into public static methods on Range or RangeBoundary classes.
- Simplify ConstraintInstr::InferRange to just use RangeBoundary::Min and RangeBoundary::Max calls.
- Extend RangeBoundary to 64-bits.
- Include mints in RangeAnalysis.
- Introduce generic Range::BinaryOp.
- Require ranges passed to Range::BinaryOp are finite.
- Clamp ranges attached to BinarySmiOpInstr and BinaryMintOpInstr.
- InferRange for BinaryMintOp and UnboxInteger instructions.
- Correctly set mint constant ranges.
- Add many tests.
R=fschneider@google.com, vegorov@google.com
Review URL: https://codereview.chromium.org//328503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37521 260f80e4-7a28-3924-810f-c04153c831b5
E:\b\build\slave\vm-win32-debug-russian-be\build\dart\runtime\platform/thread_win.h:66: error: expected: next_ == NULL.
- Reduce sample buffer size by an order of magnitude (this should fix .
- Disable profiler on simulators.
- Only sample when scheduled thread id matches current thread id.
Review URL: https://codereview.chromium.org//85333006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30647 260f80e4-7a28-3924-810f-c04153c831b5
This implements const constructor fromEnvironment on bool, int and
String.
The VM have the added -Dname=value option to define the value for the
properties. All values are provided by using the -D - nothing is read
from the environment.
If the resulting value is null or - in the case of int.fromEnvironment
- not a number an ArgumentError is thrown.
This CL does not have any implementation for dart2js.
This is a continuation of the change
https://chromiumcodereview.appspot.com/24975002 by iposva@
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//50983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29642 260f80e4-7a28-3924-810f-c04153c831b5
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
Uses the "toolset" feature of gyp to build the dart VM
for ARM, but restricts building of snapshot generation
to the host machine.
For generated source files, it also changes to using
LIB_DIR instead of SHARED_INTERMEDIATE_DIR to avoid
generation of duplicate Makefile rules (gyp doesn't
know that generated source files from toolchains it
thinks are different will be the same.)
Review URL: https://codereview.chromium.org//12726011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21757 260f80e4-7a28-3924-810f-c04153c831b5
This CL removes optimized access for scalarlist, and only the new TypedData classes
are optimized. I changed the runtime libraries core and math to use typedData
instead of scalarlist (Uint16List is used in StringBuffer, Uint32List by Math.random).
Instead of using LoadIndexed for internal and external arrays,
split external loads into a load of the backing store and a load
of the element.
v3 <- LoadIndexed(v1, index)
becomes
v2 <- LoadUntagged(v1, ExternalTypedData::data_offset)
v3 <- LoadIndexed(v2, index);
For this I introduce two new representations in the IL:
kUntagged (for values that hold a untagged pointer) and
kNoRepresentation (for instructions accept any input
representation)
Deoptimization does not need to know about kUntagged
since these values can never occur in the environment.
Also with this change:
* fix COMPILE_ASSERT and use it in one place.
* Cleanup IL printer output of deopt ids.
Review URL: https://codereview.chromium.org//12871010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20198 260f80e4-7a28-3924-810f-c04153c831b5
Split directory_posix -> directory_(android|linux|macos)
This allows us to cleanly make Android-specific changes to
directory_android.cc
Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:
+ getcwd(0, NULL) doesn't work on Android, have to emulate
+ Android doesn't have a '/tmp' directory, have to emulate
+ Android doesn't provide mkdtemp(), have to emulate.
+ Small differences in the available system include files.
+ Use pthread_cond_timedwait_monotonic instead of
pthread_condattr_setclock
Review URL: https://chromiumcodereview.appspot.com//10826233
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.
Removed old mirror tests and added two new mirror tests.
Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.
Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.
Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.
Added tests for new dart embedding api functionality.
Added the ability to determine if a port is local to the current isolate.
Extended NotImplementedException to accept an optional string
argument. I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
The debugger wire handler is implemented similarly to the io event handler.
A dedicated thread monitors the debugger port for incoming connection
requests. When a debugger is connected, the VM sends events messages
over the wire and handles debugger requests.
To start the VM with a debugger connection, use the option
--debug:<portnumber>. The VM pauses at the beginning of main()
and waits for a debugger to connect.
Subsequent changes will implement debugger commands one by one.
With this change, the VM only understands "resume" commands.
Review URL: https://chromiumcodereview.appspot.com//10357003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7330 260f80e4-7a28-3924-810f-c04153c831b5
Now using an event object per thread which is linked into a list
of waiters for the monitor.
Notify takes the first element of the list and notifies (FIFO order).
Notify all extracts the entire list and notifies each of them. This
avoids the issues with fairness and correctness of the previous version.
The MonitorWaitData object holding the event and a pointer to the
next waiter is stored in thread local storage and lazily initialized.
R=sgjesse@google.com,asiva@google.com
BUG=1614
TEST=
Review URL: https://chromiumcodereview.appspot.com//9424050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4537 260f80e4-7a28-3924-810f-c04153c831b5
The C message reader can now read lists created like this:
new List()
new List<int>()
new List<String>()
new List<double>()
new List<bool>()
The backward references are now resolved and already allocated
Dart_CObject objects are reused when there is a backward reference.
The reuse of the Dart_CObject objects poses the issue of which objects
where allocated with the supplied allocator and which where not.
Currently this will work best with a zone allocator. This will be added
to the tests in a subsequent change.
R=asiva@google.com, turnidge@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9303031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3831 260f80e4-7a28-3924-810f-c04153c831b5
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