- 11 8月, 2017 1 次提交
-
-
由 Andy Gocke 提交于
Currently, the lambda rewriter has an early optimization pass in analysis that tries to find all local functions that only capture 'this' and remove references to local functions that do the same. There are two problems with this approach: 1) Generally, removing information from the tree is a bad idea because it hurts further analysis passes that may have needed that information. 2) The optimization strategy itself is very tricky and has a number of complex corner cases. This has lead to bugs, for example #19033. This PR deletes the current method and adds a new optimization routine at the end of the analysis, operating on assigned scopes and environments rather than removing captured variable analysis. The new optimization is as follows: if we end up with an environment containing only 'this', the environment can be removed, all containing methods can be moved to the top-level type, and all environments which capture the 'this' environment can instead directly capture the 'this' parameter. This produces almost the same results as the previous optimization, but is easier to validate as an algebraic equivalence. The baseline changes come from the new optimization being less aggressive about moving functions which only capture 'this' to the top level. This appears to be a wash -- some codegen gets slightly better, some gets slightly worse. Fixes #19033 Fixes #20577
-
- 08 8月, 2017 1 次提交
-
-
由 Andy Gocke 提交于
The frame creation pass now considers scope of captured variable introduction instead of closure creation, so the ordering can change if two or more nested functions access variables 'outside-in', e.g. ```csharp { int x = 0; { int y = 0; int L1() => y; { int z = 0; int L2() => x; } } } ``` If we visit closures in-order in the previous example, we create frames for L1, then L2. If we visit captured variables scopes, however, we visit `x` (captured by L2), then `y` (captued by L1).
-
- 02 8月, 2017 1 次提交
-
-
由 CyrusNajmabadi 提交于
* Rename Foo to Goo * Rename ifoo to igoo * Add back BOMs
-
- 29 6月, 2017 1 次提交
-
-
由 Sam Harwell 提交于
-
- 18 5月, 2017 1 次提交
-
-
由 Julien Couvreur 提交于
-
- 31 12月, 2016 1 次提交
-
-
由 Neal Gafter 提交于
Fixes #15910 Also fixes a sequence point issue with the let expression. Specifically, the source range for the query lambda included more than the expression of the let, but included the entire query clause. It now includes only the expression, like other query clauses.
-
- 11 4月, 2016 1 次提交
-
-
由 AlekseyTs 提交于
Add an instrumentation component that can be used to instrument certain statements and expressions during lowering. Part 2. This finalizes the refactoring. Sequence points are no longer created before LocalRewriter is invoked. LocalRewriter completely relies on instrumentation for sequence points generation. There is an exception, LocalRewriter creates hidden sequence points in three places, but they are not associated with any executable code derived from C# syntax. Related to #9819.
-
- 26 1月, 2016 1 次提交
-
-
由 Jared Parsons 提交于
-
- 08 12月, 2015 1 次提交
-
-
由 Charles Stoner 提交于
-
- 16 10月, 2015 1 次提交
-
-
由 Paul Harrington 提交于
-
- 10 9月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 26 7月, 2015 1 次提交
-
-
由 tmat 提交于
-
- 07 7月, 2015 1 次提交
-
-
由 Andrew Casey 提交于
They were getting dropped in ```MethodCompiler.BindMethodBody```.
-
- 16 5月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 15 5月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 12 5月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 07 5月, 2015 1 次提交
-
-
由 Wonseok Chae 提交于
This happens since setting next statement skips the closure initialization, which marks as hidden sequence point. In this PR, we emit a regular sequence point instead of a hidden sequence point to closure initialization whenever necessary, so IP move won't skip closure initialization.
-
- 10 4月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 24 3月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 06 3月, 2015 1 次提交
-
-
由 Tomas Matousek 提交于
-
- 28 2月, 2015 1 次提交
-
-
由 beep boop 提交于
Been almost a month since the code formatter was run so this change was a bit larger than would be expected for a normal (weekly) update. Diffs mostly around: - Whitespace changes - Missing copyright headers - Missing visibility modifiers
-
- 31 1月, 2015 1 次提交
-
-
由 TomasMatousek 提交于
1) Change MethdCompiler.BindMethodBody to associate correct syntax with BoundBlocks it creates when binding constructor with constructor initializer call (two bound blocks are created – outer one defines a closure scope for constructor parameters, the inner one defines a closure scope for variables in the body). 2) Introduce MethodDebugId – a method ordinal and generation ordinal pair 3) Introduce LamdbaDebugInfo and ClosureDebugInfo to represent information (syntax offset) we use to figure out how to map lambdas and closures to the previous generation. 4) Adds a new PDB CDI record (#7) to store lambda and closure debug info. 5) Generalizes CalculateLocalSyntaxOffset to handle positions in field/property initializers and constructor initializers. Use it to calculate syntax offsets of lambdas and closure scopes. (TODO: rename CalculateLocalSyntaxOffset to CalculateSyntaxOffset). 6) Replace lambda and scope ordinal dispenser integers with array builders that collect LambdaDebugInfo and ClosureDebugInfo. 7) Use TryGet- pattern for all VariableSlotAllocator APIs. 8) Implements mapping of lambda method and display class names to previous generation via VariableSlotAllocator. (changeset 1407240)
-