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

Unified Diff: dart/frog/leg/elements/elements.dart

Issue 9419009: Use shared implementation of Stopwatch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dart/frog/leg/emitter.dart » ('j') | dart/frog/leg/lib/clock.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/elements/elements.dart
diff --git a/dart/frog/leg/elements/elements.dart b/dart/frog/leg/elements/elements.dart
index bc34765653118d4866ba7cf7bcedbbb4e27b9b61..e9ade31b193fdc7cb1efb8559293b6afdcdaff4f 100644
--- a/dart/frog/leg/elements/elements.dart
+++ b/dart/frog/leg/elements/elements.dart
@@ -367,26 +367,38 @@ class FunctionElement extends Element {
FunctionParameters functionParameters;
+ FunctionElement implementation;
+
FunctionElement(SourceString name,
ElementKind kind,
- Modifiers this.modifiers,
+ Modifiers modifiers,
Element enclosing)
- : super(name, kind, enclosing);
+ : this.tooMuchOverloading(name, null, kind, modifiers, enclosing, null);
FunctionElement.node(SourceString name,
FunctionExpression node,
ElementKind kind,
- Modifiers this.modifiers,
+ Modifiers modifiers,
Element enclosing)
- : super(name, kind, enclosing), cachedNode = node;
+ : this.tooMuchOverloading(name, node, kind, modifiers, enclosing, null);
FunctionElement.from(SourceString name,
FunctionElement other,
Element enclosing)
- : super(name, other.kind, enclosing),
- cachedNode = other.cachedNode,
- modifiers = other.modifiers,
- functionParameters = other.functionParameters;
+ : this.tooMuchOverloading(name, other.cachedNode, other.kind,
+ other.modifiers, enclosing,
+ other.functionParameters);
+
+ FunctionElement.tooMuchOverloading(SourceString name,
ngeoffray 2012/02/17 09:45:21 Unsurprisingly, this is too much. Why didn't you k
ahe 2012/02/17 15:43:11 As we discussed, I'd like to raise the abstraction
+ FunctionExpression this.cachedNode,
+ ElementKind kind,
+ Modifiers this.modifiers,
+ Element enclosing,
+ FunctionParameters this.functionParameters)
+ : super(name, kind, enclosing)
+ {
+ implementation = this;
+ }
bool isInstanceMember() {
return isMember()
« no previous file with comments | « no previous file | dart/frog/leg/emitter.dart » ('j') | dart/frog/leg/lib/clock.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698