Commit Graph

5129 Commits

Author SHA1 Message Date
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
hausner@google.com 07c06be8e7 It's a compile-time error if a const constructor call fails
Making it a compile-time error if a const constructor call
fails. Also improve error message when invoking dart code during
compilation fails.

Fixes issue 14302

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29212 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 21:42:39 +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
rmacnak@google.com 24254f150c Hoist generics-related functions from ClassMirror to TypeMirror.
R=ahe@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29195 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 18:56:49 +00:00
hausner@google.com cf4da8d1d9 Properly report error for certain expressions that must be const
Issue error message instead of hitting assertion for an expression that
contains an assignment but is expected to be const.

Fixes security issue 13941

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29194 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 18:54:52 +00:00
asiva@google.com a294e0a82f Fix for issue 14236:
Retain script path of parent isolate when spawnFunction is called so that
it works when using script snapshots.

The test case issue14236_test.dart is a script snapshot whose original source
file path is issue14236_source.dart

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29178 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 16:41:22 +00:00
ajohnsen@google.com e02b5a3fa4 Make FileSystemEntity.watch return a broadcast stream.
BUG=https://code.google.com/p/dart/issues/detail?id=14378
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29170 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:30:20 +00:00
ajohnsen@google.com 103eac574c Remove FileException, DirectoryException and LinkException from dart:io and use FileSystemException instaed.
BUG=https://code.google.com/p/dart/issues/detail?id=12461
R=nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29168 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:17:20 +00:00
lrn@google.com ff1d105a0f Remove deprecated 'str' getter on Match.
BUG= http://dartbug.com/12843
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29167 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:06:41 +00:00
ajohnsen@google.com 4894d4548c Fix issue where we would double unwatch the path.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29164 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 10:26:00 +00:00
ajohnsen@google.com 33daee971b Use while(condition) around monitor wait, in file_system_watcher_macos.
This fixes a potential threading-issue, where the wacther could be used before it was fully initialized, if 'wait' woke up before notify.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29163 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 10:24:08 +00:00
ajohnsen@google.com b4be8b8080 Stop watching when removing watched path, for Mac OS X as well.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29161 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 08:42:07 +00:00
ajohnsen@google.com fdea26c768 Close file watcher when target is deleted.
BUG=http://code.google.com/p/dart/issues/detail?id=14374
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29159 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 08:12:16 +00:00
ajohnsen@google.com 8ef0f9e76f Add missing line to gyp file.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29155 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 07:13:25 +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 06719f8ea7 Fix bug 13827:
- Do not attempt to GC old space while in full growth mode when creating
  the token stream for a newly loaded source file.

R=bak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29153 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 05:45:09 +00:00
iposva@google.com e8f2abb833 Fix build:
- Dartium is skipping some numbers when creating frames.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29140 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 01:16:10 +00:00
iposva@google.com 7fb172b783 - Don't mix the collection of Error.stackTrace with the collection of
the stack trace for try-catch.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29136 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 00:16:55 +00:00
hausner@google.com ddd9907e23 Implement type checks for switch expression
If the switch expression is not compatible with the case clause
constants, we must report a runtime error. Implement this by annotating
the temporary variable holding the switch expression with the correct
type.

Issue 7274

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29126 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 21:15:25 +00:00
regis@google.com 177276f059 Report compile-time error for const factories redirecting to malformed type
(fix issue 14305).

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29123 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 21:03:11 +00:00
srdjan@google.com 8e7c6a5fae Move Stringinterpolation constant folding from constant propagator to canonicalizer. StrinIterpolateInstr cannot directlly refer to interpolation arguments but only to the array that holds them, therefore constant propagation cannot be applied.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29118 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 20:37:18 +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 ccfaa29881 Make type variables belong to the original declaration in VM.
BUG=http://dartbug.com/14240
R=gbracha@google.com, zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29106 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 18:28:46 +00:00
fschneider@google.com 77669aac3e Fix VM issue 1372: super constructor invocation with redirection.
A redirecting super constructor simply passes the phase parameter
on to the target which executes the corresponding phase.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29097 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 16:18:20 +00:00
zra@google.com 1efeb05d4d Fixes ARM SIMD IL bug.
Issue 14341

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29092 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 15:56:35 +00:00
fschneider@google.com a61e701da3 VM: Fix evaluation order when throwing an AbstractClassInstantiationError.
BUG=https://code.google.com/p/dart/issues/detail?id=13420
TEST=Language/12_Expressions/12_Instance_Creation/1_New_A06_t12
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29088 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 15:29:02 +00:00
fschneider@google.com 4ecceeebb6 Use enums for the index of IL operands.
Addressing comments from a previous CL (https://codereview.chromium.org/28633003/).

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29087 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 15:27:09 +00:00
lrn@google.com b8a3d75996 Add isFinite getter to num.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29067 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 10:21:13 +00:00
johnmccutchan@google.com 4ebeadba11 This CL enables the polymorphic inliner to inline loads on typed array views.
It also contains a small cleanup so that the signatures of BuildByteArrayViewLoad and BuildByteArrayViewStore match.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29066 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 09:18:52 +00:00
rmacnak@google.com de7c68ce3a Test for OscillatorNode.type=. Fix bug in StringGetPeerHelper when passed an immediate object. Fix asserts when getting typed data address to allow for empty arrays.
BUG=http://dartbug.com/11984
R=asiva@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29049 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 00:12:09 +00:00
sigmund@google.com 7c2e6295aa Fix type errors detected with --error-on-bad-type.
R=nweiz@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29047 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 23:41:05 +00:00
regis@google.com 3e8c130227 Fix language tests for redirecting factories (issue 14297).
Use target constructor name in redirecting factory errors.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29045 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 22:36:42 +00:00
regis@google.com 9ec07853c5 Report correct error message in case of super invocation (fix issue 8208).
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29042 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 22:12:07 +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
rmacnak@google.com a3cd93fa15 Cover an example of equality and hashCode for each type of mirror.
BUG=http://dartbug.com/6680
R=ahe@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29015 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 18:16:39 +00:00
iposva@google.com 6148a1879d - Name the enum containing the bootstrap library ids.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29012 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 17:40:30 +00:00
fschneider@google.com 593abec44c Fix bug with load elimination in checked mode.
Definitions that are redefined through AssertAssignable must be
unwrapped to number loads/stores correctly for them.

Fix test expectations for tests that are passing now that the
corresponding co19 test was changed.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29001 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 16:03:48 +00:00
hausner@google.com e7255e091a Do not generate a compile-time error if there is more than one catch-all clause
This includes catch clauses with malformed types, which are essentially
catch-all clauses.

The spec does not mandate such a compile-time error. (It probably did a long
time ago.)

Fixes issue 8601, 12159, 13019

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28999 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 15:44:28 +00:00
rmacnak@google.com bd284f7262 Generic typedefs and their referents.
BUG=http://dartbug.com/12282
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28972 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 00:00:08 +00:00
rmacnak@google.com 879539c348 Skip redirection_type_shuffling_test on dart2js.
Review URL: https://codereview.chromium.org//29103011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28968 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 23:10:11 +00:00
hausner@google.com dbe0e4c9b4 Allow string literal concatenation in import clauses
Added benefit: if there is no interpolation in any of the adjacent
string literals, the compiler concatenates the strings without
invoking Dart code.

Fixes issues 12521, 6877

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28964 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 22:13:42 +00:00
rmacnak@google.com 7c67d66df1 Skip mirrored_compilation_error_test on dart2js and Dartium.
Review URL: https://codereview.chromium.org//33673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28951 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 21:00:42 +00:00
rmacnak@google.com 6a0920d2a6 isolate_mirror_local_test no longer fails the analyzer.
Review URL: https://codereview.chromium.org//33053004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28948 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 20:38:40 +00:00
rmacnak@google.com a5fd049d73 Hide MirroredCompilationErrror behind a flag until post-1.0. Remove VM reference to MirroredUncaughtExceptionError.
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28946 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 20:12:49 +00:00
asiva@google.com f5b0f9beae Remove deprecated call Dart_Error from the API. There are no uses of it.
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28944 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 19:53:31 +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 addba00bd7 Fix VM crash when ClosureMirror.findInContext operates on a fake function.
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28937 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 17:10:21 +00:00
whesse@google.com c9e4b7f7cd dart:io | Fix File.rename on Windows to overwrite an existing target.
BUG=dartbug.com/14164
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28933 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 14:57:35 +00:00
fschneider@google.com 369a58132e Fix bugs in load elimination and type propagation.
Load elimination should consider the representation of loads/stores
when numbering places. Different representations result now in different
places so that there can't be mixed representations at phis after
load elimination.

Removed the flag --propagate-types because type propagation is required
for correctness of smi-check hoisting. Therefore, switching it off does not
 make sense anymore.

BUG=https://code.google.com/p/dart/issues/detail?id=6663, https://code.google.com/p/dart/issues/detail?id=14271
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28931 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 13:59:56 +00:00
kevmoo@j832.com cf134382a1 Set.add returns true if item has been added, otherwise false
BUG= https://code.google.com/p/dart/issues/detail?id=3546
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28863 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 17:24:24 +00:00