OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 'dart:collection'; | 5 import 'dart:collection'; |
6 | 6 |
7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
8 | 8 |
9 import '../closure.dart'; | 9 import '../closure.dart'; |
10 import '../common.dart'; | 10 import '../common.dart'; |
(...skipping 4881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4892 // TODO(5346): Try to avoid the need for calling [declaration] before | 4892 // TODO(5346): Try to avoid the need for calling [declaration] before |
4893 var instruction; | 4893 var instruction; |
4894 if (backend.isJsInterop(element)) { | 4894 if (backend.isJsInterop(element)) { |
4895 instruction = | 4895 instruction = |
4896 invokeJsInteropFunction(element, arguments, sourceInformation); | 4896 invokeJsInteropFunction(element, arguments, sourceInformation); |
4897 } else { | 4897 } else { |
4898 // creating an [HInvokeStatic]. | 4898 // creating an [HInvokeStatic]. |
4899 instruction = new HInvokeStatic(element.declaration, arguments, typeMask, | 4899 instruction = new HInvokeStatic(element.declaration, arguments, typeMask, |
4900 targetCanThrow: targetCanThrow) | 4900 targetCanThrow: targetCanThrow) |
4901 ..sourceInformation = sourceInformation; | 4901 ..sourceInformation = sourceInformation; |
4902 if (!currentInlinedInstantiations.isEmpty) { | 4902 if (currentInlinedInstantiations.isNotEmpty) { |
4903 instruction.instantiatedTypes = | 4903 instruction.instantiatedTypes = |
4904 new List<DartType>.from(currentInlinedInstantiations); | 4904 new List<DartType>.from(currentInlinedInstantiations); |
4905 } | 4905 } |
4906 instruction.sideEffects = compiler.world.getSideEffectsOfElement(element); | 4906 instruction.sideEffects = compiler.world.getSideEffectsOfElement(element); |
4907 } | 4907 } |
4908 if (location == null) { | 4908 if (location == null) { |
4909 push(instruction); | 4909 push(instruction); |
4910 } else { | 4910 } else { |
4911 pushWithPosition(instruction, location); | 4911 pushWithPosition(instruction, location); |
4912 } | 4912 } |
(...skipping 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7822 const _LoopTypeVisitor(); | 7822 const _LoopTypeVisitor(); |
7823 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP; | 7823 int visitNode(ast.Node node) => HLoopBlockInformation.NOT_A_LOOP; |
7824 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP; | 7824 int visitWhile(ast.While node) => HLoopBlockInformation.WHILE_LOOP; |
7825 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP; | 7825 int visitFor(ast.For node) => HLoopBlockInformation.FOR_LOOP; |
7826 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; | 7826 int visitDoWhile(ast.DoWhile node) => HLoopBlockInformation.DO_WHILE_LOOP; |
7827 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; | 7827 int visitAsyncForIn(ast.AsyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; |
7828 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; | 7828 int visitSyncForIn(ast.SyncForIn node) => HLoopBlockInformation.FOR_IN_LOOP; |
7829 int visitSwitchStatement(ast.SwitchStatement node) => | 7829 int visitSwitchStatement(ast.SwitchStatement node) => |
7830 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; | 7830 HLoopBlockInformation.SWITCH_CONTINUE_LOOP; |
7831 } | 7831 } |
OLD | NEW |