zra@google.com
c686b2c624
Finishes removing intptr_t from raw object fields.
...
Also removes {Read,Write}IntptrValue from the snapshot reader and writer.
R=asiva@google.com
Review URL: https://codereview.chromium.org//343803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40048 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 19:51:22 +00:00
mlippautz@google.com
7c7919f8ef
Await it!
...
Add support for awaiting futures. This leaves us with a non-structural CFG.
TODOs:
* Forwarding exceptions through futures in async functions and rethrowing them using await.
* Known bug with nested contexts (will be fixed in following CL)
* await is not recognized at all expressions specified (yet)
BUG=
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//484933003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39559 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 17:35:56 +00:00
regis@google.com
38319b0f33
Fix issue 18435 (2nd attempt).
...
Add regression test.
R=hausner@google.com
Review URL: https://codereview.chromium.org//293013005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36402 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 00:32:32 +00:00
regis@google.com
8d7bc4bef5
Revert bad fix.
...
Review URL: https://codereview.chromium.org//288343005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36365 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 17:03:10 +00:00
regis@google.com
9ae1b1f5e0
Fix issue 18435.
...
Add regression test.
R=hausner@google.com
Review URL: https://codereview.chromium.org//295803003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36362 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 16:41:37 +00:00
turnidge@google.com
f8fcc45e3d
Save the entry context for a function that has captured loop variables.
...
BUG=18561
R=vegorov@google.com
Review URL: https://codereview.chromium.org//266783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35692 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 16:14:05 +00:00
iposva@google.com
4c07af2487
- Ensure that all names in local scopes are symbols.
...
- Avoid calling Equals when comparing names in local scopes.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//190753004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33443 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 19:37:04 +00:00
kmillikin@google.com
2a87b7eb94
Simplify the desugaring of catch clauses.
...
Rather than if/then/continue (where the continue does not match the
semantics of Dart's continue), use if/then/else. This removes the
unnecessary goto and label as a step toward streamlining support for
jumping in the compiler backend.
R=hausner@google.com
Review URL: https://codereview.chromium.org//63983005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30227 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-13 14:08:11 +00:00
kmillikin@google.com
a047e57abc
Remove some unused fields from class SourceLabel.
...
We no longer need assembler labels in the AST.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//55943002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29793 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 08:12:12 +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
hausner@google.com
f3ed73c8da
Make hidden initializing formal parameters invisible to the debugger
...
Fixes issue 13143.
R=regis@google.com
Review URL: https://codereview.chromium.org//23460040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27505 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 21:37:16 +00:00
hausner@google.com
32c1b1e412
Follow-up to capturing instantiator
...
Add boolean result to CaptureVariable, as suggested by Regis.
Review URL: https://codereview.chromium.org//22678002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25922 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 11:22:59 +00:00
hausner@google.com
e390ba9871
Fix access to type variables in initializer expressions
...
Allow initializer expressions to capture type arguments.
This used to crash because the receiver is not accessible
in initializer expressions. We don't need the receiver, we
just need to mark it as captured.
Fixes issue 8847.
R=ahe@google.com
Review URL: https://codereview.chromium.org//22415002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25877 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 15:15:02 +00:00
hausner@google.com
3c34f42110
Add debugging info for 'this'
...
Token range for 'this' was wrong in the debug info, so its value was
not shown in most functions. Fixes issue 11435.
R=regis@google.com
Review URL: https://codereview.chromium.org//18272027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24762 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 23:26:03 +00:00
iposva@google.com
50fc824be9
- Remove arguments definition test from the VM.
...
- Update tests still referring to it.
R=regis@google.com
Review URL: https://codereview.chromium.org//17977002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24539 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 18:37:53 +00:00
regis@google.com
53347a3337
Remove stack_frame_<arch>.cc files.
...
The architecture specific information is in stack_frame_<arch>.h files.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//14925005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22470 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 18:06:21 +00:00
regis@google.com
880af693cf
Introduce architecture specific headers describing Dart stack frames.
...
The actual cleanup will follow in another cl.
R=asiva@google.com
Review URL: https://codereview.chromium.org//14831004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22394 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 21:42:16 +00:00
hausner@google.com
d852cd37c4
Another fix for debugging stack traces and captured variables.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//14449009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22196 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 19:46:07 +00:00
hausner@google.com
d7fdf7f0e8
Fix context-allocated variables in stack traces
...
The debugger did not properly use saved contexts when collecting a stack trace.
Review URL: https://codereview.chromium.org//14503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22070 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 15:27:00 +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
asiva@google.com
80e281a078
Fix for issues 6080 -
...
- Read the saved context from the entry frame when straddling across C++ frames while iterating over a stack trace in the debugger. This ensures that the correct context is setup in the ActivationFrame structure in these scenarios (instead of the empty context).
- Read the saved context from the caller's frame when iterating over a stack trace in the debugger. The compiler saves the context in the caller frame before invoking closures, we read this saved context when iterating the stack trace.
Review URL: https://codereview.chromium.org//12179020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18235 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 22:43:16 +00:00
srdjan@google.com
9320b18911
Improve compilation speed on a pathological case > 2x (7 sec -> 2.7 sec) by improving local lookups.
...
Review URL: https://codereview.chromium.org//11893002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17085 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 19:08:55 +00:00
asiva@google.com
7022b39e35
Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
...
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
asiva@google.com
6749a3be79
Add read only handles for the following predefined symbols
...
"=="
"[]"
"[]="
"this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +00:00
hausner@google.com
be175c758e
Implement const expressions for local variables
...
Review URL: https://codereview.chromium.org//11265047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14716 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:19:43 +00:00
regis@google.com
2ea2249b48
Fix argument definition test (issue 4888).
...
Review URL: https://chromiumcodereview.appspot.com//10907064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11835 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 18:59:01 +00:00
regis@google.com
9e00bd8ccb
Implement argument definition test in the vm.
...
Add tests.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10915022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11664 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 22:46:44 +00:00
regis@google.com
bf7540da98
Store pointer instead of reference to LocalVariable in ast and flow graph.
...
Address comments of already committed r10203.
Review URL: https://chromiumcodereview.appspot.com//10832126
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10321 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 23:17:04 +00:00
vegorov@google.com
c9e8d9594e
Add support for fixed parameters in the register allocator.
...
This remove bailout for functions with non-zero number of non-fixed parameters and increases our coverage.
SpillSlot location was renamed into StackSlot location and now allows to address spill slots (positive stack index) and incoming parameters (negative stack index).
Environment was reordered to match order of values on the stack (previously it was inversed).
Correctly reserve spill slots in the prologue of the code. Previously register allocator was allocating spill slots, but generated code did not reserve any space for them on the stack so they might have been overwritten by calls.
Fix off by one in DeoptimizationStub::GenerateCode - we were reserving one slot too many.
Change --optimization-filter flag to use substring search instead of prefix comparison, this is much more useful when VM prefixes function name with a path to the file.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10828018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9934 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 13:21:39 +00:00
asiva@google.com
ed8db0f611
Move more symbols to the vm isolate.
...
Review URL: https://chromiumcodereview.appspot.com//10808111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9905 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 20:31:26 +00:00
asiva@google.com
ec7f44f025
Create frequently used symbols in the vm isolate
...
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
hausner@google.com
7a10c09bfb
Include variable names with _
...
Include local variables that begin with _.
Review URL: https://chromiumcodereview.appspot.com//10697011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9189 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 21:36:42 +00:00
asiva@google.com
5cbd276939
Make the parser agnostic to the TokenStream implementation. This is the first step towards compacting the token stream.
...
Pull the data stream writer/reader code out of snapshot into a generic file so that it can be reused into the token stream compaction implementation.
Review URL: https://chromiumcodereview.appspot.com//10632009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9043 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 20:37:01 +00:00
hausner@google.com
5fb638b575
Support captured variables in debugger
...
- Add context level ranges to LocalVarDescriptors
- Add callee-saved context chain register to LocalVarDescriptors
- Add context level and context offset of captured variables
to LocalVarDescriptors
- Add context chain to ActivationFrame
- Add current context level to ActivationFrame
Review URL: https://chromiumcodereview.appspot.com//10579020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8863 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 18:52:34 +00:00
fschneider@google.com
ee4a0fd042
First step to SSA construction: Phi insertion.
...
This CL contains the phi insertion step of the SSA construction algorithmus: The phi instructions inserted are not functional yet. Renaming is not included yet.
I based it on Kevin's CL (http://codereview.chromium.org/10388161/ ), rebased and fixed a bug (added missing iterator.Advance()) there.
It also reintroduces the Definition IL class because Phi-instructions are also
definitions that are referenced by UseVal.
I also added the set of immediately dominated blocks to each basic block.
This will be needed for pre-order dominator-tree traversal in the renaming pass.
Review URL: https://chromiumcodereview.appspot.com//10539108
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8604 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 13:36:04 +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
hausner@google.com
5e7bc84013
Fix debugger crashes
...
Do not include captured variables in the list of local variables
until the debugger knows how to get their value from the context.
Fixes issue 2401 (http://code.google.com/p/dart/issues/detail?id=2401 )
Review URL: https://chromiumcodereview.appspot.com//9961012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6187 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-04 18:51:20 +00:00
kmillikin@google.com
013864dcec
Implement x64 compilation for loading and storing local variables.
...
Continue to bailout on optional parameters and context-allocated local
variables.
Implement compilation of Bind and Do instructions, LoadLocal and StoreLocal
computations, and temporary values. Temporary allocation assumes they obey
a stack-discipline and have a single use---so any use is always the last
use. Temporaries can then be allocated via push and used via pop. This
dart function:
hukairs(a) {
var b, c;
c = b = a;
return c;
}
compiles to this annotated generated code snippet:
;; StoreLocal(b, #null)
66: mov $0x7f99303c0021,%rax
70: mov %rax,-0x8(%rbp)
;; StoreLocal(c, #null)
74: mov $0x7f99303c0021,%rax
7e: mov %rax,-0x10(%rbp)
;; t0 <-LoadLocal(a)
82: mov 0x10(%rbp),%ax
86: push %rax
;; t0 <-StoreLocal(b, t0)
87: pop %rax
88: mov %rax,-0x8(%rbp)
8c: push %rax
;; StoreLocal(c, t0)
8d: pop %rax
8e: mov %rax,-0x10(%rbp)
;; t0 <-LoadLocal(c)
92: mov -0x10(%rbp),%ax
96: push %rax
;; return t0
97: pop %rax
;; ...
bf: mov %rbp,%rsp
c2: pop %rbp
c3: retq
R=srdjan@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9447102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4666 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 09:11:18 +00:00
regis@google.com
5933826ae8
Fix context unchaining (issue 5991015).
...
Add test.
Review URL: https://chromiumcodereview.appspot.com//9392020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4201 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-14 00:58:56 +00:00
hausner@google.com
b43152a477
Fix issue 1246
...
continue; inside a switch statement jumps to outer loop.
http://code.google.com/p/dart/issues/detail?id=1246
Review URL: https://chromiumcodereview.appspot.com//9347032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4013 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-07 23:27:51 +00:00
hausner@google.com
4ee7c947aa
Getting value of local variables on stack trace
...
Introduce concept of scope in local variable info, according
to mirror proposal.
Review URL: http://codereview.chromium.org//8983034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3017 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 22:33:37 +00:00
hausner@google.com
503e2219b8
First part of inspecting local variables
...
This change introduces variable descriptors that describe the name, stack slot index, and source code stretch in which a variable is valid.
Activation frames in the stack trace now can enumerate the variables that are active in that frame.
Next step: fetch the value of variables from the stack.
Review URL: http://codereview.chromium.org//8992020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2671 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 21:40:28 +00:00
srdjan@google.com
f1198ffe5e
Added type propagation from store to load locals, but only within a sequence node (not across basic block).
...
Review URL: http://codereview.chromium.org//8919025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2365 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-13 01:11:28 +00:00
srdjan@google.com
17552e9a3c
Renaming type classes as discussed:
...
Type -> AbstractType
ParameterizedType -> Type
TODO:
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8761011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1987 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 16:54:52 +00:00
hausner@google.com
b8a55bf3d7
Initializer expressions must not access 'this'
...
Catch explicit and implicit accesses to 'this' in initializer list of constructors.
Review URL: https://chromereviews.googleplex.com/3517020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@81 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 22:39:25 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00