Commit Graph

7374 Commits

Author SHA1 Message Date
koda@google.com 33b55e64e4 Isolate/Thread split: Isolate -> Zone for LocationSummary.
The isolate was being passed around, even though only its current zone was used.

Pass that zone directly instead, giving two benefits:
1. helps prepare for the upcoming Isolate/Thread split, where "new(isolate)" must go, and
2. saves a pointer indirection at the allocation sites.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42935 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 21:29:57 +00:00
johnmccutchan@google.com 20a9d706a4 More fixes for observatory build dependencies
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42927 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 19:36:55 +00:00
johnmccutchan@google.com 3f9fad484c Make fetch_observatory_deps depend on packages
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42926 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 19:29:10 +00:00
sgjesse@google.com c831cdf97f Revert "Revert "Make stdout/stderr async""
This reverts commit r42909

TBR=ricow@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42910 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 14:33:35 +00:00
sgjesse@google.com bc1be9c45f Revert "Make stdout/stderr async"
This makes writes to the stdout and stderr IOSinks in dart:io blocking again.

To get the non-blocking behaviour the getter "nonBlocking" will return an
IOSink with real non-blocking behaviour.

Updated the class exposed for stderr to also support checking for whether it
is connected to a terminal and checking the terminal size.

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

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42909 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 14:18:16 +00:00
fschneider@google.com dfdb8c12db Refactor and simplify manual inlining in the flow graph optimizer.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42908 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 13:58:01 +00:00
fschneider@google.com 1e7310d48f Improve constant pool implementation in the assembler.
Instead of using RawObject* as keys, use Object*. Using handles eliminates any assumption
about the underlying GC implementation (e.g. requiring that old objects don't move).

Remove special handling of null_object by making HashMap more generic and
allowing the trait to specify the value used to indicate an empty element.

The goal is to use one unified, efficient implementation of the constant
pool on all architectures that require one (x64, arm64, mips).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42901 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 10:43:36 +00:00
koda@google.com 0aeee6156e Add include.
Not sure whether this is related to the Debug win32 build failure.

TBR=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42898 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 06:15:22 +00:00
koda@google.com 24f227d38e Rename more friend declarations.
TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42896 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 02:45:51 +00:00
koda@google.com c7e9e048ed Rename Thread -> OSThread.
It's a collection of static utility methods for primitive operations on OS threads.

Make room in the namespace for upcoming class that will represent all the complex state of a VM thread.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42895 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 02:30:07 +00:00
zra@google.com c5a7450902 Makes create_snapshot_bin.py pass along a --package_root flag.
This allows a script snapshot to import from package: uris.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42887 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 21:59:36 +00:00
koda@google.com 044fc59fb6 Temporarily move vm_tag_ from BaseIsolate to Isolate.
This field is used by performance sensitive generated code.

Moving it out of BaseIsolate will simplify the first step towards replacing BaseIsolate with an actual thread state abstraction. It will later be migrated to that thread class (along with many other fields of Isolate).

Also remove an unused accessor from Isolate.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42884 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 21:18:49 +00:00
koda@google.com 4c7e0fa307 Suspend long jump scope when invoking Dart code.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42880 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 18:37:43 +00:00
vegorov@google.com cafe4db7de Tweak CanLoadFromObjectPool to return true even if obj.InVMHeap().
Previously it made sense to return false from this predicate because we would then load it directly as immediate.

However after r28067 we switched from movq to LoadImmediate. Now we end up putting obj.raw() into a constant pool with lowest bit masked off (to make it look like a smi) and then restoring this bit after load:

movq r10, [r15 + offs]
orq r10, 1

This orq is completely redundant - we should not clear off the least significant bit in the first place.

BUG=
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42877 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 17:57:27 +00:00
johnmccutchan@google.com eeeda72067 Do not ignore core libraries from CHA analysis.
I ran into issues with the collections library where classes and types were being finalized very late, affecting cha analysis.

class _LinkedCustomHashMap<K, V> extends _CustomHashMap<K, V> with _LinkedHashMapMixin<K, V>

abstract class _LinkedHashMapMixin<K, V> implements LinkedHashMap<K, V> {

Even though LinkedHashMap is a builtin object it can still be implemented after startup.

R=fschneider@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42874 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 17:03:45 +00:00
lrn@google.com de2b7c40d4 Optimize creation of ASCII strings in UTF-8 JSON parser.
Recognize that the string is ASCII only during scanning, and just use
String.fromCharCodes directly, instead of interpreting as UTF-8 first.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42857 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 10:22:53 +00:00
regis@google.com a1c9e2b6b0 Simplify double to bigint conversion.
Remove 3 bigint mutators.
Remove unused support to create vm internal error.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42842 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 21:29:44 +00:00
regis@google.com 8a96f1947c Revert modPow introduction since dart2js does not like it.
Review URL: https://codereview.chromium.org//851763002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42827 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:47:11 +00:00
koda@google.com b14c05aa42 Fix build by silencing zero-length memset warning.
When the compiler figures out that a particular code path does not add any elements to a zone-allocated growable array, it will generate a warning for the debug-mode zapping code in Zone::Free:

/usr/include/bits/string3.h:82:32: error: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters [-Werror]

There are plenty of false positives, e.g., a struct member happens to be unpopulated at a particular use case.
Fix this by only calling memset for non-zero lengths.

TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42825 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:34:09 +00:00
regis@google.com ef1c21b293 Fix issue 21795.
Add regression test.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42824 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:16:50 +00:00
regis@google.com 485be555bf Add modPow(int exponent, int modulus) method to int abstract class.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42823 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 17:13:59 +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
zerny@google.com 0f26601cf4 Create a symbol before setting the irregexp function name.
TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42810 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 14:12:44 +00:00
zerny@google.com a2e2f32734 Append the regexp pattern to the name of the generated irregexp function.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42805 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 13:31:53 +00:00
koda@google.com 5d9e207c44 Double-align Zone allocations to fix MIPS issue.
Also ensure initial buffer is aligned.

~2% increase in total allocated zone memory on compile-heavy benchmarks.
No significant impact on speed for either ia32 or arm.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42797 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 01:56:30 +00:00
asiva@google.com ca1c3241c4 Fix for issue 21398.
Accept only 'literal-like' objects when sending messages to isolates
spawned using spawnURI. Allow all objects for isolates spawned using
spawnFunction.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42793 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 23:14:30 +00:00
koda@google.com 01dfb15825 Grow allocation in Zone::Realloc when possible.
Typical success rate is 30-40% of calls to Realloc, which is used by GrowableArray.

Typical total zone memory savings are ~3%.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42788 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 22:00:27 +00:00
vegorov@google.com cc33fcab6b Handle LoadClassId(obj) === cid during type propagation.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42779 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 17:25:22 +00:00
zerny@google.com a557c0048b Support unboxed input to indirect goto instruction.
R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42762 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 06:09:48 +00:00
iposva@google.com 57b4eef0d4 - Remove entirely disconnected unhandled exception handler.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42759 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:39:42 +00:00
johnmccutchan@google.com 4526f3ed72 Improve performance of table trees by around 3x
*) Stop using Polymer's template repeat for building table trees.
*) Refactor TableTree and TableTreeRow to be easier to use without template repeat.
*) Port class tree to new TableTree interface.
*) Rename isolate-profile to cpu-profile.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42755 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:03:14 +00:00
koda@google.com 98e2fafbf2 Rank most retaining instances for each class.
Keep a heap snapshot (object graph) in the isolate.
On request from a class view, show 10 most retaining instances.

Currently, a new snapshot is fetched every time a ranking is requested.
In the future, we will want more fine-grained management of snapshots,
with its own dedicated view/console.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42754 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 21:31:14 +00:00
koda@google.com c9a15058f7 Really really fix mac x64 debug build by using more fixed-length encoding and long jumps.
(We could consider always using fixed-length encoding in DEBUG mode to avoid this.)

R=iposva@google.com
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42753 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 20:33:59 +00:00
regis@google.com 03fa3d1ff4 Mark mutator methods of canonical constants as invisible to reflective access.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42747 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 18:03:31 +00:00
zra@google.com d077e38107 Fix MIPS assembler test.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42746 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:59:11 +00:00
koda@google.com 4627fe96f6 Unit tests for 'testb' instruction on ia32 and x64.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42742 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:22:16 +00:00
koda@google.com be752b6fa5 Fix mac x64 debug build by using fixed-length encoding.
Triggers unreliably due to memory layout.

TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42740 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 17:05:13 +00:00
sgjesse@google.com 218e366f89 Add support for file locking
This adds support for file locking in dart:io.

BUG=http://dartbug.com/17045
R=kustermann@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42733 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 13:06:37 +00:00
koda@google.com 1844d3a3a2 Fix debug mac 64 bit build; use far jumps when needed.
This didn't trigger on my machine due to memory layout affecting the size of encoding of immediate constants.

TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42724 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 02:29:51 +00:00
koda@google.com 13b1939676 x64 port of r42717.
Review URL: https://codereview.chromium.org//842953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42723 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 02:04:30 +00:00
koda@google.com 600cd31660 Distinguish between initialization and updates to object fields. Currently only for DEBUG mode verification, but will be needed for deletion barrier.
Split up initialization flag in StoreInstanceFieldInstr for needed more precise semantics.

Zap swept old space with same value as uninitialized new in debug mode.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42717 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 20:45:39 +00:00
fschneider@google.com 4201900778 VM: Small generated code size improvements on x64.
Addtional cleanup in code_patcher on all platforms.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42700 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 16:42:05 +00:00
zerny@google.com 786485b43b Use a fixed-size typed array for the dispatch offsets table.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42686 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 11:21:29 +00:00
ricow@google.com 7ff7dbfc71 Make the observatory building be dependent on the pkg_packages target
With the current setup (as of revision 42679), a clean build of:
tools/build.py -mrelease build_observatory

Will throw an error since the args packages has not yet been symlinked into the out/ReleaseIA32/packages location.

R=ager@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42683 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 09:59:04 +00:00
iposva@google.com 8609239930 - Move VM specific helpers to the common dart:io patch file.
Review URL: https://codereview.chromium.org//812673009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42675 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 23:02:06 +00:00
iposva@google.com 2104fd6165 Fix http://dartbug.com/21834
- Ensure that microtasks fire after every timer event, instead
  of being bunched together once all pending timers fired.
- Do not wait for timer message to be delivered. Trigger timers
  as soon as they are ready from within the message handling
  loop.
- Notify timers in the order of wakeup time regardless of
  specified timeout value. (AKA Do not allow Timer.run to
  overtake new Timer() scheduled operations.)

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42673 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 22:21:59 +00:00
johnmccutchan@google.com 81ce3ffef4 Speedup profile generation for stress test benchmark by 176x
Processed 779753 frames
CodeTables: live=9604 dead=5345 tag=51

FixTopFrame took 158092 millis.
CodeRegionTableBuilder took 13616 millis.
CodeRegionExclusiveTrieBuilder took 283 millis.
CodeRegionTableCallersBuilder took 57 millis.
CodeTableStream took 5637 millis.

~176 seconds

--- Fix PageSpace::FindObject to fast path executable pages

Processed 648584 frames
CodeTables: live=9398 dead=4655 tag=45

FixTopFrame took 68401 millis.
CodeRegionTableBuilder took 6401 millis.
CodeRegionExclusiveTrieBuilder took 222 millis.
CodeRegionTableCallersBuilder took 45 millis.
CodeTableStream took 267 millis.

~74 seconds

--- Fix PageSpace::Contains to fast path executable pages

Processed 690756 frames
CodeTables: live=9329 dead=5310 tag=49

FixTopFrame took 234 millis.
CodeRegionTableBuilder took 173 millis.
CodeRegionExclusiveTrieBuilder took 265 millis.
CodeRegionTableCallersBuilder took 60 millis.
CodeTableStream took 331 millis.

~1 second

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42672 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 21:39:49 +00:00
hausner@google.com bb1ab60dc0 First step in eliminating —enable_async flag
Switch default value of enable-async to true, and remove the flag
from test source code.

Next step is to remove the flag altogether

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42670 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 19:42:59 +00:00
johnmccutchan@google.com 4b1c7f2de8 Remove unnecessary polyfill script include
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42665 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 16:39:02 +00:00
lrn@google.com cc0151bf2e Optimize DateTime constructor slightly.
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42656 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 13:09:47 +00:00