Commit Graph

422 Commits

Author SHA1 Message Date
ajohnsen@google.com 89957d4117 Mark simd128_value_t as able to containing both float and int32_t.
This fixes a bug when compiled with MSVC, where some values (I suspect NANs) can be changed when passed to functions.

BUG=
R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32121 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 14:21:45 +00:00
iposva@google.com 781f737c6a First round of http://dartbug.com/15922:
- Address warnings about 64-bit to 32-bit conversions.
- Remove heap profiler.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31867 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 05:05:35 +00:00
johnmccutchan@google.com 919dc2d6eb * Introduce ThreadInterrupter which calls a TLS set callback when thread is interrupted.
* Threads can only register and unregister themselves with ThreadInterrupter.
* Profiler is no longer involved in interrupting threads. It's just a callback and the buffer.
* Profiler operates lock free using an atomic operation to reserve sample in sample buffer.
* Linux, Mac, and Windows done.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31170 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 18:52:15 +00:00
aprelev@gmail.com 5d77e6ae7a Fix VS2013 compilation issue with c99 support header.
BUG=dartbug.com/12874
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30764 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-28 16:13:09 +00:00
johnmccutchan@google.com 72afb81a8c - Fix MonitorData ASSERT failure in thread_win:
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
2013-11-25 22:06:33 +00:00
johnmccutchan@google.com eb99334209 Attempt at enabling profiler
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30478 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 17:57:56 +00:00
johnmccutchan@google.com 19e47f3535 Kill dead code
TBR

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30421 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 19:21:36 +00:00
johnmccutchan@google.com 97ac18aee9 Sampling profiler
BUG=4350
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30419 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 18:26:10 +00:00
ajohnsen@google.com 8f99537455 Fix large-file support for mac os x.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30404 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 12:17:57 +00:00
ajohnsen@google.com 7fef1ff77a Add support for working with large files on unix systems, in dart:io.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30399 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 11:38:20 +00:00
iposva@google.com 8b51ded2fb - Convert heap sizes to words from bytes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30325 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-16 00:17:52 +00:00
hausner@google.com e5cd233fd9 Fix json message in debugger wire protocol
Removed faulty comma in message. This hopefully solves issue 13792.

R=devoncarew@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30311 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 19:14:47 +00:00
iposva@google.com 25b81b3e8b - Fix string conversion warnings.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30204 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 19:43:44 +00:00
johnmccutchan@google.com 29c01044bc This is the final breaking change in dart:typed_data needed for Dart 1.0. We need this change because the ECMAScript SIMD specification only includes Int32x4 and Int32x4List and our types must match.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29849 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 21:56:59 +00:00
sgjesse@google.com 36a67fa046 Implement fromEnvironment on bool, int and String
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
2013-10-31 05:46:57 +00:00
cbracken@google.com 0fdb309321 Prefix compile-time typedef checks with __attribute__((unused))
Prevents build failure under gcc 4.8.

Bug report: http://dartbug.com/13645

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28411 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 19:43:41 +00:00
sgjesse@google.com b8912cff07 Replace the memcpy macro with a lint check.
This fixes the build under libc++.  It also allows us to check the
Windows and Android code.  While at it, replace all uncaught instances
of memcpy with memmove.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27700 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:25:08 +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
hausner@google.com a105ba48fc JSON string decoding for VM debugger
The VM must properly decode JSON strings it receives.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26668 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 20:59:16 +00:00
whesse@google.com 2b804f7d4d Add Windows error code reporting printing format fix in runtime.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26310 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 09:27:42 +00:00
sgjesse@google.com 05a1eab78f Add error code to fatal termination messages on Windows
R=ager@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26262 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 09:07:27 +00:00
dgrove@google.com b1e0333103 Fix warnings.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25954 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 23:03:17 +00:00
cbracken@google.com a6ace331f3 Replaced strerror() calls with threadsafe strerror_r().
Mac/Android use the XSI-compliant definition of strerror_r() which stores the message in the passed-in buffer.

Linux uses the GNU-specific definition of strerror_r() which takes a buffer and returns the message in a char* (which may or may not be the passed-in buffer).

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25943 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:24:05 +00:00
zra@google.com f219f81b14 Begins implementation of ARM neon instructions.
Just adds the vadd instruction, but also changes the
arm assembler to expose the Q registers rather than the
D registers. Q0 = D1:D0 = S3:S2:S1:S0. This is similar
to how ia32 and x64 use only the xmm registers for
floating point.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24982 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 23:22:50 +00:00
asiva@google.com 703bad2d2a Revert change 23636 as it is causing issues on dartium. Will resubmit after investigating the dartium failure.
Review URL: https://codereview.chromium.org//16378004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23641 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 17:28:01 +00:00
asiva@google.com bd14296eb7 Fix for issue 1755.
Use 'new' in all the snapshot reallocation functions instead of realloc.
This would result in program termination when allocation fails and will
ensure that a NULL will not be returned.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23636 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 16:21:04 +00:00
sgjesse@google.com 2e857ff194 Put HashMap class in dart namespace.
R=sgjesse@google.com
Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22175 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 11:48:48 +00:00
sgjesse@google.com 05e5da6dca Remove include which was not needed
R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22171 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 10:18:34 +00:00
regis@google.com 52a0f3c983 Enable api tests on ARM.
Disable generation of optimized code on ARM and MIPS.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21972 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 18:55:52 +00:00
srdjan@google.com cc94080d4d Fix performance of parsing Mints.
Review URL: https://codereview.chromium.org//13852044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21767 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 20:22:26 +00:00
zra@google.com dae5068650 Enables cross-compilation of the VM for ARM.
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
2013-04-19 18:05:44 +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
iposva@google.com 0d8ff3ef16 - Add OS::StrNDup instead of redefining it when needed.
Review URL: https://codereview.chromium.org//13994008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21368 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:19:10 +00:00
iposva@google.com a09fe36709 - Reverting the 'static' change of strndup.
Review URL: https://codereview.chromium.org//13971004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21323 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 23:46:14 +00:00
iposva@google.com 42413781d3 - Make the definition of strndup static to avoid conflicting in case it is available.
Review URL: https://codereview.chromium.org//14198007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21322 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 23:34:20 +00:00
iposva@google.com c74dd9c9ca - Add strndup for Mac OS X version < 10.7.
Review URL: https://codereview.chromium.org//13817010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21321 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 23:26:15 +00:00
tball@google.com 95dfaf1718 Updated VM stacktrace support (20898) with platform-
independent version of strndup.
Review URL: https://codereview.chromium.org//13587008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20936 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 18:48:24 +00:00
sgjesse@google.com 3f6400812b Only lookup and delete the monitor wait data if it was allocated.
R=ager@google.com

BUG=https://code.google.com/p/dart/issues/detail?id=9403

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20772 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 12:28:56 +00:00
tball@google.com 7199ab26b1 Added string appending to TextBuffer, removed STL use in vm_stats_impl.
Review URL: https://codereview.chromium.org//13006007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20566 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 17:30:14 +00:00
johnmccutchan@google.com 3d4778e2c2 SIMD plumbing
Review URL: https://codereview.chromium.org//12871015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20287 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 20:29:00 +00:00
fschneider@google.com 86da5111ad Replace scalarlist optimizations and split external array loads into two IL instructions.
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
2013-03-19 12:06:23 +00:00
ager@google.com 26c4b3a58d Fix file descriptor leak in event handler implementation. When shutting down an isolate, we did not destruct the eventhandler so we leaked the file descriptors for it.
Also fix leak of monitor wait data objects on Windows.

R=sgjesse@google.com
BUG=dartbug.com/9021

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19921 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 11:11:38 +00:00
johnmccutchan@google.com 6c4afdd546 Force WriteByte to be inlined
Review URL: https://codereview.chromium.org//12340086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19143 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 15:21:12 +00:00
iposva@google.com 9046a44a37 Prepare for removal of source_filter.gypi:
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
  fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
iposva@google.com 826acfc074 - Avoid warnings when the result of TEMP_FAILURE_RETRY is unused.
Review URL: https://codereview.chromium.org//12178025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18732 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-19 22:43:22 +00:00
johnmccutchan@google.com 9fb0984c9d SSE Assembler + Linux build fixes
Review URL: https://codereview.chromium.org//12223115

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18493 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:05:17 +00:00
johnmccutchan@google.com dd140c2958 Revert SSE assembler changes
Review URL: https://codereview.chromium.org//12212151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18410 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:14:12 +00:00
johnmccutchan@google.com 06eb49d537 SSE Assembler and Disassembler support
Review URL: https://codereview.chromium.org//12207117

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18406 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 22:43:48 +00:00
hausner@google.com 0b9e169dad Verify integrity of JSOM messages sent to debugger client
Make sure JSOM messages are grammatically correct and string values are properly encoded.
Review URL: https://codereview.chromium.org//12035086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17617 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 23:35:34 +00:00
regis@google.com 350fa57800 Add mips and simmips build targets.
Review URL: https://codereview.chromium.org//11859034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17319 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 21:34:53 +00:00