Commit Graph

422 Commits

Author SHA1 Message Date
Ryan Macnak b8bad6725c Expand the class id to 32 bits and size field to 16 bits on 64-bit platforms.
Remove misleading suffix from disassembly of some ia32 immediate ops.

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

Review URL: https://codereview.chromium.org//1174173007.
2015-06-12 16:42:40 -07:00
Ryan Macnak a16abcdf5a Shrink some fields and add some bounds checks.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1149943009.
2015-06-09 10:47:25 -07:00
Srdjan Mitrovic c0824e7725 Fix 23563: double unary- operator unstable for NANs
BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org//1160453003
2015-06-03 11:00:28 -07:00
Ivan Posva 8f1506e817 - Determine whether the simulator is being used in globals.h
- Make sure to switch on HOST_ARCH_ and on USING_SIMULATOR
  where appropriate.
- Avoid allocating in new generation when running in the VM isolate.

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1156053006
2015-05-29 14:35:29 -07:00
John McCutchan 51d8bae199 Revert "Hide Isolate pointer from embedder"
This reverts commit 014e694ba7.

Revert "Fix fall out from hide isolate pointer change"

This reverts commit 966aafbc81.

Revert "Fix build"

This reverts commit d7b03ba7b0.

BUG=

Review URL: https://codereview.chromium.org//1140263005
2015-05-19 11:41:42 -07:00
John McCutchan 014e694ba7 Hide Isolate pointer from embedder
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1130753006
2015-05-18 14:06:10 -07:00
johnmccutchan@google.com e23be8563a Fixes to enable building dart:io implementation cleanly in mojo tree
+ make Observatory respect script line offsets (which Sky uses).

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45427 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-27 14:46:32 +00:00
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