Commit Graph

6000 Commits

Author SHA1 Message Date
zra@google.com 01ac0b3dc9 Removes stub from arm64 to fix build.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34787 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 17:56:59 +00:00
hausner@google.com 2b4e3c7c99 Implement deferred constant support
Compile time constants lose their const-ness if they are referred
to through a deferred prefix. This CL adds a flag to some ast node
types that remembers whether a field or closure was referred to
via a deferred prefix. If so, the compile-time const analysis flags
the value as non-const.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34785 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 17:31:32 +00:00
fschneider@google.com 61b0757d05 Fix bug in closure call stub.
Since closure calls and method calls both use the same lazy-compile stub,
we need a GC-safe value in the IC data register also at closure calls.

TBR=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34777 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 11:47:13 +00:00
fschneider@google.com 9ed4cf1cb6 Simplify and improve handling of IC and megamorphic cache miss handling.
Instead of going back and forth from stub code to C++, perform
only the lookup in C++ and call target functions only from
stub code.

noSuchMethod and implicit closure invocations are now also work with
the megamorphic cache. Before they would go slow-case in the megamorphic case.

This CL eliminates the InstanceFunctionLookup stub that was previously
used to handle noSuchMethod and implicit closure invocations.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34774 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 09:27:43 +00:00
koda@google.com b3535bf501 Extend Timer to track longest contiguous interval, and add GC timer.
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34749 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 22:13:59 +00:00
koda@google.com 5e4d540c27 Corrected resubmssion of r34736.
Fix: Division by page size in NeedsGarbageCollection.
Original description:

Generalize the interface of page space controller.

Gather used/capacity/external into SpaceUsage object,
and use it for testing whether GC is needed before or
after an allocation.

This refactor does not affect policy, but prepares for:
1. Replacing promotion failure check/tracking.
2. Better growth control for external allocation.

TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34747 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 21:04:48 +00:00
koda@google.com 09b1d66049 Revert r34736 due to slowdown.
TBR=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34741 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 18:39:10 +00:00
regis@google.com 91388a5f79 Simplify and fix instantiation of recursive types.
Add tests for non-contractive types.
Cleanup language tests status file.
Enhance tracing of type finalization.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34739 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 18:27:53 +00:00
turnidge@google.com d358d84eb7 Begin implementing flag --deoptimize-filter=FUNC for ia32.
Currently not functional - committing so that srdjan can investigate
why it doesn't work.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34737 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 18:05:37 +00:00
koda@google.com 00445b37ea Generalize the interface of page space controller.
Gather used/capacity/external into SpaceUsage object,
and use it for testing whether GC is needed before or
after an allocation.

This refactor does not affect policy, but prepares for:
1. Replacing promotion failure check/tracking.
2. Better growth control for external allocation.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34736 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 17:46:15 +00:00
srdjan@google.com 6d56854a9a Add optimization for pow(base, 0.5) to the other architectures as well.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34717 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 19:44:18 +00:00
zra@google.com dcc2284689 Adds subract, move wide immediate instructions to ARM64.
Also adds tests for move, add shift, add extended.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34715 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 18:26:11 +00:00
iposva@google.com dd7d6dd375 - Handle doubles transferred in message snapshots specially.
- Do not encode doubles using integer compression.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34681 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 00:58:14 +00:00
johnmccutchan@google.com 431761e878 Miscellaneous Observatory UI improvements
Update cursor over expander in profiler

Ressurect json-view

Show arrow in profiler tree

Clicking on <code-ref> link in profiler doesn't expand tree

<code-ref> only shows a link for Dart code

Port script-view to use script-inset

Add function source to function view

Add counters to isolate view

Add counters to isolate summary

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34661 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 18:30:01 +00:00
srdjan@google.com 58f2385da4 Add flag --inlining-callee-size-threshold (80), that prevents inlining too large functions. 'Accidentally' restores performance of NBody. Improves compilation speed (dart analyzer and stress6 test)
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34657 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 18:03:37 +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 a3e5a06a90 Speed up snapshots of *int8lists, by using memmove.
BUG=https://code.google.com/p/dart/issues/detail?id=17951
R=asiva@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34649 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 15:53:23 +00:00
ajohnsen@google.com 37994d7588 Trigger old-space GC when scavange made the external heap of old-space larger than max old-space size.
BUG=
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34647 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 14:24:53 +00:00
fschneider@google.com cc9e3b8068 Introduce a lazy-compile stub for functions.
The function's code pointer is either a lazy-compile stub
or the compiled code. The function is compiled on invocation.

There is no need to check for null when invoking a function. This means
one check less when invoking functions via a stub. For this I added a  LazyCompile
stub.

Additional cleanup in Stackmap and PcDescriptors (remove unused code pointer,
and changed smi-lengh into a raw integer).

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34643 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 12:37:48 +00:00
srdjan@google.com 883486f303 Fix builds for finicky compilers.
Review URL: https://codereview.chromium.org//221623002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34625 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 23:39:56 +00:00
srdjan@google.com 4fed01aef9 Optimize pow(x, 0.5) to use sqrt instead.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34624 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 23:25:06 +00:00
johnmccutchan@google.com ab19ef4f31 Redo allocationprofile options
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34620 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 22:05:39 +00:00
turnidge@google.com cc82321046 Add <eval-link> - a custom element for evaluating an expression.
Use <eval-link> to add a convenience toString() link for instances.

In the future I plan to use <eval-link> to provide easy access to getters.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34616 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 20:18:17 +00:00
turnidge@google.com b373e6c423 Change how we provide value previews in the vm service.
Rename the 'preview' property to 'valueAsString'.

Rework printing so that we only add 'valueAsString' when we need it
(num, String, etc.).

Change ToUserCString to be a String-only method.  Drop ToUserCString
for lists -- it was hokey and unused.  Max string length is now 1024
instead of 40.

Update tests.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34612 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 19:45:57 +00:00
turnidge@google.com bb6003d9b7 Fix line number table generation for multiline strings with interpolation.
Share the line number table generation code between debugger and vm service.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34606 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 18:16:27 +00:00
hausner@google.com b36457263a Deferred prefix support in metadata
Deferred prefixes are never ok in metadata, since metadata is required
to be compile time constant.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34601 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 16:11:28 +00:00
ajohnsen@google.com 59fcec073c Don't make the signal-pipe non-blocking.
This is an attempt to make it run on MIPS. The non-blocking is not
needed here.

BUG=https://code.google.com/p/dart/issues/detail?id=17826
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34594 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 12:15:21 +00:00
ajohnsen@google.com 45d35b1588 Make non-copying version of BytesBuidler and make file-reads faster.
The non-copying version is internally, as this is always the behaviour
we want, when receiving data from the system.

File-reads are also further improved, by only reading data in chunks, if
initial length is 0. This is a special case where the file can be a
character device. Overall improvement is around a factor of 6.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34589 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 10:56:19 +00:00
hausner@google.com 6daac5a3e2 Fix code invalidation for deferred code
Review URL: https://codereview.chromium.org//217483008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34545 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-29 00:25:16 +00:00
iposva@google.com e78cc1544d - Make ports be less predictable.
- Limit the range of port numbers to 30-bits.
- Parse the ports as 64-bit values when reading from the wire in the debugger protocol.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34542 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 23:39:36 +00:00
rmacnak@google.com f0626388f5 VM: Evaluate metadata on a class in the scope of its library not the scope of the class.
BUG=http://dartbug.com/17795
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34537 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 22:38:32 +00:00
turnidge@google.com 9b814028a3 Minor fix in isolate-view.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34530 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 22:09:53 +00:00
turnidge@google.com 3e86631f02 Use tokenPos instead of line/col in the vm service.
Add line number information to the Script response.

Parse line number information in the observatory.

Update <script-ref> to take a pos argument

Add a new <script-inset> element which shows a code snippet.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34528 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 21:24:24 +00:00
turnidge@google.com 3adcbe1071 Rework the <field-view> page.
Give fields/functions a consistent notion of ownership.

Add field's script to the JSON.

Make page reload work again.

Fixup closure printing a bit.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34520 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 20:21:09 +00:00
rmacnak@google.com 9c105f7c9c Handle creating ParameterMirrors for the parameters of forwarding constructors.
BUG=http://dartbug.com/17823
R=hausner@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34494 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 01:22:03 +00:00
asiva@google.com db11f77af7 Use ASSERT instead of CHECK_ISOLATE in cases where we derive the isolate from the native Arguments structure.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34488 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 23:05:57 +00:00
koda@google.com 79725661a7 Reduce GC from external allocation.
Before, external allocs artificially reduced new space capacity.
Now, we separately limit on total external size in new space.

Makes scavenges less frequent, while still limiting total footprint.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34485 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 22:11:39 +00:00
hausner@google.com ed24226376 Support deferred library prefix syntax
First step towards deferred library support:
- Parse the “deferred as” import clause.
- Implement p.loadLibrary() which returns a future that
  completes when the library is loaded.
- Treat type annotations of deferred types as malformed.
- Throw NoSuchMethodError when calling functions from
  unloaded libraries.
- Libraries are still read synchronously, but items in the
  library won’t be visible through the deferred prefix until
  the future returned by loadLibrary() completes.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34481 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 21:20:47 +00:00
srdjan@google.com 36d8c9a39c Fix bug in divpd x64.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34475 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 16:43:40 +00:00
regis@google.com f60ab4dd11 Detect and reject illegal recursive types (non-contractive types).
Fixed instantiation and equality of recursive types.
Added many asserts to detect issues with recursive types.
Disabled bad tests. They declare illegal types and will be fixed in a later cl.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34460 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 23:38:18 +00:00
srdjan@google.com bc523dedc8 Fix dartium build.
Review URL: https://codereview.chromium.org//213733002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34455 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 22:45:22 +00:00
srdjan@google.com ec6a6d8837 Incremental tuning/cleanup of inlining: --print-inline-tree changed to --print-inlining-tree; print also methods that were not inlined.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34451 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 21:24:35 +00:00
iposva@google.com 0977a3bf2b - First step in refactoring ports with the goal of moving
them closer into the VM implementation.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34438 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 17:30:39 +00:00
turnidge@google.com 99fca31c02 Support Types in instance-ref/instance-view.
Refactor JSON printing for all instances to share more code.  This allows Types to act like Instances in Observatory.

Update the look and feel for the function-view page.

Add script info for functions.

Update tests.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34435 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 17:13:03 +00:00
ajohnsen@google.com a9f357b4b6 Speed up toLowerCase, by manually inlining the upper-case part.
Some benchmarks show up to 25% faster toLowerCase.

BUG=
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34423 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 12:19:55 +00:00
kasperl@google.com 0d1c6ddec8 Revert "- Make ports be less predictable."
This reverts r34209 which is causing the x64 VM to hang when
running command-line applications from within the editor.

R=ricow@google.com, iposva@google.com
BUG=http://dartbug.com/17806

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34420 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 11:38:30 +00:00
lrn@google.com 249d09fd82 Optimize String.fromCharCode.
BUG= http://dartbug.com/17781
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34419 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 11:37:01 +00:00
ajohnsen@google.com 862687a1ad Don't use ThreadSignalBlocker in mac eventhandler.
Turns out kevent can modify the current sigmask.

BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34408 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 06:21:38 +00:00
rmacnak@google.com 78ab60a0de Implement MethodMirror.location in the VM.
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34400 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 00:44:54 +00:00
ajohnsen@google.com fbdb9a85d8 Add optimized _OneByteString.toLowerCase.
BUG=
R=sgjesse@google.com, sra@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34393 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 21:44:09 +00:00