| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.js_emitter.full_emitter.nsm_emitter; | 5 library dart2js.js_emitter.full_emitter.nsm_emitter; |
| 6 | 6 |
| 7 import '../../elements/entities.dart'; | 7 import '../../elements/entities.dart'; |
| 8 import '../../js/js.dart' as jsAst; | 8 import '../../js/js.dart' as jsAst; |
| 9 import '../../js/js.dart' show js; | 9 import '../../js/js.dart' show js; |
| 10 import '../../js_backend/js_backend.dart' show GetterName, SetterName; | 10 import '../../js_backend/js_backend.dart' show GetterName, SetterName; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 if (!minify) { | 170 if (!minify) { |
| 171 sortedLongs = | 171 sortedLongs = |
| 172 sorted.map((selector) => selector.invocationMirrorMemberName); | 172 sorted.map((selector) => selector.invocationMirrorMemberName); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 // Startup code that loops over the method names and puts handlers on the | 175 // Startup code that loops over the method names and puts handlers on the |
| 176 // Object class to catch noSuchMethod invocations. | 176 // Object class to catch noSuchMethod invocations. |
| 177 ClassEntity objectClass = compiler.commonElements.objectClass; | 177 ClassEntity objectClass = compiler.commonElements.objectClass; |
| 178 jsAst.Expression createInvocationMirror = backend.emitter | 178 jsAst.Expression createInvocationMirror = backend.emitter |
| 179 .staticFunctionAccess(backend.helpers.createInvocationMirror); | 179 .staticFunctionAccess(compiler.commonElements.createInvocationMirror); |
| 180 if (useDiffEncoding) { | 180 if (useDiffEncoding) { |
| 181 statements.add(js.statement( | 181 statements.add(js.statement( |
| 182 '''{ | 182 '''{ |
| 183 var objectClassObject = processedClasses.collected[#objectClass], | 183 var objectClassObject = processedClasses.collected[#objectClass], |
| 184 nameSequences = #diffEncoding.split("."), | 184 nameSequences = #diffEncoding.split("."), |
| 185 shortNames = []; | 185 shortNames = []; |
| 186 if (objectClassObject instanceof Array) | 186 if (objectClassObject instanceof Array) |
| 187 objectClassObject = objectClassObject[1]; | 187 objectClassObject = objectClassObject[1]; |
| 188 for (var j = 0; j < nameSequences.length; ++j) { | 188 for (var j = 0; j < nameSequences.length; ++j) { |
| 189 var sequence = nameSequences[j].split(","), | 189 var sequence = nameSequences[j].split(","), |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 } | 403 } |
| 404 | 404 |
| 405 String get value { | 405 String get value { |
| 406 if (_cachedValue == null) { | 406 if (_cachedValue == null) { |
| 407 _cachedValue = _computeDiffEncoding(); | 407 _cachedValue = _computeDiffEncoding(); |
| 408 } | 408 } |
| 409 | 409 |
| 410 return _cachedValue; | 410 return _cachedValue; |
| 411 } | 411 } |
| 412 } | 412 } |
| OLD | NEW |