| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import '../closure.dart' show ClosureDataLookup; | 5 import '../closure.dart' show ClosureDataLookup; |
| 6 import '../constants/constant_system.dart'; | 6 import '../constants/constant_system.dart'; |
| 7 import '../common/codegen.dart' show CodegenRegistry; | 7 import '../common/codegen.dart' show CodegenRegistry; |
| 8 import '../common_elements.dart'; | 8 import '../common_elements.dart'; |
| 9 import '../compiler.dart'; | 9 import '../compiler.dart'; |
| 10 import '../deferred_load.dart'; | 10 import '../deferred_load.dart'; |
| 11 import '../diagnostics/diagnostic_listener.dart'; | 11 import '../diagnostics/diagnostic_listener.dart'; |
| 12 import '../elements/elements.dart'; | |
| 13 import '../elements/entities.dart' show Entity, Local, MemberEntity; | 12 import '../elements/entities.dart' show Entity, Local, MemberEntity; |
| 14 import '../elements/jumps.dart'; | 13 import '../elements/jumps.dart'; |
| 15 import '../elements/types.dart'; | 14 import '../elements/types.dart'; |
| 16 import '../js_backend/backend.dart'; | 15 import '../js_backend/backend.dart'; |
| 17 import '../js_backend/backend_usage.dart'; | 16 import '../js_backend/backend_usage.dart'; |
| 18 import '../js_backend/constant_handler_javascript.dart'; | 17 import '../js_backend/constant_handler_javascript.dart'; |
| 19 import '../js_backend/namer.dart'; | 18 import '../js_backend/namer.dart'; |
| 20 import '../js_backend/native_data.dart'; | 19 import '../js_backend/native_data.dart'; |
| 21 import '../js_backend/js_interop_analysis.dart'; | 20 import '../js_backend/js_interop_analysis.dart'; |
| 22 import '../js_backend/interceptor_data.dart'; | 21 import '../js_backend/interceptor_data.dart'; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 253 } |
| 255 | 254 |
| 256 HInstruction callSetRuntimeTypeInfoWithTypeArguments(InterfaceType type, | 255 HInstruction callSetRuntimeTypeInfoWithTypeArguments(InterfaceType type, |
| 257 List<HInstruction> rtiInputs, HInstruction newObject) { | 256 List<HInstruction> rtiInputs, HInstruction newObject) { |
| 258 if (!rtiNeed.classNeedsRti(type.element)) { | 257 if (!rtiNeed.classNeedsRti(type.element)) { |
| 259 return newObject; | 258 return newObject; |
| 260 } | 259 } |
| 261 | 260 |
| 262 HInstruction typeInfo = new HTypeInfoExpression( | 261 HInstruction typeInfo = new HTypeInfoExpression( |
| 263 TypeInfoExpressionKind.INSTANCE, | 262 TypeInfoExpressionKind.INSTANCE, |
| 264 (type.element as ClassElement).thisType, | 263 closedWorld.elementEnvironment.getThisType(type.element), |
| 265 rtiInputs, | 264 rtiInputs, |
| 266 closedWorld.commonMasks.dynamicType); | 265 closedWorld.commonMasks.dynamicType); |
| 267 add(typeInfo); | 266 add(typeInfo); |
| 268 return callSetRuntimeTypeInfo(typeInfo, newObject); | 267 return callSetRuntimeTypeInfo(typeInfo, newObject); |
| 269 } | 268 } |
| 270 | 269 |
| 271 /// Called when control flow is about to change, in which case we need to | 270 /// Called when control flow is about to change, in which case we need to |
| 272 /// specify special successors if we are already in a try/catch/finally block. | 271 /// specify special successors if we are already in a try/catch/finally block. |
| 273 void handleInTryStatement() { | 272 void handleInTryStatement() { |
| 274 if (!inTryStatement) return; | 273 if (!inTryStatement) return; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 298 return mirrorsData.mustRetainMetadata; | 297 return mirrorsData.mustRetainMetadata; |
| 299 case 'USE_CONTENT_SECURITY_POLICY': | 298 case 'USE_CONTENT_SECURITY_POLICY': |
| 300 return options.useContentSecurityPolicy; | 299 return options.useContentSecurityPolicy; |
| 301 case 'IS_FULL_EMITTER': | 300 case 'IS_FULL_EMITTER': |
| 302 return !USE_LAZY_EMITTER && !options.useStartupEmitter; | 301 return !USE_LAZY_EMITTER && !options.useStartupEmitter; |
| 303 default: | 302 default: |
| 304 return null; | 303 return null; |
| 305 } | 304 } |
| 306 } | 305 } |
| 307 } | 306 } |
| OLD | NEW |