Commit Graph

4712 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
ahe@google.com 37a5567eb8 Triage Safari bug 7414.
BUG=http://dartbug.com/7414
R=floitsch@google.com, kustermann@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26726 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:17:35 +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
floitsch@google.com 1887b5ca49 Some more removals of dart:utf.
R=jmesserly@google.com, lrn@google.com, nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26712 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 13:18:34 +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
lrn@google.com f02f2c0a6b Mark CustomIsolates test as potentially crashing.
Review URL: https://codereview.chromium.org//23572002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26702 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 10:41:25 +00:00
lrn@google.com 88b242b66a Mark some tests as failing instead of skipping.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26698 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 09:26:10 +00:00
sgjesse@google.com 264611807f Get rid of some downcasts
R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26697 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 09:13:21 +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
whesse@google.com 6de4e020f2 Fix android compilation by copying process_linux.cc to process_android.cc.
These files, in runtime/bin, are the native functions supporting the dart:io
Process class.  The android version hadn't been updated when the linux version was changed.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26642 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 12:28:08 +00:00
lrn@google.com 4582e5218a Make Invocation.positionalArguments and .namedArguments never be null.
In the cases where they were previously null, they are now an empty list
or map.

The list or map should always be unmodifiable, but the non-empty ones
aren't yet.

BUG= http://dartbug.com/6357
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26635 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:57:33 +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
floitsch@google.com 35d7140e66 Remove Encoding-enum from dart:io and add interface in dart:convert.
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +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
ajohnsen@google.com cf6578fafe Update ZLib/GZip in dart:io to be a Codec/Converter from dart:convert.
BUG=
R=floitsch@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26577 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 07:12:11 +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
rmacnak@google.com 7ed3644358 Make reflectClass(dynamic) throw an illegal argument exception.
BUG=
R=gbracha@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26550 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 20:05:51 +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
ajohnsen@google.com 3dfe7c97e2 Always initialize the EventHandler in the standalone.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26517 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 12:03:59 +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
whesse@google.com 9de122a462 Add Platform.packageRoot and Platform.executableArguments to dart:io.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26432 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 15:21:55 +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
rmacnak@google.com 2f192be945 Provide a way to get a Type back from a ClassMirror.
BUG= http://dartbug.com/6433
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26407 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 23:05:31 +00:00