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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart

Issue 2611423002: Fix type error in js_dart2js.dart caught by DDC. (Closed)
Patch Set: Fix noSuchMethod handling of methods that are also extension methods. Fix noSuchMethod handling of … Created 3 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 | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | tests/lib_strong/collection/list_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
index 856009661428ad901676bb45967c5ab67bbcd2e4..e1280198b95d8ce750bf569f9611d8624d94ae9f 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
@@ -85,7 +85,24 @@ dynamic _getMember(Symbol symbol) {
if (privateSymbol != null) {
return privateSymbol;
}
- return getName(symbol);
+ var name = getName(symbol);
+ // TODO(jacobr): this code is duplicated in code_generator.dart
+ switch (name) {
+ case '[]':
+ name = '_get';
+ break;
+ case '[]=':
+ name = '_set';
+ break;
+ case 'unary-':
+ name = '_negate';
+ break;
+ case 'constructor':
+ case 'prototype':
+ name = '_$name';
+ break;
+ }
+ return name;
}
String _getNameForESSymbol(member) {
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | tests/lib_strong/collection/list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698