Index: sdk/lib/_internal/compiler/implementation/js_emitter/class_stub_generator.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/class_stub_generator.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/class_stub_generator.dart |
deleted file mode 100644 |
index f2f48ca0ab1a52c61c1983a1025ddbb19a3308eb..0000000000000000000000000000000000000000 |
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/class_stub_generator.dart |
+++ /dev/null |
@@ -1,43 +0,0 @@ |
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-part of dart2js.js_emitter; |
- |
-class ClassStubGenerator { |
- final Namer namer; |
- final Compiler compiler; |
- final JavaScriptBackend backend; |
- |
- ClassStubGenerator(this.compiler, this.namer, this.backend); |
- |
- jsAst.Expression generateClassConstructor(ClassElement classElement, |
- Iterable<String> fields) { |
- // TODO(sra): Implement placeholders in VariableDeclaration position: |
- // |
- // String constructorName = namer.getNameOfClass(classElement); |
- // return js.statement('function #(#) { #; }', |
- // [ constructorName, fields, |
- // fields.map( |
- // (name) => js('this.# = #', [name, name]))])); |
- return js('function(#) { #; }', |
- [fields, |
- fields.map((name) => js('this.# = #', [name, name]))]); |
- } |
- |
- jsAst.Expression generateGetter(Element member, String fieldName) { |
- ClassElement cls = member.enclosingClass; |
- String receiver = backend.isInterceptorClass(cls) ? 'receiver' : 'this'; |
- List<String> args = backend.isInterceptedMethod(member) ? ['receiver'] : []; |
- return js('function(#) { return #.# }', [args, receiver, fieldName]); |
- } |
- |
- jsAst.Expression generateSetter(Element member, String fieldName) { |
- ClassElement cls = member.enclosingClass; |
- String receiver = backend.isInterceptorClass(cls) ? 'receiver' : 'this'; |
- List<String> args = backend.isInterceptedMethod(member) ? ['receiver'] : []; |
- // TODO(floitsch): remove 'return'? |
- return js('function(#, v) { return #.# = v; }', |
- [args, receiver, fieldName]); |
- } |
-} |