| 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 part of dart2js.js_emitter.full_emitter; | 5 part of dart2js.js_emitter.full_emitter; |
| 6 | 6 |
| 7 class NsmEmitter extends CodeEmitterHelper { | 7 class NsmEmitter extends CodeEmitterHelper { |
| 8 final ClosedWorld closedWorld; | 8 final ClosedWorld closedWorld; |
| 9 final List<Selector> trivialNsmHandlers = <Selector>[]; | 9 final List<Selector> trivialNsmHandlers = <Selector>[]; |
| 10 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 js.stringPart(",")), | 155 js.stringPart(",")), |
| 156 addQuotes: true); | 156 addQuotes: true); |
| 157 | 157 |
| 158 if (!minify) { | 158 if (!minify) { |
| 159 sortedLongs = | 159 sortedLongs = |
| 160 sorted.map((selector) => selector.invocationMirrorMemberName); | 160 sorted.map((selector) => selector.invocationMirrorMemberName); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 // Startup code that loops over the method names and puts handlers on the | 163 // Startup code that loops over the method names and puts handlers on the |
| 164 // Object class to catch noSuchMethod invocations. | 164 // Object class to catch noSuchMethod invocations. |
| 165 ClassElement objectClass = compiler.coreClasses.objectClass; | 165 ClassElement objectClass = compiler.commonElements.objectClass; |
| 166 jsAst.Expression createInvocationMirror = backend.emitter | 166 jsAst.Expression createInvocationMirror = backend.emitter |
| 167 .staticFunctionAccess(backend.helpers.createInvocationMirror); | 167 .staticFunctionAccess(backend.helpers.createInvocationMirror); |
| 168 if (useDiffEncoding) { | 168 if (useDiffEncoding) { |
| 169 statements.add(js.statement( | 169 statements.add(js.statement( |
| 170 '''{ | 170 '''{ |
| 171 var objectClassObject = processedClasses.collected[#objectClass], | 171 var objectClassObject = processedClasses.collected[#objectClass], |
| 172 nameSequences = #diffEncoding.split("."), | 172 nameSequences = #diffEncoding.split("."), |
| 173 shortNames = []; | 173 shortNames = []; |
| 174 if (objectClassObject instanceof Array) | 174 if (objectClassObject instanceof Array) |
| 175 objectClassObject = objectClassObject[1]; | 175 objectClassObject = objectClassObject[1]; |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 391 } |
| 392 | 392 |
| 393 String get value { | 393 String get value { |
| 394 if (_cachedValue == null) { | 394 if (_cachedValue == null) { |
| 395 _cachedValue = _computeDiffEncoding(); | 395 _cachedValue = _computeDiffEncoding(); |
| 396 } | 396 } |
| 397 | 397 |
| 398 return _cachedValue; | 398 return _cachedValue; |
| 399 } | 399 } |
| 400 } | 400 } |
| OLD | NEW |