Commit Graph

3214 Commits

Author SHA1 Message Date
johnmccutchan@google.com 0180662328 Final cleanup of InsertConversion
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26522 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 14:11:58 +00:00
fschneider@google.com 0753e6fe59 Correctly clone comparisons in branch optimizations of Dart VM.
When cloning comparisons of branches, the type feedback
of some comparisons was lost, resulting in slower generic code
instead of type-specialized code.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26514 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 11:03:41 +00:00
hausner@google.com 6b20c0ecaa Detect circular dependencies in compile time constants
Fix issue 1681

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26491 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:55:59 +00:00
srdjan@google.com eeb86b7e39 Fix fingerprint checking and report functions that have disappeared.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26490 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:46:50 +00:00
asiva@google.com 543d80f5f8 Fix signature of Dart_SetIntegerReturnValue.
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26487 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:45:02 +00:00
asiva@google.com 497152cc26 Added Dart API methods:
Dart_GetNativeIntegerArgument
Dart_GetNativeDoubleArgument
Dart_GetNativeBooleanArgument

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26485 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:20:30 +00:00
johnmccutchan@google.com 6d59f5d25a Fold Box(Unbox(v)) and Unbox(Box(v)) for Float32x4 and Uint32x4
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26480 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 22:22:53 +00:00
srdjan@google.com 03111ecbeb Fix performance regression on Tracer: recognize _doublePow in Math.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26470 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 20:36:08 +00:00
hausner@google.com 8e9139da08 Fix debugger stack traces
This change fixes the lookup of exception handlers that are
contained in activation frames that are not user-visible
(e.g. frames in dart library code).

Fixes issue 12318 (https://code.google.com/p/dart/issues/detail?id=12318)

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26445 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 17:22:30 +00:00
regis@google.com 0ab840ae98 Fix bound checking in self referencing type (issue 12553).
Added test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26444 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 17:22:18 +00:00
johnmccutchan@google.com c8b370ab50 Initial support for length guards on final fields.
R=regis@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26433 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 15:32:45 +00:00
fschneider@google.com ba0f59d1bc Polymorphic inlining for some recognized methods in the optimizing compiler.
The optimizing compiler currently recognizes a certain frequent native methods
like array length or string length and provides an inlined implementation.
Inlining does currently not work for polymorphic call sites of these methods.  
This CL enables also polymorphic inlining in the case of .length getters for
arrays and strings.

1. The method is recognized at flow graph build time. The builder creates
 the body of the method for both compilers (non-optimizing and optimizing).
 Native methods that are not recognized, are translated as before using a NativeCall
 IL instruction.

2. The flow graph inliner handles recognized methods in the same manner as normal methods.
Until now intrinsic and recognized method could not be inlined. This CL enables it.

3. There is no need for an intrinsic assembly implementation because recognized methods
have an IL implementation that does not call into the C++ runtime. I left the intrinsics
in for now, but they can be removed if there is not noticable performance benefit anymore.

4. The inlining heuristics are tweaked in a way that enables more aggressive inlining
of recognized methods: +1 level of inlining depths, call sites of recognized methods are
not counted in the inlining heuristic.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26429 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 12:58:08 +00:00
johnmccutchan@google.com 6d11a8fa15 Add signMask getter to Float32x4
R=srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26394 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 21:35:53 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
johnmccutchan@google.com 7c1e9d8298 Add add and subtract operations to Uint32x4
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26358 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 14:34:06 +00:00
lrn@google.com 653ee92bfb Remove int.pow and double.pow from VM library.
BUG= http://dartbug.com/10268
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26340 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 08:13:13 +00:00
regis@google.com 5024da5a5d Skip over unfinalized interface types during a compile-time subtype check in
order to postpone bound checking to run time (fix issue 12501).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26331 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 00:17:49 +00:00
hausner@google.com d62ea57f8e Evaluate expression in context of an object
This is the core functionality needed for the debugger.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26328 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 22:17:09 +00:00
johnmccutchan@google.com 4ba3c7b2c9 Add packed add and subtract to IA32 and X64 assemblers
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26325 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 19:57:22 +00:00
regis@google.com f9df206e2e Report compile-time errors for conflicting overrides as specified by latest
language spec (fix issue 12342).
Add override conflict tests.
Update status files.
Add support for 'ok' status in multi-tests.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26302 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 23:39:41 +00:00
johnmccutchan@google.com 8e2b84bfa7 Cleanup conversion insertion in unboxed -> unboxed case.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26281 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 16:53:32 +00:00
johnmccutchan@google.com f05ee4985a Replace shuffle getters with shuffle method and masks.
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26278 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 16:19:18 +00:00
zra@google.com 83cbc7a525 Adds check for ARM neon support to optimizer.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26239 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 23:10:28 +00:00
rmacnak@google.com 8bdc9b5696 Cleanup making Null a public class of dart:core in the VM. Remove special cases for Null in lookup and compile-time type tests.
BUG=http://dartbug.com/12364
R=asiva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26205 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 18:34:23 +00:00
asiva@google.com fc5ffa288f Simplify access to peer pointer for external strings.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26202 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 17:10:07 +00:00
zra@google.com da9b56f789 Fixes bug in MIPS IL.
TBR: regis, srdjan

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26197 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 16:12:38 +00:00
lrn@google.com 14a75969c3 Add Null class to dart:core.
Make dart2js accept this class as the type of `null`.

Dart2js still fails on tests on the form: x is Null
VM does not recognize Null as the type of `null`.

BUG= http://dartbug.com/12382
R=fschneider@google.com, karlklose@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26175 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 09:12:19 +00:00
srdjan@google.com 266b9cb305 Add double unary operation (negate). This is a replica of the destrpyed CL https://chromiumcodereview.appspot.com/23219002/
Review URL: https://codereview.chromium.org//22999011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26169 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 23:45:13 +00:00
asiva@google.com 29fec5afb2 Comment out check in native fields injection until issue 12455 is resolved.
Review URL: https://codereview.chromium.org//23215002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26151 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:57:13 +00:00
asiva@google.com 872fafc6cf Minor cleanup.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26146 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:42:44 +00:00
vsm@google.com 5893fa7634 Remove test for native resolver
This check asserts that a type with a native field must be in a
library with a native resolver.  It won't be true with custom elements
- which inherit from dart:html and inherit a native field - but are
otherwise in user libraries.

I'm just removing the check altogether here.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26144 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:18:16 +00:00
johnmccutchan@google.com 069c0e14e1 Insert dummy conversion instruction for impossible conversion requests.
BUG=12417
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26143 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 20:11:02 +00:00
iposva@google.com 34b4dfac1e - Avoid double iteration when accessing anonymous classes.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26131 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 17:54:18 +00:00
zra@google.com a810497666 Fixes scanning of Utf16 surrogate pairs in string literals.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26130 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 17:34:31 +00:00
regis@google.com dd9d0b1f36 Make sure type information is not lost in snapshots created in production mode,
since they can be executed in checked mode.
Add snapshot test.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26127 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 15:52:41 +00:00
srdjan@google.com 1f31dcc424 Fix for running with --throw_on_javascript_int_overflow: recognize pattern (a << b) & mask and test for overflow only after the mask.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26122 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 15:12:39 +00:00
fschneider@google.com 447ddebd68 Fix equality of implicit closures in the Dart VM.
This CL also lifts the restriction that classes could not
extends or implement 'Function'.

BUG=https://code.google.com/p/dart/issues/detail?id=10849
BUG=https://code.google.com/p/dart/issues/detail?id=12411

TEST=tests/language/bound_closure_equality_test.dart,
tests/language/black_listed_test.dart

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26114 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 11:43:50 +00:00
hausner@google.com aa27308cab Fix top-level map literals
This is the remaining part that needed to be done to implement
map literals with arbitrary keys.

Fixes issue 10472

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26095 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 23:45:20 +00:00
mlippautz@google.com c79874a413 ParameterMirror: Implement some missing getters.
Fixes issue 11334 and issue 11684 and issue 11567.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26086 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 21:38:36 +00:00
mlippautz@google.com 2187a8f63f Move the begin token (token_pos) of explicit functions to the start of the function declaration.
This fixes setting the breakpoints when the signature of function declarations is spread across multiple lines.

Example:
int
get
foo
=>
42;

BUG=
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26080 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 20:11:23 +00:00
fschneider@google.com 0b94e4c329 Clean up VM class DartFunction.
DartFunction was the VM-internal class associated with
the Dart class "Function". It does not have any functionality
on it and therefore we don't need a VM-internal class for it.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26063 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 17:05:46 +00:00
asiva@google.com 4b2c10ae32 Added following dart API changes to enable more efficient access based
on the dartium usage pattern:
- Dart_GetNativeStringArgument (gets a String object, peer etc. directly from
  the native arguments)
- Dart_SetWeakHandleReturnValue (allows a weak handle to be passed to the
  return value, this ensures a new local handle does not have to be created
  from a weak handle just to return a value)
- Dart_StringGetProperties (gets some common properties of a string, avoids
  multiple API calls to set up a native string)

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26046 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 01:19:25 +00:00
asiva@google.com dbd0e8c285 Fix the stack trace when there are C++ frames in between dart frames.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26044 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 00:16:16 +00:00
rmacnak@google.com 1edde1e0bf Ensure the classes void and dynamic have empty arrays for fields, functions, etc. Move their Types to the VM isolate, and as a side-effect they are now canonicalized.
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12246
R=asiva@google.com, iposva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26043 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 00:11:42 +00:00
zra@google.com 8ffef7528d Bug fix and status file updates for MIPS HW.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26037 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 21:45:41 +00:00
regis@google.com 9eb12ad303 Implement updated method overriding rules in the vm (issue 11495).
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
asiva@google.com 33a46a45c6 Fix minor bug which was causing throw of Null to not be recognized properly.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26024 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 19:50:28 +00:00
srdjan@google.com 72ba657d4f Fix issue 12369: compare kind of unary math instruction and not only the inputs to determine if attributes are equal.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26014 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 17:54:36 +00:00
rmacnak@google.com 303a29b5ba Move Null class out of the VM isolate.
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12128
BUG=http://dartbug.com/12319
BUG=http://dartbug.com/12337
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25982 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:54:30 +00:00
rmacnak@google.com 0abc24d494 Fix name of libraries without a library declaration to be the empty string.
BUG=10580
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25981 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:27:28 +00:00