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

Unified Diff: pkg/dev_compiler/lib/js/legacy/dart_sdk.js

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:
Download patch
« no previous file with comments | « pkg/dev_compiler/lib/js/es6/dart_sdk.js ('k') | pkg/dev_compiler/lib/src/compiler/code_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/js/legacy/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
index df096198a51a9db335fa676574cdb98e7b8baf2b..bf9b491adcefcb0a6c7329380db13fa1ae0389be 100644
--- a/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/legacy/dart_sdk.js
@@ -13515,7 +13515,31 @@ dart_library.library('dart_sdk', null, /* Imports */[
if (privateSymbol != null) {
return privateSymbol;
}
- return _js_mirrors.getName(symbol);
+ let name = _js_mirrors.getName(symbol);
+ switch (name) {
+ case '[]':
+ {
+ name = '_get';
+ break;
+ }
+ case '[]=':
+ {
+ name = '_set';
+ break;
+ }
+ case 'unary-':
+ {
+ name = '_negate';
+ break;
+ }
+ case 'constructor':
+ case 'prototype':
+ {
+ name = dart.str`_${name}`;
+ break;
+ }
+ }
+ return name;
};
dart.lazyFn(_js_mirrors._getMember, () => SymbolTodynamic());
_js_mirrors._getNameForESSymbol = function(member) {
« no previous file with comments | « pkg/dev_compiler/lib/js/es6/dart_sdk.js ('k') | pkg/dev_compiler/lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698