fschneider@google.com
9031c80c88
Change == into an instance call to allow polymorphic inlining of ==.
...
In unoptimized code equality is now just another instance call.
The optimizer replaces it with a specialized implementation based on static
type information and type feedback.
Many of the manual optimizations of == in the optimizer are now just handled
by the generic inliner, plus polymorphic inlining of == calls is now possible.
This also eliminates the need for a lot of duplicated code in the backend.
I adapted the inlining heuristics to compensate for the slightly larger
inital flow graph size.
Review URL: https://codereview.chromium.org//27307005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29800 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 11:32:52 +00:00
hausner@google.com
c96bc29ab5
Compile time error if name is used before variable is declared
...
Implement proper semantics if a name has been referenced in a
block and later a variable with that same name is declared.
Fix library code that was wrong.
Add new language test, delete a couple of tests that are
outdated, file co19 bug 649.
Dart2js and dart2dart are not yet implementing these compile-time
errors.
R=iposva@google.com
Review URL: https://codereview.chromium.org//51533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29770 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 21:28:31 +00:00
floitsch@google.com
7886e0ac13
Update TODO with bug number.
...
R=nweiz@google.com
Review URL: https://codereview.chromium.org//56433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29769 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 20:54:45 +00:00
lrn@google.com
54a3662ccf
Change integer canonicalization to use CheckAndCanonicalize
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//53993004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29731 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 09:42:28 +00:00
johnmccutchan@google.com
5f63715d47
SIMD shuffle API changes
...
R=srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//51373004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29723 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 07:09:54 +00:00
srdjan@google.com
98aad1b1d0
Optimize OneByteString’s contains function for one character patterns (similar to indexOf).
...
R=zra@google.com
Review URL: https://codereview.chromium.org//54503004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29701 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 21:13:46 +00:00
rmacnak@google.com
07c3de9310
Mirror implementation removals: async invoke, mirrorSystemOf(port), Mirror.mirrors.
...
(API was removed in r29492)
R=ahe@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//23460050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29698 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 21:01:59 +00:00
rmacnak@google.com
f3384bf0eb
Hide ClosureMirror.findInContext behind a flag for 1.0.
...
Test findInContext does not wildcard privates. Fix confused test and implementation that expected inheritance of static members.
BUG=http://dartbug.com/13656
R=ahe@google.com , asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//52953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29697 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:50:17 +00:00
asiva@google.com
545bec0843
Cleanup StaticResolveType, it does not seem to be used anywhere.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//50523018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29696 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:41:59 +00:00
rmacnak@google.com
05bd81f872
Align behavior of VM's ObjectMirror.setField with language semantics.
...
R=ahe@google.com , asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//38543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29692 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:21:01 +00:00
lrn@google.com
5cd6aace2b
Change bool.fromEnvironment to recognize "true" and "false" and use default for rest.
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//54623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29672 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 14:05:28 +00:00
lrn@google.com
66959d9dbf
Change int.fromEnvironment in VM to use same code as int.parse.
...
R=fschneider@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//54663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29670 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 13:45:39 +00:00
lrn@google.com
eb9e33e328
Update documentation on .fromEnvironment. Make bool default be false.
...
I want more text, and examples of usage, alternative usage, etc.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//54203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29657 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 09:33:18 +00:00
sgjesse@google.com
36a67fa046
Implement fromEnvironment on bool, int and String
...
This implements const constructor fromEnvironment on bool, int and
String.
The VM have the added -Dname=value option to define the value for the
properties. All values are provided by using the -D - nothing is read
from the environment.
If the resulting value is null or - in the case of int.fromEnvironment
- not a number an ArgumentError is thrown.
This CL does not have any implementation for dart2js.
This is a continuation of the change
https://chromiumcodereview.appspot.com/24975002 by iposva@
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//50983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29642 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 05:46:57 +00:00
johnmccutchan@google.com
8a0fd8ce4d
Add Uint32x4List to typed_data
...
R=asiva@google.com , srdjan@google.com , vsm@google.com
Review URL: https://codereview.chromium.org//51333005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29639 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 04:57:38 +00:00
srdjan@google.com
cacd63cf7b
Improve indexOf for one byte string receiver to work with other string classes.
...
Optimize access to core class’s class-ids.
R=zra@google.com
Review URL: https://codereview.chromium.org//47073009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29610 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 23:51:42 +00:00
regis@google.com
3fa7a61efc
Implement latest spec changes regarding malformed types (see issue 14006):
...
- a malformed type used in a is, as, or catch type test results in a dynamic
type error being thrown.
- a malformed type is not mapped to dynamic anymore.
For now, this applies to type tests in checked mode as well, but discussion is
still on-going.
R=hausner@google.com
Review URL: https://codereview.chromium.org//53583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29608 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 23:30:32 +00:00
rmacnak@google.com
de5ab09605
Implement ObjectMirror.[] the VM.
...
R=ahe@google.com
Review URL: https://codereview.chromium.org//25741005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29578 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 19:02:46 +00:00
srdjan@google.com
15d2afdca4
Fix performance degradation in string buffer benchmarks: concat in native instead of in Dart.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//52813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29567 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 17:25:23 +00:00
ahe@google.com
36e2df1a1d
Mirrors overhaul.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//23455028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:58:58 +00:00
rmacnak@google.com
0abc881d9e
Mirror API removals: async invocations, mirrorSystemOf(port), Mirror.mirrors.
...
R=ahe@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//45293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29492 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 21:14:19 +00:00
srdjan@google.com
a81288c8ca
Improve string library performance. String concat and indexOf.
...
Rename String concatAll to concatRange. Optimize concatRange for OneByteStrings (avoids natives), optimize indexOf for one character onByteStrings.
R=iposva@google.com
Review URL: https://codereview.chromium.org//42443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29472 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 18:18:40 +00:00
whesse@google.com
3b54950144
Remove dart:platform library.
...
This reverts commits r29154, r29244, r29251, r29268, and r29272.
The dart:io Platform class will not be moved to a dart:platform library.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//50573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29435 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 11:33:34 +00:00
hausner@google.com
e02652a123
Throw CyclicInitializationError instead of string
...
For some reason, I had to regenerate the snapshot for test standalone/issue14236_source.dart. The checked-in snapshot crashed with my change. We don't know yet why. Siva is looking at this separately.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//38563005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29397 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 21:38:57 +00:00
rmacnak@google.com
bcb8707fcd
Test reflecting on an object that implements Function but has no call method.
...
BUG=http://dartbug.com/13957
R=asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//26777002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29374 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:25:47 +00:00
iposva@google.com
2ed438e40c
Reland https://code.google.com/p/dart/source/detail?r=29315 :
...
- Make sure to keep the main/control port opened until the
isolate is finished.
- Account for the number of opened control ports to be able
to determine whether there are live ports.
- Ensure that the spawned isolated is kept alive until the
initial startup message can be handled.
- Add more isolate tracing output.
- Use the control port for the debugger id.
Review URL: https://codereview.chromium.org//47573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29323 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-27 14:34:23 +00:00
iposva@google.com
eb95d787c3
- Revert parts of r29315 while attempting to reproduce
...
unexplained buildbot failures locally.
Review URL: https://codereview.chromium.org//47233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29317 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 21:50:38 +00:00
iposva@google.com
b3f3d8bfbd
- Make sure to keep the main/control port opened until the
...
isolate is finished.
- Account for the number of opened control ports to be able
to determine whether there are live ports.
- Fix imports in snapshotted test.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//46173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29315 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-26 20:50:20 +00:00
whesse@google.com
980c1a1150
Fix Isolate.spawnUri on Windows.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//45163003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29277 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:56:34 +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
floitsch@google.com
6a72655d1b
Very simple version of Isolates.
...
R=ajohnsen@google.com , iposva@google.com , kasperl@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//27215002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29271 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:23:00 +00:00
whesse@google.com
251e56f299
dart:platform | Remove isWindows, isLinux, isAndroid, isMacOS from dart:platform.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//43773004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29268 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 18:25:56 +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
rmacnak@google.com
8ee11af36f
Add LibraryMirror.declarations and ClassMirror.declarations to the API and both implementations.
...
Fix bug where partially unmangled names were used in constructor names.
Fix bug where type variables were considered static.
R=gbracha@google.com , johnniwinther@google.com
Review URL: https://codereview.chromium.org//36023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29261 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 17:05:49 +00:00
whesse@google.com
265c25a4a2
Add fields to platform library, implement them on runtime dart.
...
BUG=
R=ahe@google.com , ajohnsen@google.com , floitsch@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//36883005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29244 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 11:48:28 +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
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
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
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
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
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
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
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
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
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
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