John McCutchan
0cfd4f5cd5
GN Build fixes for Flutter + gen_snapshot fix
...
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 .
2016-04-22 07:00:03 -07:00
Vyacheslav Egorov
ee0f608ce4
Dart Byte Code interpreter.
...
This version is Clang/GCC only and does not support Windows because it uses computed goto's.
Only unoptimized mode is supported.
Architecture is described in constants_dbc.h and stack_frame_dbc.h.
R=fschneider@google.com , zra@google.com
Review URL: https://codereview.chromium.org/1858283002 .
2016-04-18 23:02:01 +02:00
Srdjan Mitrovic
cef337f8c7
Add instruction tags to saved ICData (debug mode only).
...
When restoring ICData in optimizing compiler, we can verify that the ICData/deopt-id matches an instruction. This should help catch non-deterministic graph generation.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1864143002 .
2016-04-06 11:01:46 -07:00
Zach Anderson
08450dc432
Begin work on ios secure sockets
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org/1839123003 .
2016-03-31 12:55:31 -07:00
John McCutchan
9bc7398eb8
Ensure embedder timeline callbacks are called for service protocol requests
...
BUG=
R=chinmaygarde@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1799933002 .
2016-03-15 07:59:04 -07:00
Ivan Posva
c822c34af6
- Add DEBUG_ONLY and NOT_IN_PRODUCT macros.
...
- Remove user_name_ field from RawClass using macros.
- Consolidate "#ifndef PRODUCT" and "#ifdef DEBUG" code using macros.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1715123003 .
2016-02-19 17:48:08 -08:00
Ivan Posva
4f392df85e
Fix some more shorten-64-to-32 warnings:
...
- Remove duplicate check for javascript integer overflow.
- Make sure the BitField class knows the type it is
encoding into.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1644223006 .
2016-02-02 13:58:06 -08:00
Zachary Anderson
963946af00
Disable TLS destructors on Windows before calling abort() for an ASSERT.
...
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 .
2016-01-11 10:35:00 -08:00
Ivan Posva
6249c2bcf3
- Remove the legacy debug protocol.
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org/1497033003 .
2015-12-03 17:46:02 -08:00
John McCutchan
aaf37ad035
Landing patch set 7 from https://codereview.chromium.org/1450113003/
...
Review URL: https://codereview.chromium.org/1466523002 .
2015-11-19 14:18:52 -08:00
John McCutchan
28e416b1f4
Revert "Avoid strerror_r portability issues"
...
This reverts commit ca81c1732b .
2015-11-17 16:34:25 -08:00
John McCutchan
ca81c1732b
Avoid strerror_r portability issues
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1450113003 .
2015-11-17 15:23:47 -08:00
Zachary Anderson
3563dc0fb0
Use ExitProcess on Windows.
...
Even after joining threads, it is still possible for the exit code to be
polluted. NaCL uses ExitProcess to avoid this problem:
https://code.google.com/p/chromium/codesearch#chromium/src/native_client/src/shared/platform/win/nacl_exit.c
This change also cleans up thread local storage for the last Thread.
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org/1410293006 .
2015-10-29 23:35:46 -07:00
Chinmay Garde
87ce99fd00
Enable generation of instruction buffer on precompilation
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1411383004 .
2015-10-22 12:26:41 -07:00
William Hesse
e6b85bb28c
Use #if TARGET_OS_IOS instead of #ifdef TARGET_OS_IOS.
...
New versions of the OS X SDK always define TARGET_OS_IOS, as 0 or 1.
BUG=https://github.com/dart-lang/sdk/issues/24501
BUG=https://github.com/dart-lang/sdk/issues/24453
R=iposva@google.com
Review URL: https://codereview.chromium.org/1388973002 .
2015-10-12 12:38:10 +02:00
Todd Turnidge
cc981c8246
Don't use %p when generating disassembly in vm service.
...
Evidentally it is platform dependent -- it seems to include the 0x
prefix on mac but not on windows. I've switched to using %" Px "
instead.
This will fix bug 24038.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1282993002 .
2015-08-11 11:22:55 -07:00
Todd Turnidge
81d5c8c508
Add STDOUT_FILENO, etc., for windows build.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1234953003 .
2015-07-14 14:28:06 -07:00
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