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

Side by Side Diff: pkg/compiler/lib/src/ssa/graph_builder.dart

Issue 2901823002: Type .targetElement as MemberEntity (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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'; 5 import '../closure.dart';
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'; 12 import '../elements/elements.dart';
13 import '../elements/entities.dart' show Entity, Local; 13 import '../elements/entities.dart' show Entity, Local, MemberEntity;
14 import '../elements/resolution_types.dart'; 14 import '../elements/resolution_types.dart';
15 import '../elements/types.dart'; 15 import '../elements/types.dart';
16 import '../js_backend/backend.dart'; 16 import '../js_backend/backend.dart';
17 import '../js_backend/backend_usage.dart'; 17 import '../js_backend/backend_usage.dart';
18 import '../js_backend/constant_handler_javascript.dart'; 18 import '../js_backend/constant_handler_javascript.dart';
19 import '../js_backend/namer.dart'; 19 import '../js_backend/namer.dart';
20 import '../js_backend/native_data.dart'; 20 import '../js_backend/native_data.dart';
21 import '../js_backend/js_interop_analysis.dart'; 21 import '../js_backend/js_interop_analysis.dart';
22 import '../js_backend/interceptor_data.dart'; 22 import '../js_backend/interceptor_data.dart';
23 import '../js_backend/mirrors_data.dart'; 23 import '../js_backend/mirrors_data.dart';
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 HBasicBlock block = close(new HExitTry()); 275 HBasicBlock block = close(new HExitTry());
276 HBasicBlock newBlock = graph.addNewBlock(); 276 HBasicBlock newBlock = graph.addNewBlock();
277 block.addSuccessor(newBlock); 277 block.addSuccessor(newBlock);
278 open(newBlock); 278 open(newBlock);
279 } 279 }
280 280
281 HInstruction callSetRuntimeTypeInfo( 281 HInstruction callSetRuntimeTypeInfo(
282 HInstruction typeInfo, HInstruction newObject); 282 HInstruction typeInfo, HInstruction newObject);
283 283
284 /// The element for which this SSA builder is being used. 284 /// The element for which this SSA builder is being used.
285 Element get targetElement; 285 MemberEntity get targetElement;
286 TypeBuilder get typeBuilder; 286 TypeBuilder get typeBuilder;
287 287
288 /// Helper to implement JS_GET_FLAG. 288 /// Helper to implement JS_GET_FLAG.
289 /// 289 ///
290 /// The concrete SSA graph builder will extract a flag parameter from the 290 /// The concrete SSA graph builder will extract a flag parameter from the
291 /// JS_GET_FLAG call and then push a boolean result onto the stack. This 291 /// JS_GET_FLAG call and then push a boolean result onto the stack. This
292 /// function provides the boolean value corresponding to the given [flagName]. 292 /// function provides the boolean value corresponding to the given [flagName].
293 /// If [flagName] is not recognized, this function returns `null` and the 293 /// If [flagName] is not recognized, this function returns `null` and the
294 /// concrete SSA builder reports an error. 294 /// concrete SSA builder reports an error.
295 bool getFlagValue(String flagName) { 295 bool getFlagValue(String flagName) {
296 switch (flagName) { 296 switch (flagName) {
297 case 'MUST_RETAIN_METADATA': 297 case 'MUST_RETAIN_METADATA':
298 return mirrorsData.mustRetainMetadata; 298 return mirrorsData.mustRetainMetadata;
299 case 'USE_CONTENT_SECURITY_POLICY': 299 case 'USE_CONTENT_SECURITY_POLICY':
300 return options.useContentSecurityPolicy; 300 return options.useContentSecurityPolicy;
301 case 'IS_FULL_EMITTER': 301 case 'IS_FULL_EMITTER':
302 return !USE_LAZY_EMITTER && !options.useStartupEmitter; 302 return !USE_LAZY_EMITTER && !options.useStartupEmitter;
303 default: 303 default:
304 return null; 304 return null;
305 } 305 }
306 } 306 }
307 } 307 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698