Commit Graph

2925 Commits

Author SHA1 Message Date
srdjan@google.com 7a5935bed3 Simplify code disabling logic in WeakCodeReferences.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37129 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-09 18:15:14 +00:00
regis@google.com 02f242021c Unify handling of identical(NaN, NaN) between generated code and Dart API.
Addresses issue 18738, assuming that the spec spec will be/has been updated so
doubles are identical iff they have the same representation as 64-bit IEEE
floating point numbers.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37118 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-09 16:40:58 +00:00
srdjan@google.com ff276cd808 Fix deferred loading code invalidation when both unoptimized and optimized code of the same function are entered in the dependency list.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37101 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 21:04:29 +00:00
srdjan@google.com 5f80480eea Improve scanner performance by remembering string's CharAt function as the string type does not change during scanner's lifetime.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37052 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 21:06:24 +00:00
fschneider@google.com 559e6410e2 First step in reducing the size of PC descriptors.
The descriptors used for patching just contain a pc offset
and can be stored with the code object instead of allocating
a full descriptor and linearly searching the list to retrieve
this information.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36989 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-04 11:02:34 +00:00
srdjan@google.com 5720dce013 In class Function replace current code field with current instruction field, that way we save one load when jumping to a target in, e.g., inline cache stub (function->instruction vs function->code->instruction).
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36948 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 21:28:05 +00:00
vegorov@google.com 4e286b316f Split GuardField into GuardFieldType and GuardFieldLength instructions.
Record expected length offset that matches guarded_cid.

This greatly simplifies code generation and control flow inside these guards.

Fixes the bug that was causing unoptimized code to call into runtime even when guard did not fail.

Add --trace-field-guards flags to trace updates to the state of guarded fields' properties.

BUG=http://dartbug.com/19003
R=fschneider@google.com, johnmccutchan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36872 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 13:53:53 +00:00
fschneider@google.com 9eb97cb338 Don't require eliminating certain type checks in unoptimized compilation.
The compiler relied on the graph builder to eliminate certain type
checks so that running without type check elimination required a
hack in the code generator to deal with the transition sentinel.

This CL makes type checks explicit in the AST and avoid inserting
them where they're not necessary (e.g. assigning null, sentinal values).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36734 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 10:16:05 +00:00
srdjan@google.com 2b06c73841 Remove unused code, improve speed of Parser::CurrentToken (improvement seen in measurements and profile).
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36710 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 21:12:24 +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
srdjan@google.com 45692c1248 More reduction of accessing TLS by caching/passing isolate value.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36598 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 23:26:48 +00:00
regis@google.com 9868b7ed94 Last cross-platform cleanup in preparation of improved ARM code for indexed
loads and stores.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36577 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 18:31:10 +00:00
iposva@google.com 3878793b10 - Reduce the number of Isolate::Current() calls.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36564 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 12:07:33 +00:00
srdjan@google.com df4718155a Added flags:
--enable-debugger (default true)
--emit-edge-counters (default true)
--use_field_guards (default true)

These flags can be turned off in order to measure their impact on code.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36537 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 23:47:20 +00:00
koda@google.com 61bde80790 Retaining path in Observatory.
Add retaining_path instance command to VM service, exposed in the Observatory
with a [find] eval-link in instance view. By default shows up to 10 elements,
possibly followed by [find more] which doubles the number of elements shown.

Change RetainingPath to include the object itself.

Always include an id in Object::PrintJSONImpl, to avoid instance-ref crashing on
internal objects.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36516 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 17:31:47 +00:00
iposva@google.com b4b4889406 - Refined https://codereview.chromium.org/293963008/
Make compilation VM more fine grained

- Use the isolate where appropriate.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36451 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 21:04:03 +00:00
regis@google.com 5d277649fd Fix issue 18646.
Add regression test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36448 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 20:27:09 +00:00
hausner@google.com d5807cf221 Fix code invalidation of functions with references to deferred libraries
When a code object with a reference to a deferred library prefix is
invalidated, it must be removed from the function object, and also
patched so that direct calls to it (from optimized code for example)
will trap and redirect to the newly compiled code.

Removing an overly eager assertion.

This fixes bug 18909.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36436 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 16:06:41 +00:00
regis@google.com 295aa14d5f Fix issue 18865.
Add regression test.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36307 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 17:31:14 +00:00
zra@google.com b39bcf7bf6 Allows unboxed doubles to be disabled.
This helps to support ARMv5TE. Also adds asserts to
ensure that neon and vfp instructions are not generated
when those features are disabled on ARM.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36262 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-16 17:17:52 +00:00
iposva@google.com ba4fef1136 - Make use of the fact that idents and literals are symbols.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36250 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-15 22:52:22 +00:00
asiva@google.com 77f15cb193 Add asserts to verify handle is always non null and the kIDENT literal
is a symbol.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36194 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 22:25:49 +00:00
koda@google.com da7bf22b7f * Rename misleading Instance::Equals to CanonicalizeEquals and document it.
* Keep 'Equals' alias for String and Integer.
* Add Instance::OperatorEquals that calls or mimics Object.operator==.

This is partly in preparation for internalizing HashMap/Set.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36066 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 20:53:23 +00:00
fschneider@google.com 50a04c417b Fix issue 18665. Avoid exposing a null-ptr in Function's code field.
The code field has to be initialized before any GC can happen.

BUG=dartbug.com/18665
TEST=isolate/mandel_isolate_test
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36018 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 09:15:37 +00:00
regis@google.com dec11d8b7b Add support for javascript incompatibility warnings (work in progress).
For now, warnings are only issued when applicable for type tests, type casts,
and toString.
Fix newly reported lint errors.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36001 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 22:42:10 +00:00
rmacnak@google.com 5c65f36f9a Grow a class's field array into old space when bulk adding.
We expect this to be the last regrow and the class to survive a long time.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35988 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 18:26:47 +00:00
rmacnak@google.com f4f4713eb8 Put metadata fields in their owner class to maintain the class-field bidirectional relationship asserted Field::PrintJSON.
Extended metadata scope test based on suspicions regarding the ordering of adding type parameters metadata fields versus ordinary fields of a class.

BUG=http://dartbug.com/18652
R=iposva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35926 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 18:15:33 +00:00
johnmccutchan@google.com 850074a704 Refactor 'dart:profiler' UserTag API
- Each isolate starts off with a 'Default' UserTag set.
- A null tag cannot be set.
- Calls to clearCurrentTag() should be replaced with a call to UserTag.defaultTag.makeCurrent().
- makeCurrent returns the previously current tag.

This allows for the following pattern to work:

callee() {
  var old = calleeTag.makeCurrent();
  ...
  old.makeCurrent();
}

caller() {
  var old = callerTag.makeCurrent();
  ...
  callee();
  assert(getCurrentTag() == callerTag);
  ...
  old.makeCurrent();
}

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35810 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 17:07:26 +00:00
johnmccutchan@google.com 6e3d6bbd78 Small cleanup to Code and Profiler
- Profiler doesn't show expander when node has no children.
- Code name is not prefixed with * on VM side.
- <code-ref> prefixes code name with * if referenced code is optimized.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35807 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 16:37:08 +00:00
turnidge@google.com 47890400ac Observatory grab-bag for 1.4 release.
- Make nav bar stick to the top
- Classes, functions, libraries are not immutable
- Expand some short lists by default
- Use uri to make a name for unnamed libraries
- Add Library class
- Fix z-index for navbar relative to heap map status pane
- Make NetworkError look nicer
- Dispatch known instance types to <instance-view>

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35785 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 04:04:10 +00:00
turnidge@google.com c5527ac2aa Various vmservice/observatory fixes:
- get rid of double lines on vm view page

- show eval errors in monospace font

- make eval highlight color consistent

- fix broken navbar on script view page

- show list of all libs for an isolate

- use two-column view to save space on isolate view page

- give the dart:nativewrappers library a name

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35745 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 16:54:59 +00:00
turnidge@google.com 14ccd5494d Don't remap class/type names in the vm service.
We add a new kind of name, PrettyName, to the vm.  This is a name
which is demangled but doesn't remap things like _OneByteString to
String or _Smi to int.

BUG=18360
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35710 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 21:37:01 +00:00
turnidge@google.com f8fcc45e3d Save the entry context for a function that has captured loop variables.
BUG=18561
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35692 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 16:14:05 +00:00
turnidge@google.com 939471292c $-indexed printf params don't work on all of our architectures, turns out.
Also, cleanup last fix a bit.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35655 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 20:03:17 +00:00
turnidge@google.com 9f20c4b0c1 Add some testing for the variable allocation code in the Parser.
This cl includes a test which documents the current incorrect behavior
when capturing loop variables.

BUG=18561
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35643 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 17:36:24 +00:00
regis@google.com 8868058d60 Enums cleanup.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35559 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 01:26:14 +00:00
turnidge@google.com 9243ffc4ff Always use the same json for null in the vm service.
PrintToJSONStream -> PrintJSON.

ALSO:

Fix <em> tags in the Observatory.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35532 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 18:10:02 +00:00
johnmccutchan@google.com bc35c1752e Display PC descriptors with disassembling in Observatory
Couple other fixes:

- Fix path to shared css
- Fix crash when printing null AbstractType.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35529 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 16:40:42 +00:00
hausner@google.com 8e56764233 Fix registration of closure functions
Closure functions get registered in the class by the
compiler backend. The incorrect assumption was that each
closure only gets visited once. However, closures in finally
clauses are duplicated when the AST nodes of the finally
clause are inlined. This change avoids the duplicate registration.

Fixes issue 18225

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35487 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 17:20:09 +00:00
regis@google.com e0ab99b0b2 Remember all deopt reasons in ic_data, not just the last one.
Remember if a JS warning was issued in ic_data.
Save a word in ic_data on 64-bit platforms.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35457 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:45:14 +00:00
hausner@google.com d7524ee0ba Generate escape sequence for non-printable ascii characters
Fix issue 17857.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35411 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 22:55:52 +00:00
iposva@google.com 0d236b7402 - Rationalize the way we use comments.
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35349 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 01:57:47 +00:00
iposva@google.com d8753e6f8b - Remove some unnecessary classes from the object store.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35343 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 23:45:17 +00:00
hausner@google.com 3f40651e3a Support evaluation of expressions in context of a stack frame
This change adds a debugger API function to evaluate an expression
in the context of a particular stack frame. The expression can
refer to local variables accessible in the frame, but it cannot
alter the variables.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35340 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 22:56:23 +00:00
koda@google.com 66a5a51365 Remove VM isolate new-space allocation.
This was wrong, since those objects were never pre-marked.

Also, in a future change, we can completely avoid reserving new-space for the VM isolate.

Add ASSERT that VM isolate never allocates in new space.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35339 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 22:48:33 +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
regis@google.com da0958c822 Expose functionality to create a stack trace to internal vm code.
Provide functionality to limit depth of printed stack trace.
Fix frame numbering in presence of invisible functions in stack trace.
Let FlowGraphBuilder know if it is building a graph to generate optimized code.
The above features will be used to warn on Javascript incompatibilities.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35319 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 17:58:12 +00:00
zra@google.com 0995122da8 Enables first codegen test on arm64.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35317 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 17:50:43 +00:00
rmacnak@google.com 7ba8ca5753 Reapply "Mark private functions in dart:* that are native or constructors as not visible (omitted from stack traces and ineligible for reflective enumeration or invocation)."
With fix for uninitialized is_dart_scheme_ when read from snapshot.

BUG=http://dartbug.com/15274
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35289 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 00:05:08 +00:00
regis@google.com 98bcbb0dae Do not ignore side effects of a type test or type cast as expression, such
as bound errors in checked mode.
Added tests.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35284 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 20:48:13 +00:00