Commit graph

215 commits

Author SHA1 Message Date
turnidge@google.com e10de2de1a Fix the build.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44719 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-26 19:23:14 +00:00
turnidge@google.com 140a071acb Allow Observatory debugger to switch isolates.
- 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
2015-03-26 19:06:18 +00:00
fschneider@google.com aefdc04fa8 VM: Fix issue with local variable values reported by the debugger.
I added a function to test if a variable is visible or not to the
debugger tests.

BUG=dartbug.com/22353
TEST=standalone/debugger/local_variables_test
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43850 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 18:48:00 +00:00
koda@google.com 4cac1a531a Increase verbosity of assertion failures in SizeFromClass.
Print the tag word for which the assertion fails.
This is specifically to help tracking down issue 22087.

TBR=iposva@google.com
BUG=dart:22087

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43732 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 18:08:55 +00:00
koda@google.com bf07d168c4 MallocGrowableArray
To be used where neither Dart nor zone allocation is suitable, such as ClassTable.

Also add ASSERT_NOTNULL convenience macro for use in initializer lists.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42819 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 16:40:09 +00:00
koda@google.com 08edbbd6b4 MemorySanitizer support.
Enables building (including generating snapshot) and running simple scripts under MemorySanitizer.
Not all tests pass yet.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42561 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-23 01:07:58 +00:00
vegorov@google.com 29f021439a Infer range for BIT_XOR.
When selecting representations unbox integer phis that have Int32 range and have only constants or boxing operations flowing into them.

BUG=http://dartbug.com/13869
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41667 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 14:51:10 +00:00
vegorov@google.com ddbe93418d Work around GCC bug that results in incorrect simd128_value_t copying.
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/21220
R=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
2014-11-06 20:16:34 +00:00
iposva@google.com cc13627fc8 - Remove Isolate::CurrentAddress().
- Remove use of INFINITY and -INFINITY.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40700 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 23:39:30 +00:00
asiva@google.com 35ef779824 Fix dartium windows build (broke after reecnt chrome 38 roll)
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40566 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 20:30:27 +00:00
ricow@google.com 37e8c382dc Remove files from gypi file that have been removed from the repo
The files where removed in r39172

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40234 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 08:07:30 +00:00
rmacnak@google.com 128148aafc Preserve the contents of Dart strings with unmatched surrogate halfs by avoiding a UTF16 -> UTF8 -> UTF16 conversion.
Clean up some confusion between code points and code units.

BUG=http://dartbug.com/20583
BUG=http://dartbug.com/20874
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40174 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 18:42:04 +00: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
zra@google.com c686b2c624 Finishes removing intptr_t from raw object fields.
Also removes {Read,Write}IntptrValue from the snapshot reader and writer.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40048 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 19:51:22 +00:00
koda@google.com cdafe57cac During promotion, use bump allocation whenever there are no small blocks available.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39893 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 01:07:57 +00:00
johnmccutchan@google.com 342e5c8e35 Inline Int32x4 constructor
(avoids a runtime call for every websocket message in dart:io)

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39255 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-14 17:27:49 +00:00
zra@google.com 88ca926b7e Adds pthread.h include to fix Android build.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39212 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 18:18:47 +00:00
iposva@google.com 62ea934642 - Make sure ASSERT is defined in signal_blocker.h.
Review URL: https://codereview.chromium.org//468683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39178 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:49:09 +00:00
iposva@google.com 14ecdbd66a - Separate the thread implementation used in bin/ and vm/
to allow us to make VM specific changes.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39172 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 23:19:53 +00:00
iposva@google.com b70da362b9 - Make sure to be able to deal with unaligned snapshot buffers
for length and kind.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38759 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 22:52:08 +00:00
iposva@google.com 28c8553cb6 - Fix a lot of warnings generated by -Wshorten-64-to-32
when compiling for ia32 on Mac.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38499 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 14:10:13 +00:00
regis@google.com f58908bfdd Tweaks for speed in integer arithmetic runtime.
Unrelated:
Removed annoying svn property on utils.cc (indicated by MM):
  svn propdel svn:eol-style runtime/platform/utils.cc

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38090 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 17:16:10 +00:00
zra@google.com 9e6655f810 Fixes Android build by using C++ math header instead of C one.
This change also requires prefacing the math calls with
std::, i.e. isinf -> std::isinf.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37839 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 22:15:26 +00:00
johnmccutchan@google.com 3eb3bc3fa9 Extend Range analysis to 64-bit range and mint operations
- 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
2014-06-19 21:13:26 +00:00
ajohnsen@google.com d21ca48526 Flush stderr when printing ASSERT message.
This ensures that the message is received by the other end, e.g. test.dart, on Windows.

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37160 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 06:52:12 +00:00
zra@google.com 9c73009ff9 Prepares for arm64 cross-build.
With this change, the cross-build succeeds with the Linaro arm64 toolchain.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36698 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 18:05:20 +00:00
fschneider@google.com 01255e0843 Change COMPILE_ASSERT to take only one argument and use it in more places.
This way it can be used in the same way as ASSERT.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36625 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-26 09:45:04 +00:00
zra@google.com 0676e14a22 Adds more SIMD instructions to arm64.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36585 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 20:34:29 +00:00
ajohnsen@google.com 02332b5539 Fix thread-interrupter shutdown on Windows.
This reworks the ThreadId on Windows to be the tid, and not an open HANDLE.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36502 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 15:12:09 +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
ajohnsen@google.com df14081452 Make opendir test for EINTR again and make NO_RETRY_EXPECTED check in release mode.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35352 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 06:38:16 +00:00
zra@google.com 37baacb116 Small fixes for Android.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35342 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 23:20:24 +00:00
iposva@google.com fd8565b071 - Add a minimal implementation of Capability.
- Make RawReceivePort and SendPort VM internal objects.
- Rationalize the creation of ports and their handling within the VM.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35325 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 19:44:03 +00:00
zra@google.com 2fe51715e5 Begins work on ARM64, first assembler test.
Most new code is in constants_arm64.h and
{assembler,disassembler,simulator}_arm64.{h,cc}

The rest of the CL just #def's out tests, modifies status files,
and adds UNIMPLEMENTED functions, etc.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34654 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:39:32 +00:00
ajohnsen@google.com 4f613457d6 Speed up GetRandomBytes by only entering signal-blocking scope once.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34356 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 13:06:37 +00:00
ajohnsen@google.com 0c157cd31e Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY.
BUG=http://code.google.com/p/dart/issues/detail?id=16927
R=johnmccutchan@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33745 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 13:51:11 +00:00
johnmccutchan@google.com 6ea46abd34 Create a shadow table to track CodeRegions of reused code address space.
R=asiva@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33665 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 21:00:44 +00:00
koda@google.com d3b65af6d3 Replace RoundMicrosecondsTo* with non-rounding MicrosecondsTo*.
(The existing function didn't actually round, it just incorrectly added 0.5.)

BUG=dart:17348
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33527 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 14:11:25 +00:00
iposva@google.com f2a6f1b4b6 Another round of cleanups for http://www.dartbug.com/15922
- Address warnings about 64-bit to 32-bit conversions.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32831 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 23:35:55 +00:00
johnmccutchan@google.com 2820a12766 Allow for embedder provided service request handlers
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32769 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 22:38:11 +00:00
johnmccutchan@google.com 9d80608b9c Add Float64x2, Float64x2List, etc... with runtime and dart2js implementations
R=sra@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32196 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 15:28:05 +00:00
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
iposva@google.com 3e367a12d8 - Consolidate verbose-gc output to be a single line which can be imported easily into spreadsheets.
Review URL: https://codereview.chromium.org//11734028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16624 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 02:15:36 +00:00
ager@google.com 1fe5a6d631 Complete the transition to unicode APIs on Windows.
Define _UNICODE and UNICODE so that we do not add accidental
dependencies on non-unicode APIs.

Reapply the change without the completely broken code in
socket_win.cc. Instead use 'A' versions explicitly.

R=sgjesse@google.com,antonm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16122 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 15:51:48 +00:00
ager@google.com 0952f0a37f Revert last unicode change. Causes Pub issues.
R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16105 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 12:56:02 +00:00
ager@google.com 2a3c575b79 Complete the transition to unicode APIs on Windows.
Define _UNICODE and UNICODE so that we do not add accidental
dependencies on non-unicode APIs.

Anton, this could have an influence on Dartium builds as well?

R=sgjesse@google.com,antonm@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16104 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 12:43:01 +00:00
ager@google.com 8d523fead9 Use unicode versions of process APIs on Windows. Additionally,
retrieve the arguments to dart as unicode strings.

R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16093 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 09:24:05 +00:00
aprelev@gmail.com b09632ab95 Fix floating point issues on Windows.
BUG=dartbug.com/5407
TEST=

Review URL: https://chromiumcodereview.appspot.com//11411188

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15546 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:40:12 +00:00
iposva@google.com 48aed26029 Fix bug 6586:
- Attempt to run the Monitor thread_test multiple times before failing
  due to its potential to failure due to timing.
- Use named constants when converting millis to seconds and nanos.
Review URL: https://codereview.chromium.org//11361157

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14695 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:07:54 +00:00