johnmccutchan@google.com
3d4778e2c2
SIMD plumbing
...
Review URL: https://codereview.chromium.org//12871015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20287 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 20:29:00 +00:00
hausner@google.com
595271f2c9
Properly handle cascades in top-level functions
...
Fix for bug 8530
Review URL: https://codereview.chromium.org//12647012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20279 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 17:04:28 +00:00
asiva@google.com
61f6a96cd3
Remove redundant Dart_LoadEmbeddedScript as it doesn't seem to be used in the VM and hopefully dartium can start using Dart_Script always.
...
Review URL: https://codereview.chromium.org//12919020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20277 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 15:41:29 +00:00
srdjan@google.com
ed84c54ce0
Improve code (less code, slightly faster) for polymorphic calls, by loading the argument descriptor only once instead of once for each call.
...
Review URL: https://codereview.chromium.org//12646012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20254 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 22:43:03 +00:00
asiva@google.com
68d1955b88
Translate raw strings to regular strings during source code generation. This should hopefully avoid issues with deciding when to escape special characters and when not to.
...
Review URL: https://codereview.chromium.org//12568007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20248 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 21:32:35 +00:00
vegorov@google.com
1c9d22d75c
Collect type feedback for fields.
...
BUG=
Review URL: https://codereview.chromium.org//12529008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20235 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 20:15:10 +00:00
fschneider@google.com
55be6738f0
A CL that only removes dead code from the VM compiler.
...
Review URL: https://codereview.chromium.org//12740003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20211 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 15:54:28 +00:00
fschneider@google.com
99c42d2a9d
Optimize smi multiply by 2 using shl by 1.
...
Review URL: https://codereview.chromium.org//12703011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20204 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 13:29:47 +00:00
fschneider@google.com
c60530d409
Fix ARM and MIPS build after my last commit.
...
TBR=vegorov@google.com
Review URL: https://codereview.chromium.org//12735016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20200 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 12:35:57 +00:00
fschneider@google.com
86da5111ad
Replace scalarlist optimizations and split external array loads into two IL instructions.
...
This CL removes optimized access for scalarlist, and only the new TypedData classes
are optimized. I changed the runtime libraries core and math to use typedData
instead of scalarlist (Uint16List is used in StringBuffer, Uint32List by Math.random).
Instead of using LoadIndexed for internal and external arrays,
split external loads into a load of the backing store and a load
of the element.
v3 <- LoadIndexed(v1, index)
becomes
v2 <- LoadUntagged(v1, ExternalTypedData::data_offset)
v3 <- LoadIndexed(v2, index);
For this I introduce two new representations in the IL:
kUntagged (for values that hold a untagged pointer) and
kNoRepresentation (for instructions accept any input
representation)
Deoptimization does not need to know about kUntagged
since these values can never occur in the environment.
Also with this change:
* fix COMPILE_ASSERT and use it in one place.
* Cleanup IL printer output of deopt ids.
Review URL: https://codereview.chromium.org//12871010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20198 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 12:06:23 +00:00
hausner@google.com
8e499806e8
Revise duplicate interface check
...
Move check for duplicate interfaces from parser to class finalizer.
The parser only compared interfaces by name, which did not work
properly for qualified (imported) names. Now the check happens in the
class finalizer after types are finalized.
Sadly, our test harness does not appear to know how to handle multitests
that import libraries.
Review URL: https://codereview.chromium.org//12837007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20167 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-18 17:34:16 +00:00
hausner@google.com
ed2e198b99
Mixins with Generics
...
This change adds support for generics to mixins. It's not a particularly elegant
implementation, so I expect to change how it works internally in later checkins.
Also, there is still one aspect of the implementation that is incorrect. In the
case of typedef, the newly introduced name is not yet an alias for the
mixin application. Instead, the MA is a superclass of the typedef name. That
will need to be fixed in a later checkin. I don't want to make this change
bigger.
Review URL: https://codereview.chromium.org//12779008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20084 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 15:59:24 +00:00
asiva@google.com
453e8fe924
Add the native intrinsic TypedData_setRange to optimize the setRange call when the destination and source of setRange are of the same typeddata type.
...
Review URL: https://codereview.chromium.org//12881006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20078 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 13:33:11 +00:00
regis@google.com
7b5a610084
Make allocation of Dart parameters and local variables architecture independent.
...
Enable a couple more vm tests on ARM.
Fix function usage counter access on ARM.
Review URL: https://codereview.chromium.org//12776006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20048 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 21:33:03 +00:00
zra@google.com
7611d6f772
Fixes a build warning about a format string.
...
Review URL: https://codereview.chromium.org//12871004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20043 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 18:56:07 +00:00
fschneider@google.com
f1fa8c68c2
Fix bug in optimized byte array views on tranferable backing stores.
...
This affects views when using scalarlist: The code generated
did not take the receiver class into account correctly,
so it only works for internal byte arrays.
For now, I just disable optimization for external backing stores.
The optimization will be added again for TypedDataViews in a future CL.
TEST=tests/standalone/byte_array_view_optimized_test.dart
Review URL: https://codereview.chromium.org//12779007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20036 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 17:13:44 +00:00
asiva@google.com
e723d17796
Fix source generation for strings that have \$ in them.
...
Review URL: https://codereview.chromium.org//12605009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20025 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 14:12:36 +00:00
fschneider@google.com
a792eec392
Revert: Support TypedData getters/setters in the optimizer.
...
Revert https://code.google.com/p/dart/source/detail?r=20018 because this CL was not complete and broken.
TBR=
Review URL: https://codereview.chromium.org//12742006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20024 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 14:09:38 +00:00
fschneider@google.com
a25625e109
Support TypedData getters/setters in the optimizer.
...
The optimizer now handles _TypedList which replaces _ByteArrayBase
and functions on TypedList getX/setX where X = Int8, Uint8, Int16, etc. are
optimized.
Review URL: https://codereview.chromium.org//12801003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20018 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 13:07:54 +00:00
fschneider@google.com
924e321c35
Optimize TypedData in the same way as ScalarList.
...
Review URL: https://codereview.chromium.org//12775009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20002 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 10:39:20 +00:00
asiva@google.com
6e878e9c12
Remove Dart_GetScriptSource as it is not used anywhere.
...
Review URL: https://codereview.chromium.org//12732007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19998 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 10:18:00 +00:00
asiva@google.com
6b8987e55b
Add a command line option to generate source code for a script
...
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00
zra@google.com
2905da6a38
Fix build.
...
Review URL: https://codereview.chromium.org//12607009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19961 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 19:00:53 +00:00
zra@google.com
82367b380d
Copies Simulator Debugger from ARM to MIPS.
...
Also includes changes to keep it from aborting unexpectedly.
Among other things, I changed the Disassembler::Disassemble to return false
when the underlying decoder can't decode an instruction. Then,
the MIPS SimulatorDebugger will refuse to step or cont on an instruction
that the Disassembler can't decode.
Review URL: https://codereview.chromium.org//12431016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19958 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 18:43:16 +00:00
vegorov@google.com
caf1f9ec74
Run type propagation after LICM to ensure correct reaching types for hoisted values.
...
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//12690004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19954 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 18:28:07 +00:00
asiva@google.com
61e1d90402
Added check that the object being stored as a return value in the NativeArguments array is a Dart instance.
...
Review URL: https://codereview.chromium.org//12744006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19932 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 14:16:13 +00:00
fschneider@google.com
f594eec7ba
Remove some assertion code in the GC from the release build.
...
Review URL: https://codereview.chromium.org//12754003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19918 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 10:06:34 +00:00
kmillikin@google.com
74d4e1fe75
Remove virtual functions on class InliningContext.
...
There is only one implementation of InliningContext, so there is no need for
virtual dispatch.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//12518009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19917 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 10:06:14 +00:00
tball@google.com
7ba1326a91
Disable stack context when its frame is for optimized code.
...
Review URL: https://codereview.chromium.org//12408015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19894 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 20:42:36 +00:00
fschneider@google.com
ef6251908c
Add a new, separate block entry instruction for catch-blocks.
...
This is a preparation CL for supporting try-catch in optimized code. Until
now, we used normal TargetEntryInstr for catch blocks.
This meant carrying around handler_types_ and catch_try_index_ for blocks
that are not catch blocks which is not needed.
For now, CatchBlockEntry behaves the same as TargetBlockEntry except for
the additional members needed for catch blocks.
Review URL: https://codereview.chromium.org//12600012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19864 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 13:51:32 +00:00
asiva@google.com
69d0484d2a
- Use dart:typedata types in the Dart API calls.
...
- Change the dart/io code to not use dart:scalarlist
Review URL: https://codereview.chromium.org//12730013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19848 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 10:57:48 +00:00
regis@google.com
6a701789b9
Decode ic data and arguments descriptor passed in calls on ARM.
...
Review URL: https://codereview.chromium.org//12518016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19827 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 23:15:48 +00:00
zra@google.com
ad8004569d
Adds MIPS instructions to simulator, assembler, disassembler
...
ins - bitfield insert
ext - bitfield extract
l{b,bu,h,hu,w} - load byte, unsigned byte, etc.
s{b,h,w} - store byte, halfword, word
Review URL: https://codereview.chromium.org//12519007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19819 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 20:50:50 +00:00
floitsch@google.com
cead1d41f1
ceil/floor/truncate/round return integers.
...
This CL supercedes https://codereview.chromium.org/11748016/
Review URL: https://codereview.chromium.org//12317107
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19810 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 18:54:37 +00:00
fschneider@google.com
c94a722177
Remove unused context-level from LoadLocal/StoreLocal IL instructions.
...
This is left-over code that is not used anymore.
Review URL: https://codereview.chromium.org//12440015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19789 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 13:03:46 +00:00
fschneider@google.com
d0959080ab
Inline ByteArray setters like setUint8 in the optimizer.
...
Review URL: https://codereview.chromium.org//12378039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19781 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 12:16:54 +00:00
floitsch@google.com
5dc8107c53
Revert "Remove Expect from core library."
...
This reverts commit 19755.
Review URL: https://codereview.chromium.org//12743005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com
12dbd2fd70
Remove Expect from core library.
...
Review URL: https://codereview.chromium.org//12212016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
asiva@google.com
3b5c3e69dd
Add the allocator intrinsics for dart:typeddata implementation.
...
Review URL: https://codereview.chromium.org//12547018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19752 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 00:05:57 +00:00
zra@google.com
6699610946
Adds a few MIPS arithmetic instructions to the simulator, assembler, disassembler
...
Review URL: https://codereview.chromium.org//12545024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19730 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 21:47:03 +00:00
regis@google.com
7766ac76d4
Implement leaf runtime call stub on ARM and corresponding call redirection
...
in ARM simulator.
Implement jump patching on ARM.
Add missing ICache flush calls.
Review URL: https://codereview.chromium.org//12439005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19724 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 21:16:46 +00:00
vegorov@google.com
eeeeecb687
Add pass to remove empty blocks and recompute fall-through targets.
...
This allows to cleanup the following code patterns:
1) chains of jumps:
jxx block_a
...
block_a:
jmp block_b
2) jumps over jumps
jxx block_b
block_a:
jmp block_c
block_b:
...
Review URL: https://codereview.chromium.org//12412013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19711 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 19:09:48 +00:00
asiva@google.com
fc899d671a
Add the typed data classes to the do not extend list.
...
Review URL: https://codereview.chromium.org//12528013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19708 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 18:40:05 +00:00
regis@google.com
b95087eb73
Implement native call stub on ARM and native call redirection in ARM simulator.
...
Pass PatchStaticCall test.
Review URL: https://codereview.chromium.org//12629004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19704 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 18:22:14 +00:00
floitsch@google.com
dd48256fe5
Remove deprecated StringBuffer.add, addAll and addCharCode.
...
Review URL: https://codereview.chromium.org//12473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19690 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 13:07:18 +00:00
kmillikin@google.com
ef0580c26a
Implement a branch optimization pass.
...
Branch optimization pushes some branches that test the value of a phi
to the predecessor blocks. This can avoid materializing a boolean
object solely for the purposes of branching on its boolean value.
The optimization is performed after inlinining which creates
opportunities, and before constant propagation, because it exposes
opportunities for unreachable code elimination.
R=vegorov@google.com
BUG=
Review URL: https://codereview.chromium.org//12540002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19682 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 11:14:08 +00:00
lrn@google.com
a5a93492d9
Change VM's string-buffer patch to use a Uin16Array as backing buffer.
...
Review URL: https://codereview.chromium.org//12421002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19679 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:21:52 +00:00
iposva@google.com
0308a45996
- Allow the use of branch delay slots.
...
Review URL: https://codereview.chromium.org//12623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19669 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 07:25:19 +00:00
srdjan@google.com
dd6691ab27
The complete fix for issue 8919.
...
Review URL: https://codereview.chromium.org//12643004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19661 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 23:09:47 +00:00
srdjan@google.com
5135d46cbf
Fix crash in issue 8919. The test still fails.
...
Review URL: https://codereview.chromium.org//12628003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19657 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 21:59:02 +00:00