Commit graph

65 commits

Author SHA1 Message Date
Martin Kustermann
a64b06ec83 [gardening] Migrate most files to be implicit-bool-conversion free
Issue https://dart-review.googlesource.com/c/sdk/+/115701

Change-Id: Ib579f0bbc8d694aec74afd837217316a10baf910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115707
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-09-05 21:41:42 +00:00
Alexander Markov
449446571f [vm/bytecode] Collect context levels for compiled code generated from bytecode
Change-Id: Ia2047440e05fce3263f8feb38be4cedd4357ab10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112920
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-13 20:32:49 +00:00
Samir Jindel
7929e1c714 [vm/ffi] Remove LocalVariable references from Allocate/CloneContext instructions
Also some other cleanups from https://dart-review.googlesource.com/c/sdk/+/107407,
and exclude scopes.cc from the precompiled runtime.

Change-Id: If14e46d44e6114a123a1eae3c85b63519b2863ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108274
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-07-08 17:11:34 +00:00
Régis Crelier
c6c0e5bf40 [vm/debugger] Make use of variable descriptors in bytecode debugger.
Change-Id: Ibf4c8f638065c8173c5c21c8fa9c40ee5cecb587
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106427
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-06-18 19:47:27 +00:00
Ryan Macnak
e48ad45fbd [vm, interpreter] Enable field guards.
Bug: https://github.com/dart-lang/sdk/issues/36131
Change-Id: I8aa538bc96d10d14322c875228dbd7a97ddf114b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95491
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-03-07 00:19:40 +00:00
Alexander Markov
51a334caa7 [vm] Remove kernel reading from BuildArgumentTypeChecks
This change is a preparation for decoupling flow graph building of
special functions from kernel reading.

Change-Id: Ied90bc6894cdfa48f49c71e980079967c8c4fbb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95061
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-05 18:48:51 +00:00
Vyacheslav Egorov
ddbe22190c [vm/compiler] Refactor representation of stores and loads in IL.
Make StoreIntanceField and LoadField instructions use a single uniform
abstraction: Slot (used to be called NativeFieldDesc), which represents
either a real Dart field (i.e. a field that has a corresponding Field object)
or a native VM field that does not have a corresponding Field object.

This refactoring eliminates raw stores/loads that were just using offsets
before - now we always know what kind of slots we are accessing and
this yields better aliasing information.

Change-Id: I2f48332d58258219565bd961764e8cc9dd4d75ce
Reviewed-on: https://dart-review.googlesource.com/c/74582
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-11-16 17:57:29 +00:00
Samir Jindel
5ef1465c55 [vm] Attach type to parameters on unchecked entry.
This is especially important for multiple entry-points in AOT mode, since without the type
information we can't inline certain intrinsics (because they would have to de-opt).

Change-Id: I62352234c95a1211ff7cdabb9cefc48990427a6f
Reviewed-on: https://dart-review.googlesource.com/c/82999
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-11-12 12:57:00 +00:00
Vyacheslav Egorov
325a8fee4d [vm] Fix experimental_unsafe_mode_use_at_your_own_risk mode.
Turn it into an isolate specific flag so that Kernel isolate continues
to run from app-jit snapshot without trusting any types.

Change-Id: I627a40025d53c23586da5a207eb096886ca98bc4
Reviewed-on: https://dart-review.googlesource.com/72040
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-08-30 12:04:37 +00:00
Alexander Markov
6bc1cdb5b1 [vm] Add unsafe mode to VM
This CL adds experimental --experimental-unsafe-mode-use-at-your-own-risk
VM option which does the following:
* Dart 2 strong mode type and bool checks are omitted.
* VM compiler optimizations which rely on strong mode types are disabled.

Applications which do not fail any strong mode checks at run time
should behave exactly the same in strong and weak modes.
Applications with failing strong mode checks will not see corresponding
errors but VM should not crash.

This option can be used for experiments, or as a temporary remedy for
regressions caused by expensive strong mode type checks.

Change-Id: I042cbccba83c105b61b3e11c659a35c20e0329cd
Reviewed-on: https://dart-review.googlesource.com/65484
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-07-20 20:31:19 +00:00
Martin Kustermann
0a8b236159 [VM] Make the encoding of variable descriptors use variable indices
This decouples the scope building from knowing about frame layout.

Issue https://github.com/dart-lang/sdk/issues/33274

Change-Id: I9058b242fb24f859f54d6e3660a5972df86d39e6
Reviewed-on: https://dart-review.googlesource.com/59093
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-11 09:55:54 +00:00
Martin Kustermann
a603635b85 [VM] Decouple frontend from frame layout
So far the frontend (parser, flow graph builder, ssa construction) were
aware of the actual frame layout.

This CL makes the indices we assign to [LocalVariable]s logical
indices, assigning:

  * M parameters the indices      1 ... M
  * N local variables the indices 0 -1 ... -(N-1)

The scope building, flow graph builder and ssa construction operate on
those logical indices.

When emitting actual code, the backend will translate those indices into
actual FP relative indices. This allows us to be more flexible in the
backend which frame layout we choose.

Issue https://github.com/dart-lang/sdk/issues/33274

Change-Id: I9a504bf97821c257aafd2b3430df9f4c9da4b442
Reviewed-on: https://dart-review.googlesource.com/57321
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-07 11:35:58 +00:00
Alexander Markov
6ed2ebf6b0 [vm/kernel/aot] Infer parameter types in type flow analysis
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Iea1480ce2f20b6cb08b4eb57eef5ca14a002e6e0
Reviewed-on: https://dart-review.googlesource.com/40400
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-13 01:11:18 +00:00
Vyacheslav Egorov
d117760ba6 [vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods.
This relands 75a9579ea0.

The approach works as follows:

Step 1: Kernel transform. Under the closed world assumption compute the
set of selectors dispatched dynamically, then mark all procedures that don't
match any of those selectors as 'not-dispatched-dynamically'.

Step 2: VM backend. When building IR for a function if this function was
marked as not-dispatched-dynamically then omit type checks for any parameter
that is not marked as generic-covariant-impl, as such arguments are guaranteed
to be checked on the caller side (by front-end).


+------------------------+------------+----------+-----------+--------------+
|       benchmark        |  baseline  |  current |  with opt |  improved by |
+------------------------+------------+----------+-----------+--------------+
| stock_layout_iteration |  2366.3786 |   2724.3 |   2562.75 |  -5.93%      |
| stock_build_iteration  |     3824.3 |   4914.8 |      4681 |  -4.76%      |
+------------------------+------------+----------+-----------+--------------+

* Flutter gallery Instructions size is reduced by 11% (8748720 bytes to 7846368 bytes).
Baseline is at 6196496 bytes.


Alternatively to annotating individual procedures, I considered annotating Program node
with a set of dynamically dispatched selectors. Decoding and passing this information
around proved to be quite cumbersome in the "streaming" world, so I opted for a simpler
approach where all individual procedures are annotated.

Bug: https://github.com/dart-lang/sdk/issues/3179
Change-Id: I2f32a609e3872c74d5ae7bbd97555453aaedf15f
Reviewed-on: https://dart-review.googlesource.com/38125
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-02-02 11:43:55 +00:00
Vyacheslav Egorov
7078f6be58 Revert "[vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods."
This reverts commit 75a9579ea0.

Reason for revert: function_subtype_bound_closure7_test fails in darkp

Original change's description:
> [vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods.
> 
> The approach works as follows:
> 
> Step 1: Kernel transform. Under the closed world assumption compute the
> set of selectors dispatched dynamically, then mark all procedures that don't
> match any of those selectors as 'not-dispatched-dynamically'.
> 
> Step 2: VM backend. When building IR for a function if this function was
> marked as not-dispatched-dynamically then omit type checks for any parameter
> that is not marked as generic-covariant-impl, as such arguments are guaranteed
> to be checked on the caller side (by front-end).
> 
> # Performance Impact
> 
> +------------------------+------------+----------+-----------+--------------+
> |       benchmark        |  baseline  |  current |  with opt |  improved by |
> +------------------------+------------+----------+-----------+--------------+
> | stock_layout_iteration |  2366.3786 |   2724.3 |   2562.75 |  -5.93%      |
> | stock_build_iteration  |     3824.3 |   4914.8 |      4681 |  -4.76%      |
> +------------------------+------------+----------+-----------+--------------+
> 
> * Flutter gallery Instructions size is reduced by 11% (8748720 bytes to 7846368 bytes).
> Baseline is at 6196496 bytes.
> 
> # Alternative Implementations
> 
> Alternatively to annotating individual procedures, I considered annotating Program node
> with a set of dynamically dispatched selectors. Decoding and passing this information
> around proved to be quite cumbersome in the "streaming" world, so I opted for a simpler
> approach where all individual procedures are annotated.
> 
> Change-Id: I363db6d5dd1138fe25917646313c16d0b213c3b4
> Reviewed-on: https://dart-review.googlesource.com/37822
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I0fd6bf3e6edfc3e605da2b996f9a0da6c409d01c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/37802
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-01 20:41:19 +00:00
Vyacheslav Egorov
75a9579ea0 [vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods.
The approach works as follows:

Step 1: Kernel transform. Under the closed world assumption compute the
set of selectors dispatched dynamically, then mark all procedures that don't
match any of those selectors as 'not-dispatched-dynamically'.

Step 2: VM backend. When building IR for a function if this function was
marked as not-dispatched-dynamically then omit type checks for any parameter
that is not marked as generic-covariant-impl, as such arguments are guaranteed
to be checked on the caller side (by front-end).

# Performance Impact

+------------------------+------------+----------+-----------+--------------+
|       benchmark        |  baseline  |  current |  with opt |  improved by |
+------------------------+------------+----------+-----------+--------------+
| stock_layout_iteration |  2366.3786 |   2724.3 |   2562.75 |  -5.93%      |
| stock_build_iteration  |     3824.3 |   4914.8 |      4681 |  -4.76%      |
+------------------------+------------+----------+-----------+--------------+

* Flutter gallery Instructions size is reduced by 11% (8748720 bytes to 7846368 bytes).
Baseline is at 6196496 bytes.

# Alternative Implementations

Alternatively to annotating individual procedures, I considered annotating Program node
with a set of dynamically dispatched selectors. Decoding and passing this information
around proved to be quite cumbersome in the "streaming" world, so I opted for a simpler
approach where all individual procedures are annotated.

Change-Id: I363db6d5dd1138fe25917646313c16d0b213c3b4
Reviewed-on: https://dart-review.googlesource.com/37822
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-02-01 18:07:38 +00:00
Martin Kustermann
cf1de7d46c [VM] Replace hand-written assembly prologues with IR
As part of the prologue changes we get rid of the empty context as well.

Issue https://github.com/dart-lang/sdk/issues/31495

Change-Id: I707e23c631bcfbbad6c91c4963d0c10f7a0be625
Reviewed-on: https://dart-review.googlesource.com/25320
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-13 16:04:34 +00:00
Zachary Anderson
6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Ryan Macnak
2109cc53bf Remember deopt-id -> context-level mappings in var descriptors.
- Add deopt ids to DebugStepInstr and StrictCompareInstr since the debugger can stop there.
 - Add missing pc descriptor in DBC's StringInterpolateInstr.

Re-enable async_debugger, which had been crashing flakily from context mismatches.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2903993002 .
2017-06-01 12:33:33 -07:00
Zachary Anderson
a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Zachary Anderson
103881d01c Make header include guards great again
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER

This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.

R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07:00
John McCutchan
8061bd5a8a Add local variable declaration token position to service protocol
- [x] Add three public fields to the "BoundVariable" service type: declarationTokenPos, visibleStartTokenPos, and visibleEndTokenPos. (naming suggestions welcome!)
- [x] Extend LocalVarDescriptors to hold the declaration token position (it already had the scope visibility boundaries).
- [x] Extend ContextScope to hold the declaration token position.
- [x] Add a unit test which verifies this works for local variables, function parameters, and closure captured variables.

Fixes https://github.com/dart-lang/sdk/issues/25569

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2419013004 .
2016-10-17 11:18:24 -07:00
Vyacheslav Egorov
f67ce21068 VM support for running Kernel binaries.
BUG=
R=asiva@google.com, fschneider@google.com

Review URL: https://codereview.chromium.org/2411823003 .
2016-10-15 22:48:46 +02:00
Matthias Hausner
1859ce46c3 Fix finally clause inlining for forward jumps
In switch statements, ‘continue L’ jumps can refer to a label
that the compiler hasn’t seen yet. The label is tentatively
to be in the innermost switch statement, but may later
be moved to an outer switch statement. The compiler must
make sure that the correct finally blocks are inlined in front
of these jumps.

BUG=26577, 25310
R=regis@google.com

Review URL: https://codereview.chromium.org/2030763002 .
2016-06-02 09:03:49 -07:00
John McCutchan
d77d376124 Replace intptr_t with TokenDescriptor
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).

There are some cleanups I plan on doing as a follow up CL:

- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()

R=iposva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1644793002 .
2016-02-02 10:15:44 -08:00
Siva Annamalai
99abe7d883 - Some cleanup of dynamic_type usage.
- Avoid egregious creation of handles in Class::CreateInvocationDispatcher

R=regis@google.com

Review URL: https://codereview.chromium.org/1409113006 .
2015-10-21 17:24:10 -07:00
Regis Crelier
1abc4ce8e9 Reduce the number of captured variables in async code, by only capturing local
variables that are in scope at each await location.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1308163006 .
2015-09-02 18:29:32 -07:00
Regis Crelier
e6225bee44 Improve async code in VM by not unnecessarily capturing parameters of async and
sync closures, thereby avoiding copy of parameters on entry.
Remove variable aliases in local scopes now that another mechanism detects
use-before-define cases. Keep aliases only for captured variables of outer
functions thereby speeding up scope lookups for all Dart code (not just async).
The next step will be to try to reduce the number of captured variables in
async code.

R=hausner@google.com

Review URL: https://codereview.chromium.org//1317213003 .
2015-08-27 16:49:07 -07:00
regis@google.com
3783f349dc Be less aggressive in sharing contexts between scopes so that sibling contexts
cannot appear in nested node sequences (issue 22858), since this case cannot
be handled by the graph builder.
Add assert to graph builder to detect such occurences (uncovered async* bug).
Fix an async* issue where a scope was mistakenly reused.
Improve ast printing for node sequences.
Add regression test.

R=hausner@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44592 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 22:39:46 +00:00
hausner@google.com
cddac39a65 Eliminate some DebugStep calls in async code
There is no reason to check debugger stepping when assigning
to internal helper variables.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44577 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 16:54:44 +00:00
fschneider@google.com
e6ef4b16bf Fix captured parameters and optimized try-catch.
The stack slots of captured parameters must be skipped when
generating sync code in optimized try-catch. Since those parameters
are initially copied into the context, their values are not recorded
in the environment.

Store-to-load forwarding may though use the original initial value
from the stack and therefore it must not be overwritten by try-sync
code that predeeds every call inside optimized try-blocks.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41099 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 14:48:32 +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
98b5d17d9d Introduce a nesting stack to the flow graph builder.
Statically track nested blocks, loops, and switches while constructing
the flow graph.  Use the nesting stack as a mapping from source labels
(class SourceLabel) to their flow-graph targets (class JoinEntryInstr).

This removes the indirect dependence of the AST on the intermediate
language and the mutable compiler state from the AST.

R=fschneider@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30336 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 11:39:14 +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
fschneider@google.com
9a6657cd4d Eliminate temporary locals for some expressions
This CL affects a subset of expressions that use temporary locals: constructor
calls, array literals and and instance getter postfix-ops.

For expressions that are de-sugared in the parser I added LetNode.
It creates a scoped temporary local bound to an initializing expression.

For expressions where we need a temporary local at graph-building time,
I added a helper class TempLocalScope to easily create a single temporary
local in the graph builder since this is a frequently recurring pattern.

This simplifies code in the parser and the graph builder and also fixes a
bug with indexed-super invocation and NoSuchMethod.

BUG=dart:8918
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23401 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 12:19:21 +00:00
asiva@google.com
4c069867e4 - Make Boolean 'true' and 'false' singleton VM isolate objects.
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +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
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
zerny@google.com
8e36c2f3cc Cache parsed functions when inlining.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13882 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 15:13:32 +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