Commit Graph

7350 Commits

Author SHA1 Message Date
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
zerny@google.com 9cd03044eb Eliminate bounds checks on fixed-length registers array.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42653 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 12:24:46 +00:00
koda@google.com 85907b42ae Make helper functions static to avoid accidental collision and potentially aid optimization.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42650 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 01:02:40 +00:00
johnmccutchan@google.com 93e840e859 Fix compilation warnings in Windows event handler
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42649 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 22:51:00 +00:00
johnmccutchan@google.com 261200c587 Build Observatory as part of runtime
Relanding https://codereview.chromium.org/810623005/

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42645 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 21:59:42 +00:00
koda@google.com a1faa84c2a Make all tests pass ASAN.
Unpoison additional locations touched by profiler's stack walking.
Use return value of Isolate::GetProfilerStackBounds.

Commands to build and test:

export CXX="third_party/clang/linux/bin/clang++ -fsanitize=address -fPIC"

gclient runhooks

./tools/build.py -m debug -a x64 runtime

ASAN_OPTIONS=handle_segv=0 python tools/test.py --report --time --mode=debug --arch=x64 --compiler=none --runtime=vm --failure-summary --write-debug-log --write-test-outcome-log --copy-coredumps --exclude-suite=pkg --checked
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42635 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 15:44:26 +00:00
zerny@google.com 5c04899198 Define a lower threshold for optimizing irregexp generated functions.
The threshold is given by the flag --regexp_optimization_count_threshold
and has a default value of 1000.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42632 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 13:56:21 +00:00
lrn@google.com 3f1780f70d Change List/Set/Map/Queue.from constructrs to accept any iterable.
This allows using the .from constructor as a cast:

  new Set<int>.from(numSetContainingOnlyInts);

BUG= http://dartbug.com/21731
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42620 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 10:14:56 +00:00
whesse@google.com aa5a986d5d Revert "Build Observatory with runtime"
This reverts commit 76df7b3c1bf83c08d3994d61df4c9c530fadb4e5.
This commit breaks dartium compilation.

BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42619 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 10:07:58 +00:00
johnmccutchan@google.com 9d6ac72b46 1) Remove prebuilt Observatory sources
2) Move observatory from runtime/bin/vmservice/observatory to runtime/observatory

3) Add two tools scripts:
- tools/run_pub.py (runs pub before SDK is built)
- tools/obs_tool.py (helper for get, build, and deploy stages)

4) Build Observatory with runtime:
- pub get --offline
- pub build
- deploy

5) Build artifacts are now in standard output directory, for example, out/DebugIA32/observatory.

6) Add a new 'dart_boostrap' host target (no snapshot, no observatory) that can be used as the Dart executable to run pub when building Observatory. This is behind a build.py flag --use-bootstrap-for-observatory because:

- It is only necessary on older Linux distributions that are incompatible with the prebuilt Dart testing executable.
- running pub build with the boostrap Debug build is significantly slower.

7) Detect if the prebuilt executable doesn't work and automatically switch to the 'dart_bootstrap' executable. Also, warn the user and provide a Wiki link with more information.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42614 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 21:26:52 +00:00
hausner@google.com 6488a19c90 Patch classes do not need to be finalized
The fields and functions of a patch class are copied to the
patched class after parsing. There is nothing to do when finalizing
a patch class, so return immediately.

The debugger ran into an overly strict assertion when finalizing
a patch class. This fixes the issue. (Issue 21039).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42612 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 20:51:52 +00:00
regis@google.com ad8b021182 Process two 32-bit digits as one 64-bit digit in all bigint intrinsics on ARM64.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42611 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 20:46:48 +00:00
regis@google.com cc843c2189 Process two 32-bit digits as one 64-bit digit in all bigint intrinsics on x64.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42607 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 19:44:02 +00:00
zerny@google.com 2be85c9e7f Replace the use of local variables for irregexp registers by a typed array.
The use of locals put considerable pressure on register allocation and
caused lots of register shuffling.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42596 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 15:14:53 +00:00
lrn@google.com 8524d656af Omit variables beginning with "=" from Windows environment.
BUG= http://dartbug.com/21961
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42591 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 13:08:42 +00:00
koda@google.com 0b85873fc8 Deletion barrier preparation: validate overwritten references.
With the upcoming deletion barrier, every update of a pointer field must know whether the previous value was a valid pointer.

Currently, we always use StorePointer/StoreSmi, both for initialization and updates.

Initialization, and thus the potential for overwriting garbage values, appears in three places:
1. Object::Allocate/Foo::New.
2. Creating isolate from full snapshot.
3. Allocation in generated code.

Case 1 already null-initializes all underlying memory.
Case 2 is addressed by this CL by exploiting that:
i) fresh pages are zero-filled by OS, and
ii) freelist headers use only even values.
Case 3 is remains a TODO for future CLs.

(An alternative solution for case 2 would have been to add an init_foo method for every set_foo called.)

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42584 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-02 18:16:13 +00:00
hausner@google.com fb8004e485 Too much const kills the build
Review URL: https://codereview.chromium.org//829993003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42578 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-31 00:26:27 +00:00
hausner@google.com 74694f5a90 Interrupt isolates immediately
After requesting the interrupt, send a null message to the isolate
to ensure the isolate runs and detects the interrupt request immediately.

Fixes issue 21047.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42577 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-31 00:20:39 +00:00
iposva@google.com fd69128004 - Allow an isolate to be started in paused state.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42576 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-30 23:52:37 +00:00
hausner@google.com ab3af6ec00 Introduce is_debuggable state bit on function objects
Simplify debugger logic. Any function can be marked as
non-debuggable when is is created. The debugger no longer
needs a heuristic which functions are debuggable.
Mostly used for synthetic, generated functions that
have no source code, e.g. async code, implicit getters and
setters, implicit constructors, forwarding constructors,
dispatcher functions.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42570 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-29 22:31:17 +00:00
regis@google.com 4dc4caa34d Modify Bigint _mulAdd, _sqrAdd, _estQuotientDigit, and Montgomery _mulMod
methods to return the number of digits processed, so that their intrinsified
versions on 64-bit platforms can process digit pairs.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42568 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-29 18:40:44 +00:00
fschneider@google.com 009eb5d33c Move ConstantPropagator from flow_graph_optimizer.cc/.h into separate files.
flow_graph_optimizer.cc is becoming unnecessarily large, so
I'm  moving self-contained optimization passes into
separate files.

In a separate CL I'll also move load/store optimization into
separate files.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42567 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-29 14:41:27 +00:00
srdjan@google.com 49343faead Do not clobber dead temp registers at RestoreLiveRegisters as it may destroy the content of the result register as well. Fixes issue 21957.
Review URL: https://codereview.chromium.org//818343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42566 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-24 01:20:41 +00:00
srdjan@google.com e86aeecc72 Fix builds on Mac: icount_ is intptr_t.
Review URL: https://codereview.chromium.org//827453003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42565 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-24 01:07:17 +00:00
regis@google.com 562f845b87 Process two 32-bit digits as one 64-bit digit in bigint absAdd an absSub
intrinsics on ARM64.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42564 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-23 18:28:31 +00:00