Skip to content

Commit

Permalink
Revert "Refactoring resolution of local access and unqualified access…
Browse files Browse the repository at this point in the history
… of statics"

This reverts commit 58896b7.

BUG=

Review URL: https://codereview.chromium.org//1160313006
  • Loading branch information
johnniwinther committed Jun 8, 2015
1 parent a1b6306 commit 1807369
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 496 deletions.
3 changes: 1 addition & 2 deletions pkg/compiler/lib/src/enqueue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,7 @@ abstract class Enqueuer {
*/
void registerStaticUse(Element element) {
if (element == null) return;
assert(invariant(element, element.isDeclaration,
message: "Element ${element} is not the declaration."));
assert(invariant(element, element.isDeclaration));
if (Elements.isStaticOrTopLevel(element) && element.isField) {
universe.registerStaticFieldUse(element);
}
Expand Down
6 changes: 0 additions & 6 deletions pkg/compiler/lib/src/helpers/trace.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ void _trace(String message, {bool condition(String stackTrace), int limit,
}
}

/// Creates a function to use as an `condition` argument in [trace] that filters
/// stack traces that contains any of the [exceptions].
traceExceptions(List<String> exceptions) {
return (String stackTrace) => !exceptions.any(stackTrace.contains);
}

/// Function signature of [traceAndReport].
typedef void TraceAndReport(Compiler compiler, Spannable node, String message,
{bool condition(String stackTrace), int limit,
Expand Down
36 changes: 0 additions & 36 deletions pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1695,26 +1695,6 @@ class SimpleTypeInferrerVisitor<T>
return handleStaticFieldOrGetterInvoke(node, getter);
}

@override
T visitStaticSetterInvoke(
ast.Send node,
MethodElement setter,
ast.NodeList arguments,
CallStructure callStructure,
_) {
return handleInvalidStaticInvoke(node);
}

@override
T visitTopLevelSetterInvoke(
ast.Send node,
MethodElement setter,
ast.NodeList arguments,
CallStructure callStructure,
_) {
return handleInvalidStaticInvoke(node);
}

@override
T visitUnresolvedInvoke(
ast.Send node,
Expand Down Expand Up @@ -1890,22 +1870,6 @@ class SimpleTypeInferrerVisitor<T>
return handleStaticGetterGet(node, getter);
}

@override
T visitStaticSetterGet(
ast.Send node,
MethodElement setter,
_) {
return types.dynamicType;
}

@override
T visitTopLevelSetterGet(
ast.Send node,
MethodElement setter,
_) {
return types.dynamicType;
}

@override
T visitUnresolvedGet(
ast.Send node,
Expand Down
Loading

0 comments on commit 1807369

Please sign in to comment.