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

Unified Diff: pkg/compiler/lib/src/js_emitter/native_emitter.dart

Issue 881803002: dart2js: remove unused function in native emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index 54d58e1fffd9feaf74a003611c7c3b4a27787b68..e811970e742d8c7e70a276ba1ebd86d90407a6f2 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -384,45 +384,6 @@ class NativeEmitter {
return isSupertypeOfNativeClass(element);
}
- void assembleCode(CodeOutput targetOutput) {
- List<jsAst.Property> objectProperties = <jsAst.Property>[];
-
- jsAst.Property addProperty(String name, jsAst.Expression value) {
- jsAst.Property prop = new jsAst.Property(js.string(name), value);
- objectProperties.add(prop);
- return prop;
- }
-
- if (hasNativeClasses) {
- // If the native emitter has been asked to take care of the
- // noSuchMethod handlers, we do that now.
- if (handleNoSuchMethod) {
- emitterTask.oldEmitter.nsmEmitter.emitNoSuchMethodHandlers(addProperty);
- }
- }
-
- // If we have any properties to add to Object.prototype, we run
- // through them and add them using defineProperty.
- if (!objectProperties.isEmpty) {
- jsAst.Expression init = js(r'''
- (function(table) {
- for(var key in table)
- #(Object.prototype, key, table[key]);
- })(#)''',
- [ defPropFunction,
- new jsAst.ObjectInitializer(objectProperties)]);
-
- if (emitterTask.compiler.enableMinification) {
- targetOutput.add(';');
- }
- targetOutput.addBuffer(jsAst.prettyPrint(
- new jsAst.ExpressionStatement(init), compiler));
- targetOutput.add('\n');
- }
-
- targetOutput.add('\n');
- }
-
/// Returns a JavaScript template that fills the embedded globals referenced
/// by [interceptorsByTagAccess] and [leafTagsAccess].
///
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698