Commit Graph

2925 Commits

Author SHA1 Message Date
zra@google.com 3701fb48fd Modifies assertion for possibly null code pointer.
A callee function's code pointer may be nulled by a
GC pass during inlining. The code itself is still
around because the inlining function retains a
reference, but a future change will ensure that
the GC pass doesn't null code pointers in inlined
functions.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29400 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 21:58:10 +00:00
turnidge@google.com d24c7e0be7 Don't inline functions if they have an active breakpoint.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29388 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:12:37 +00:00
regis@google.com 20badfb06e Register synthesized mixin application classes in the library and reuse them
when possible (fix issue 14318).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:46:32 +00:00
srdjan@google.com 255ffb6947 Specialize string equality for various string classes. Add intrinsics for one/two-byte string equality. Improves sudoku_solver by 10%.
R=regis@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29266 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 18:00:27 +00:00
lrn@google.com 3a01260611 Remove dart:json
BUG= http://dartbug.com/12843
R=floitsch@google.com, fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29240 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 10:30:34 +00:00
iposva@google.com 6267207e64 - Account for hidden frames when concatenating throw and
catch traces.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29218 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 22:08:33 +00:00
zra@google.com 039a4c4078 Disconnects code objects from infrequently used unoptimized functions.
Every 30 seconds (configurable by --code-collection-interval),
before a MarkSweep collection, this change halves a function's
usage count if it is unoptimized. If the function's usage count
reaches 0 as a result of this halving, it sets the function's
code pointers to null. Then, if the code object isn't marked
during the MarkSweep, it will be collected.

This change also checks for null code pointers in various
places, and recompiles/reconnects code if needed.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29209 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 21:26:15 +00:00
ajohnsen@google.com 28efa85e19 Add empty dart:platform library.
dart:platform will be a library that contains information about the runtime
platform. While it's not written in stones, this is examples of properties that
may be queried:

- OS
- Browser
- Browser version
- Dart Version
- numberOfProcessors
- pathSeparator
- Native or JS VM

BUG=
R=ahe@google.com, asiva@google.com, floitsch@google.com, iposva@google.com, kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29154 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 06:56:36 +00:00
iposva@google.com d369b7a0c9 - Ensure that the token stream from generated source matches the
original token stream in the presence of combinations of
  multiline string and string interpolation. If not this will
  cause mismatches when accessing code snippets, e.g when
  reporting parser errors or assertions.
- Ensure that ScanAll and ScanTo are in sync when adding or
  counting tokens.
- Added unit test for multiline strings and interpolation.
- Expanded GenerateSource unit test to iterate through all
  loaded libraries.
- Do not report columns for compilation errors in snapshotted
  code.
- Do not report columns from exceptions and errors when dealing
  with snapshotted code.
- Remove length field from TokenDescriptor. It was unused.
- Remove TokenStream::ComputeTokenPosition. It was unused.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29110 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 19:08:36 +00:00
rmacnak@google.com cfa80041e9 VM: Always return immutable collections from the mirrors.
Fix assert in partial demangling. Fix inappropriate compilation when handling parameters.

BUG=http://dartbug.com/14027
R=ahe@google.com, asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29030 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 19:53:14 +00:00
regis@google.com 5a5edb7f0c Report use of malbounded interface in type test.
Fix language tests related to malbounded types (issues 14123, 14131, 14132).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28943 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 19:49:19 +00:00
rmacnak@google.com c64d749f49 Remove conflict between type parameter and method/field from typevariable_mirror_metadata_test. Remove irregularity in metadata lookup naming that dealt with allow their co-existence.
BUG=http://dartbug.com/13327
BUG=http://dartbug.com/14016

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28815 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 18:49:27 +00:00
rmacnak@google.com 58c1759454 Generic instantiations of mixins and interfaces. Equality of type parameters.
BUG=http://dartbug.com/14113
BUG=http://dartbug.com/14114
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28768 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 00:16:34 +00:00
asiva@google.com 4ee18d0673 - Rearrange bits in the bitfields to get better compaction, this reduces
initial snapshot size by about 500 bytes.
- Fix initialization problem with redirecting factory bit

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28736 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 17:40:07 +00:00
regis@google.com 2f900dab13 Cache number of type arguments in class object instead of recalculating it.
Reduce size of num_native_fields field in class object.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28670 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:31:31 +00:00
turnidge@google.com b4b7e5899c Allow access to context variables in optimized/inlined frames.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28669 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:17:36 +00:00
srdjan@google.com 2f0a906dbf Cleanups, refactoring in anticipation of new string interpolation nodes. Removed unnecessary code.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 23:21:52 +00:00
turnidge@google.com 99ce6672cf Fix a typo in debugger.cc that was causing variable bounds checking to
be done on the frame context instead of the variable's context.

Update the unit test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28594 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 17:35:35 +00:00
rmacnak@google.com 564fbb68dd Add proper API for creating private symbols wrt a library.
BUG=http://dartbug.com/13355
BUG=http://dartbug.com/12358
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 20:56:14 +00:00
regis@google.com fcadf9fdd6 Overlap type arguments of a type with the type arguments of its super type
when possible. Overlapping may be partial.
Add flag --overlap-type-arguments controlling this optimization for debugging
and performance measurement (default is true).

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28539 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:36:25 +00:00
rmacnak@google.com 8a0d62f5f9 Substitution for type variables in mirrors on instantiated generics.
BUG=http://dartbug.com/12282
BUG=http://dartbug.com/13808
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28495 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 01:51:11 +00:00
regis@google.com 15bc5b9a0a Disallow extending a malformed type (issue 13940).
Add language test and update dart2js status (issue 13994 filed).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28488 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 23:30:42 +00:00
rmacnak@google.com 6ed9f2c17f Implement constructor kinds in the VM mirrors.
BUG=http://dartbug.com/13798
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28416 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 20:40:11 +00:00
asiva@google.com ed4621d768 Use HasTypeArguments instead of first computing NumTypeArguments();
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28367 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 17:09:01 +00:00
srdjan@google.com 3a8252f90d Cleanups: int -> intptr_t for "array" lengths, memory sizes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28324 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 20:19:37 +00:00
regis@google.com 321c9fe701 Rewrite Class::HasTypeArguments() for efficiency.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28319 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 18:38:31 +00:00
iposva@google.com e7e2e4bf03 - Rename arrays to lists:
_ObjectArray -> _List
  _GrowableObjectArray -> _GrowableList
  _ImmutableArray -> _ImmutableList

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28189 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 00:15:14 +00:00
bak@google.com 24d089f904 - Eliminated the excessive prefixing in the renamer of dart2dart.
- Increased a table size from 128 to 1024. Used in the parser for token compression.
  Startup is now twice as fast for app that has been through dart2dart.
  (this is a temporary fix for issue 13747)

R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28158 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 13:01:56 +00:00
jacobr@google.com 3a19cddf9c Respond to Ivan's code review comments from previous TBR cl.
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28135 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 23:48:45 +00:00
regis@google.com 79b9edbf2a Do not share type arguments of mixin types, but clone them to avoid finalization
errors when cycles are involved (issue 13688).
Add regression test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28107 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 18:26:05 +00:00
srdjan@google.com 30197aab9d Improve performance of string buffer by modifying concatAll native to allow growable array and an interval. Eliminate unnecessary check for String elements in release mode.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28102 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 16:48:12 +00:00
jacobr@google.com 154876856b TBR: fix build break
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28075 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 00:27:50 +00:00
jacobr@google.com 636d137f66 Fix for issue where external one byte strings cannot be escaped. This occured in practice when requesting all library names for a Polymer.dart example The likely reason why the issue occurs in this case but not others is that some of the libraries are generated using data urls. Added some tests for EscapeSpecialCharacters as it did not have any tests.
BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28073 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 00:08:01 +00:00
srdjan@google.com db2516d7c2 Add a is_recognized bit to function kind field. Improves performance of method recognizer and thus the compilation speed.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28026 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 21:00:59 +00:00
fschneider@google.com b389bddb1a Bug fix and cleanup of inlining of recognized [] methods.
1. Fix a bug with polymorphic inlining of [] on platforms that
don't support inlined SIMD ops (e.g. MIPS),
or unboxed int32/uint32. (ia32 with SSE <4.1).

2. Cleanup of duplicate code.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28000 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 10:27:47 +00:00
mlippautz@google.com 19763aae4d Implementation for ClosureMirror.findInContext.
Fixes issue 5897.

BUG=https://code.google.com/p/dart/issues/detail?id=5897
R=asiva@google.com, gbracha@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27982 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 01:28:12 +00:00
rmacnak@google.com 753af9b01b Implement closurization of regular methods in ObjectMirror.getField in the VM.
BUG=http://dartbug.com/13001
BUG=http://dartbug.com/13002
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27916 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 21:42:13 +00:00
regis@google.com 20c36666b8 Address comments of committed change https://codereview.chromium.org/24397002/
Fix typo in Matthias last commit.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27850 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 20:26:12 +00:00
iposva@google.com 8a9adf5656 - Use simplified token location call where appropriate.
R=asiva@google.com, hausner@google.com, mlippautz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27833 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 17:32:40 +00:00
hausner@google.com 3c360399ee Improve NoSuchMethodError error messages
- Don't say there is no constructor with name X if there is one
  that has incompatible parameter list.
- Better error message when mismatched optional parameters are passed.
  (Prviously only the number of parameters was considered, but not
  names of named parameters for example.)

Fixes issue 6189.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27826 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 16:14:28 +00:00
regis@google.com 3b5628fd1b Support mixin application typedef as mixin in the VM (issues 9383, 12773).
Disallow Object as mixin (issue 10952).
Detect illegal cycles in mixins.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27791 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 00:25:01 +00:00
mlippautz@google.com 728c46ca4f Make Script::GetTokenLocation() and Script::TokenRangeAtLine() use token streams
where possible.

BUG=
R=hausner@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27786 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 23:24:59 +00:00
johnmccutchan@google.com dfc2098b61 Add private TypedList getters and setters to the invisible list
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27778 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 16:58:49 +00:00
rmacnak@google.com c9eabbcb56 Make Dart_IdentityEqual live up to its sepc and not leak boxing implementation detail. (Reland r27542.)
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27774 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 16:23:06 +00:00
iposva@google.com d0b681f354 - Write the coverage data to a file instead of printing to stdout.
- Explicitly include lines with zero hits.

R=asiva@google.com, mlippautz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27726 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 21:37:48 +00:00
mlippautz@google.com b3cd74fec1 Use newline tokens when generating source from tokenstream.
Line numbers in generated source now match the actual source.

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27711 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 16:36:45 +00:00
johnmccutchan@google.com c86bdc5bcf Expose field data, use class id, and merge all collections into "objects"
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27684 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 00:59:42 +00:00
mlippautz@google.com 4fa46b7148 Introduce newline tokens into the token stream.
CL only introduces the tokens into the compressed token stream. We do not
use the newline tokens (yet).

Overhead:
snapshot: 6.4% (860k/808k)
compressed token stream (gen_snapshot): 21% (314312/259907)

BUG=
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27677 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 21:46:50 +00:00
hausner@google.com 21620841e6 More fingerprint fixes, and fixing the FP verification option
Review URL: https://codereview.chromium.org//24249004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27671 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 18:08:26 +00:00
fschneider@google.com ac08babf45 Polymorphic inlining of [] operations.
This CL adds the necessary parts to enable polymorphic
inlining of recognized methods. For now it handles only
[]-calls. This helps code that deals with e.g. growable
and fixed-length lists.

The basic idea is to adapt the code in the flow graph
optimizer so that it can be used from the generic inliner.
Currently this adds a bit of boilerplate code which I intend
to reduce when adding more recognized methods to be handled.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27627 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 15:41:45 +00:00