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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart

Issue 11660033: Remove unused variant of native JS class definition. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | tests/compiler/dart2js_native/native_literal_class_frog_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
index 11049740aa5b79218f948214466bb8d46a4dd843..84e57f1402a2c844a2f8a37cdea20866df370c59 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
@@ -110,30 +110,6 @@ function(cls, desc) {
}""";
}
- void generateNativeLiteral(ClassElement classElement) {
- String quotedNative = classElement.nativeTagInfo.slowToString();
- String nativeCode = quotedNative.substring(2, quotedNative.length - 1);
- String className = backend.namer.getName(classElement);
- nativeBuffer.add(className);
- nativeBuffer.add('$_=$_');
- nativeBuffer.add(nativeCode);
- nativeBuffer.add('$N');
-
- void defineInstanceMember(String name, CodeBuffer value) {
- nativeBuffer.add("$className.$name$_=$_$value$N");
- }
-
- classElement.implementation.forEachMember((_, Element member) {
- if (member.isInstanceMember()) {
- emitter.addInstanceMember(member, defineInstanceMember);
- }
- });
- }
-
- bool isNativeLiteral(String quotedName) {
- return identical(quotedName[1], '=');
- }
-
bool isNativeGlobal(String quotedName) {
return identical(quotedName[1], '@');
}
@@ -153,12 +129,6 @@ function(cls, desc) {
assert(classElement.backendMembers.isEmpty);
String quotedName = classElement.nativeTagInfo.slowToString();
- if (isNativeLiteral(quotedName)) {
- generateNativeLiteral(classElement);
- // The native literal kind needs to be dealt with specially when
- // generating code for it.
- return;
- }
CodeBuffer fieldBuffer = new CodeBuffer();
CodeBuffer getterSetterBuffer = new CodeBuffer();
@@ -279,7 +249,7 @@ function(cls, desc) {
new js.Return(
new js.VariableUse('this').dot(target).callWith(arguments)));
- if (isNativeLiteral(nativeTagInfo) || !overriddenMethods.contains(member)) {
+ if (!overriddenMethods.contains(member)) {
// Call the method directly.
return statements;
} else {
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/native_literal_class_frog_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698