fschneider@google.com
055ba590a4
Add IR printing into a supplied buffer and formatted comments on x64.
...
This change refactors printing function for instructions
so that they can be used for different purposes like
printing to stdout (what FlowGraphPrinter currently does),
creating code comments for the disassembler, or in the future
dumping the IR into a file.
I added an abstract interface to iterate over the inputs
of an computation: InputCount and InputAt. This is only
an intermediate step likely to change in the future. For
that I had to bring back the [] operator for zero-operand
instructions.
Review URL: https://chromiumcodereview.appspot.com//10407031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7731 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 01:04:56 +00:00
regis@google.com
599ab6e3ca
Revert r7729 until Dartium fixes its method override errors.
...
Review URL: https://chromiumcodereview.appspot.com//10399080
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7730 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 01:04:34 +00:00
regis@google.com
2b00b92ab9
Implement updated method overriding rules (issue 2943).
...
Add language test.
Review URL: https://chromiumcodereview.appspot.com//10388189
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7729 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 00:28:57 +00:00
cshapiro@google.com
36f57531ec
Reject high- and low-surrogates in escaped code points.
...
BUG=3097
Review URL: https://chromiumcodereview.appspot.com//10388179
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7725 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 22:57:00 +00:00
vegorov@google.com
f999f30052
Extend assembler with ability to produce comments for the generated code.
...
Extend x64 disassembler with ability to decode and output recorded comments.
Example output (currently comments are emitted only by flow graph compiler at block/instruction boundaries, once instruction printing is refactored and supports printing into buffer simple "instruction" comment will be replaced with the actual IL construct):
;; B0
;; B1
;; instruction
0x007f0fff812525 00000055 49 bb 21 00 b4 04 10 mov $0x7f1004b40021,%r11
0x007f0fff81252c 0000005c 7f 00 00
0x007f0fff81252f 0000005f 41 53 push %r11
R=srdjan@google.com
Review URL: https://chromiumcodereview.appspot.com//10407019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7723 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:56:16 +00:00
hausner@google.com
0bad95eaaa
Revert 7718
...
Review URL: https://chromiumcodereview.appspot.com//10377188
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7721 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:25:20 +00:00
hausner@google.com
757219f9ec
Disallow string plus operator
...
This is a test to see what (if anything) breaks on the buildbot when
the + operator on String is removed.
Will revert if necessary.
TBR=iposva
Review URL: https://chromiumcodereview.appspot.com//10408013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7718 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:14:33 +00:00
regis@google.com
1f233e677e
Address a few TODOs related to type propagation.
...
Review URL: https://chromiumcodereview.appspot.com//10407026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7716 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 18:47:45 +00:00
regis@google.com
f3aca487fe
First shot at static type propagation and type test elimination.
...
Review URL: https://chromiumcodereview.appspot.com//10399051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7708 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 23:21:24 +00:00
fschneider@google.com
81e36bbb1c
Remove an unused input operand from ExtractConstructorInstantiator.
...
The second input is discarded, so we don't need to pass it as input to
the computation. The explicit pop in the code generator is replaced by
LoadValue. This is a small step in refactoring the flowgraph-based code
generator to be shared between multiple backends.
Review URL: https://chromiumcodereview.appspot.com//10391171
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7705 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 22:48:49 +00:00
srdjan@google.com
eec14e4d2e
Applied my comment to Kevin's CL (it did not go through in the first place).
...
Review URL: https://chromiumcodereview.appspot.com//10332200
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7697 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 17:32:20 +00:00
kmillikin@google.com
e4030da968
Compute assigned variables and dominance frontiers.
...
During basic block discovery, compute assigned variables in each
block. After computing immediate dominators, compute dominance
frontiers. Both of these will be used for SSA construction.
R=fschneider@google.com ,srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10377104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7685 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 13:28:02 +00:00
kmillikin@google.com
75e43da991
Add a global graph entry.
...
Ensure all blocks including exception handlers are reachable from the
entry.
R=srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10399026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7681 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 12:10:02 +00:00
asiva@google.com
c71a8cc1ee
Change dart frame and stub frame layout to include the PC of the code executing on the frame. The stack frame layout is as follows:
...
ret PC
saved EBP <== EBP
PC (used to locate RawInstruction) <== ESP
Review URL: https://chromiumcodereview.appspot.com//10375059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7675 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 00:47:05 +00:00
srdjan@google.com
f1587852f7
Move code for accessing captured variables into the IL.
...
Review URL: https://chromiumcodereview.appspot.com//10398046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7674 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 00:35:33 +00:00
efortuna@google.com
b81f7a7402
Un revert the revert
...
Review URL: https://chromiumcodereview.appspot.com//10386152
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7672 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 22:28:10 +00:00
efortuna@google.com
01b3e58e08
reverting 7668??
...
Not clear why this claused widespread breakage. Investigating.
Review URL: https://chromiumcodereview.appspot.com//10388154
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7671 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 22:21:25 +00:00
asiva@google.com
76a3cf8bb6
Fix issue with stack layout assumption going wrong when a dart function has optional parameters and the number of arguments passed in is incorrect. A call to NoSuchMethodFunction stub is made but the area reserved for the copied arguments/locals is not removed. This results in the NoSuchMethodFunction stub accessing arguments from the wrong location on the stack.
...
Review URL: https://chromiumcodereview.appspot.com//10383147
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7669 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 21:52:29 +00:00
fschneider@google.com
c47128bd66
Replace long sequences of popq with a Drop(int) macro instruction.
...
This is for now only done on x64.
Review URL: https://chromiumcodereview.appspot.com//10383189
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7668 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 21:41:25 +00:00
turnidge@google.com
6448b9af52
Dart_IsSame -> Dart_IdentityEquals.
...
Use return value for the equality result. Made function more
efficient by avoiding a DARTSCOPE.
Review URL: https://chromiumcodereview.appspot.com//10196003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7664 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 18:34:58 +00:00
hausner@google.com
aecd8bc4f9
Add a check to JSON code
...
Addressing Anton's review comment. Also removing a leftover
debugging printf.
TBR=antonm
Review URL: https://chromiumcodereview.appspot.com//10391139
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7659 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 16:05:40 +00:00
ager@google.com
4a698f9fb3
Start 'fuzzing' of dart:io APIs and fix first issue found.
...
Deserialize unsupported Dart objects to Dart_CObject of type
kUnsupported instead of NULL pointers. That way the normal
Dart_CObject validation that tests for supported types will
work out of the box and not crash the VM.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10383179
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7645 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 10:40:44 +00:00
kmillikin@google.com
99d702f652
Fix a pair of flow graph construction issues.
...
The stack height was off by one for throw/rethrow. Change throw and
rethrow instructions so they never have successors because visiting the
graph and iterating nodes manually with StraightLineSuccessor should
agree.
R=srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10332139
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7643 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 08:55:56 +00:00
sgjesse@google.com
4166edd30b
Remove the SHA1 implementation used by web sockets and use the dart:crypto library one instead.
...
R=ager@google.com
BUG=none
TEST=tests/standalone/io/web_socket_test.dart
Review URL: https://chromiumcodereview.appspot.com//10398010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7640 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 07:55:44 +00:00
hausner@google.com
de86bd5ed8
Debugger wire protocol: setting breakpoints
...
- Adding commands to set breakpoints and showing current stack trace.
- Adding a callback hook to signal when a breakpoint gets resolved to
and actual line number.
- Adding ids for breakpoints and new breakpoint API functions, deprecating
the existing ones.
- Adding one helper function to the JSON class
Anton may want to take a look at the JSON addition.
Review URL: https://chromiumcodereview.appspot.com//10383164
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7628 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 21:10:25 +00:00
fschneider@google.com
3c9755e56f
Move FlowGraphPrinter to a new file.
...
This change is just moving code around.
Review URL: https://chromiumcodereview.appspot.com//10398015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7627 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 20:32:30 +00:00
srdjan@google.com
54f73f0365
Remove TuckTemp, PickTemp, use temporary locals instead.
...
Review URL: https://chromiumcodereview.appspot.com//10310132
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7624 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 20:01:35 +00:00
turnidge@google.com
ff9fdf11b2
Speed up the Dart_IsBlah functions by checking the class index. This
...
allows us to avoid creating handles (and therefore handle scopes) in
these functions.
Before:
UseDartApi : 66395
After:
UseDartApi : 42730
Main improvement comes from speeding up Dart_IsError.
Review URL: https://chromiumcodereview.appspot.com//10386060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7619 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 17:58:59 +00:00
srdjan@google.com
0ed5a12568
Fix IC data insertion: do it before the graph is built.
...
Review URL: https://chromiumcodereview.appspot.com//10378099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7554 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 16:38:26 +00:00
regis@google.com
5d9dab620c
Implement latest rules prohibiting some self referencing typedefs.
...
Update tests.
Review URL: https://chromiumcodereview.appspot.com//10377095
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7524 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:03:36 +00:00
hausner@google.com
e5d8d80479
Support more debugger commands in the wire protocol
...
Also add a very simple debugger shell which at this point
is meant to be a debugging help for the debugger code rather
than a user-friendly tool.
Review URL: https://chromiumcodereview.appspot.com//10392017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7518 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 22:04:50 +00:00
srdjan@google.com
bdb733b800
With removal of increment operations, each node has a unique id.
...
Review URL: https://chromiumcodereview.appspot.com//10356108
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7517 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 20:23:15 +00:00
asiva@google.com
4f105f9d0b
Resubmit change 7506.
...
Review URL: https://chromiumcodereview.appspot.com//10387061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7511 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:37 +00:00
srdjan@google.com
92b9e64375
Adding collected type feedback to the IL nodes (only in optimized mode).
...
Review URL: https://chromiumcodereview.appspot.com//10378093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7509 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:04:09 +00:00
asiva@google.com
6911f88b25
Revert change 7506 to check on build failure.
...
Review URL: https://chromiumcodereview.appspot.com//10386073
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7508 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:36:06 +00:00
asiva@google.com
3e5d8216c3
Fix issue 2888.
...
Allow for the library tag handler to be setup for the isolate, instead of
while loading a script. This ensures that we can use #import on the boot strap libraries like builtin, uri etc.
This change results in a dart API change and corresponding modifications are
necessary in dartium and App Engine.
Review URL: https://chromiumcodereview.appspot.com//10302020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7506 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:25:47 +00:00
antonm@google.com
0ccc21fc5a
Fix Mac build.
...
TBR=iposva@google.com
Review URL: https://chromiumcodereview.appspot.com//10388075
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7503 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:06:00 +00:00
srdjan@google.com
92eb96c913
Fix issue 2939, revert previous change that accepted null as excpetion objects:
...
throw null throws NullPointerException as per latest spec.
Review URL: https://chromiumcodereview.appspot.com//10392016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7475 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 22:27:12 +00:00
srdjan@google.com
48f28eebdb
Fix bugs in expression temp allocation, Kevin's CL 10302007 (Remove temporaries using explicit names) and merge with other temp.
...
Review URL: https://chromiumcodereview.appspot.com//10389041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7472 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 21:39:58 +00:00
srdjan@google.com
eaab5d38aa
Fixed compilation time measurement, restructure some code. Do not use slow ToFullyQualifiedCString in production backend (saves 10% in backend time with compile-all).
...
Review URL: https://chromiumcodereview.appspot.com//10389023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7435 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 00:03:25 +00:00
regis@google.com
a1fcd03ca6
Allow self referencing typedefs (issue 2490).
...
Fix Type::Name for malformed function types (issue 2340).
Added tests.
Removed bad negative test.
Review URL: https://chromiumcodereview.appspot.com//10388019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7422 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 16:27:43 +00:00
srdjan@google.com
d55a9bc973
First steps toward a two stages new compiler.
...
Review URL: https://chromiumcodereview.appspot.com//10356051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7420 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 16:03:15 +00:00
ricow@google.com
01fc874f57
Add requested allocation size information to fatal error when heap is exhausted.
...
Review URL: https://chromiumcodereview.appspot.com//10375046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7403 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 07:16:48 +00:00
srdjan@google.com
ad95f248cb
Improve type checking, remove unused stub (removed also in x64 in preparation of porting the better type checking code from ia 32 to x64).
...
Review URL: https://chromiumcodereview.appspot.com//10381045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7399 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 21:37:39 +00:00
srdjan@google.com
c8dd31e39b
Fix bug 2907: cannot instantiate Dynamic.
...
Review URL: https://chromiumcodereview.appspot.com//10389006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7397 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 19:49:54 +00:00
regis@google.com
c609c03cc2
Stop postponing instantiation of Type and remove InstantiatedType VM class.
...
Review URL: https://chromiumcodereview.appspot.com//10380019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7389 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 17:34:53 +00:00
regis@google.com
9810dd0f9a
Fix mac debug build.
...
Review URL: https://chromiumcodereview.appspot.com//10365026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7354 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:31:24 +00:00
srdjan@google.com
318742e413
Inline type checks for complex uninstantiated types, e.g., List<T>.
...
Review URL: https://chromiumcodereview.appspot.com//10317026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7353 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:28:26 +00:00
cshapiro@google.com
1472427af8
Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.""
...
This reverts commit 63480a81fccbde001494dd535cd06a8fa02ed261.
Review URL: https://chromiumcodereview.appspot.com//10379018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7352 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:16:09 +00:00
regis@google.com
9942bef559
Remove old x64 code generator.
...
Refactorize compiler and test code to be independent of actual code generator.
Review URL: https://chromiumcodereview.appspot.com//10375017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7350 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 21:55:10 +00:00