Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Issue 11030056: Implement new scope rules for type variables (issue 5230). (Closed)

Created:
8 years, 2 months ago by regis
Modified:
8 years, 2 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement new scope rules for type variables (issue 5230). Fix tests. Committed: https://code.google.com/p/dart/source/detail?r=13316

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -46 lines) Patch
M runtime/vm/parser.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/parser.cc View 6 chunks +31 lines, -34 lines 2 comments Download
M tests/language/language.status View 1 chunk +0 lines, -6 lines 0 comments Download
M tests/language/type_parameter_test.dart View 2 chunks +17 lines, -3 lines 0 comments Download
M tests/language/type_variable_scope_test.dart View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
regis
8 years, 2 months ago (2012-10-05 18:51:27 UTC) #1
hausner
lgtm https://codereview.chromium.org/11030056/diff/1/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/11030056/diff/1/runtime/vm/parser.cc#newcode7759 runtime/vm/parser.cc:7759: Function& outer_function = Function::Handle(current_function().raw()); You could have a ...
8 years, 2 months ago (2012-10-05 19:57:45 UTC) #2
regis
8 years, 2 months ago (2012-10-05 20:28:40 UTC) #3
Thanks!

https://codereview.chromium.org/11030056/diff/1/runtime/vm/parser.cc
File runtime/vm/parser.cc (right):

https://codereview.chromium.org/11030056/diff/1/runtime/vm/parser.cc#newcode7759
runtime/vm/parser.cc:7759: Function& outer_function =
Function::Handle(current_function().raw());
On 2012/10/05 19:57:45, hausner wrote:
> You could have a special case where you don't allocate a handle when we're
> parsing a non-nested function. That is probably the common case. Not sure
> whether it's worth it.

Good point.
I optimized Function::IsInFactoryScope instead and used it here and in
Parser::IsInstantiatorRequired.

Powered by Google App Engine
This is Rietveld 408576698