Commit Graph

3239 Commits

Author SHA1 Message Date
hausner@google.com 3e9467672f Require case expressions to be compile-time constants
Remove legacy semantics in switch statement compilation.

Still to be added: analysis that all case expressions are
of the same type.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26749 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 23:07:59 +00:00
iposva@google.com d7aa93e0b3 - Remove support for the old "get foo()" - style syntax.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26743 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 20:47:14 +00:00
mlippautz@google.com 817a6fff3a Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}.
Fixes issue 12196 and partially addresses issue 12430.

BUG=
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26730 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:31:09 +00:00
hausner@google.com c2fa1cf490 Add compilation error on named parameters with private names
Remove bogus test cases.

Fixes issue 5743, 3502

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26719 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 16:41:33 +00:00
iposva@google.com bd5851422f - Avoid doubly implementing Function.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26716 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 16:15:42 +00:00
johnmccutchan@google.com 794936d02e Remove LoadFieldInstr with no uses
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26705 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 11:22:17 +00:00
fschneider@google.com d3b5da1335 Always generate full unoptimized code for intrinsified methods.
Until now, we skipped regular code generation for some intrinsics
because the body was unreachable (no slow case).

With inlining and optimizing those methods, we may need the 
unoptimized code for deoptimization support. Instead of deciding
case-by-case which of these methods may potentially deoptimize,
we always generate the full unoptimized code now, together
with the corresponding deoptimization info.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26703 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 11:11:48 +00:00
rmacnak@google.com 92f8786e99 Remember metadata positions for mixin and function typedefs.
BUG=http://dartbug.com/10906
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26680 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 00:47:42 +00:00
regis@google.com 93059fe3cf More cleanup related to malformed and malbounded types.
Remove support for warnings in parser and related flags.
Rename flag --error-on-malformed-type to --error-on-bad-type, since it covers
both malformed and malbounded types (also closer to --error-on-bad-override).

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26677 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 23:24:01 +00:00
hausner@google.com a105ba48fc JSON string decoding for VM debugger
The VM must properly decode JSON strings it receives.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26668 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 20:59:16 +00:00
regis@google.com 81bcb1f18a Distinguish between malformed and malbounded types (fix issues 12552 and 12554).
Add test.
Update status files.

Explanation of change: A malbounded type argument should not be mapped to
dynamic, as is a malformed type argument.
This change also adds a bunch of TODOs related to the encounter of malbounded
types in unexpected places.
A follow-up change will address these TODOs, add more tests, and may simplify
code that is still handling malformed types where they cannot occur anymore
after the spec simplified their handling.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26665 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:56:02 +00:00
srdjan@google.com 255a28369c Fix corner cases for double pow operation.
R=regis@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26662 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:38:51 +00:00
mlippautz@google.com b708a455d1 Fix Function.end_token_pos() and implement MethodMirror.source getter.
Move .source getter from ClosureMirror to MethodMirror (as the TODO already suggested) and provide an implementation.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26659 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:14:07 +00:00
asiva@google.com 7fe1c42468 Fix issue 12718 - crash when the trying to access context variables in a frame.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26658 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:06:17 +00:00
kmillikin@google.com fdbfeddb1e Fold equals and not equals comparisons for constant strings.
BUG=https://code.google.com/p/dart/issues/detail?id=12530
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26645 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 12:37:21 +00:00
kmillikin@google.com 7f81e17d6f Cleanup of deoptimization environment copying functions.
Change the deoptimization environment copying functions so that they
crash rather than safely copying NULL environments.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26634 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:56:24 +00:00
fschneider@google.com 68a90e4386 Fix crash in optimized code caused by missing IC data.
When inling intrinsified methods like String.isEmpty that are
not native, we have to emit the full unoptimized code so that
those method can be correctly optimized and inlined later.

Also, remove an invalid assertion in the type propagator: ToNullableCid
may be called on values from the callee graph in the inliner where
type propagation has not yet been performed.

BUG=https://code.google.com/p/dart/issues/detail?id=12691
TEST=tests/language/optimized_isempty_test.dart
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26629 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 09:46:30 +00:00
fschneider@google.com d773e985a7 Mark private methods of core libraries as invisible in the VM.
This prevents accessing them via reflection which should not
be allowed since they are often handled specially by the compiler.
Those functions also will not be shown in stacktraces.

TEST=tests/language/reflect_core_vm_test.dart
R=rmacnak@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26625 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 09:19:54 +00:00
hausner@google.com 2642b1e522 Evaluate expression in the context of a class
Allows debugger to evaluate an expression in the context of a
static method of a class.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26617 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 22:42:41 +00:00
johnmccutchan@google.com 8b84025259 Avoid array bounds check when allowed by guarded field.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26604 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 17:48:14 +00:00
fschneider@google.com 4a9402eb26 Fix allocation of indices for try-blocks.
The compiler has the assumptions that try-index starts
at zero for each function: The list of exception handlers
is a dense array indexed using the try-index.

BUG=https://code.google.com/p/dart/issues/detail?id=12615
TEST=tests/language/regress_12615_test.dart
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26585 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 08:49:05 +00:00
asiva@google.com 7ad55e3c8e The peer pointer was not being setup at all, fixed that and added a test case
for it.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26561 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 22:05:22 +00:00
hausner@google.com 3876a9e23c Remove assertion in compile-time constant map literals
We had a left-over assertion that keys are strings.

Fixes issue 12505.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26549 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 19:45:13 +00:00
zra@google.com d816dd325f Adds Uint32x4 add/sub for ARM.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26544 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 18:24:20 +00:00
asiva@google.com 848291cea7 - Setup a peer for read only strings that are not externalized in
Dart_MakeExternalString so that it is not necessary to create
a new reference for it everytime it is accessed in native code.

- Removed unused function Dart_ExternalStringGetPeer

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26538 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 17:10:37 +00:00
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