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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_fragment.dart

Issue 1564713002: Copier should copy InvokeMethod calling convention (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 cps_ir.cps_fragment; 5 library cps_ir.cps_fragment;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../universe/selector.dart' show Selector; 9 import '../universe/selector.dart' show Selector;
10 import '../types/types.dart' show TypeMask; 10 import '../types/types.dart' show TypeMask;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return letPrim(apply); 128 return letPrim(apply);
129 } 129 }
130 130
131 /// Inserts an invocation and returns a primitive holding the returned value. 131 /// Inserts an invocation and returns a primitive holding the returned value.
132 Primitive invokeMethod(Primitive receiver, 132 Primitive invokeMethod(Primitive receiver,
133 Selector selector, 133 Selector selector,
134 TypeMask mask, 134 TypeMask mask,
135 List<Primitive> arguments, 135 List<Primitive> arguments,
136 [CallingConvention callingConvention = CallingConvention.Normal]) { 136 [CallingConvention callingConvention = CallingConvention.Normal]) {
137 InvokeMethod invoke = 137 InvokeMethod invoke =
138 new InvokeMethod(receiver, selector, mask, arguments, sourceInformation) 138 new InvokeMethod(receiver, selector, mask, arguments,
139 ..callingConvention = callingConvention; 139 sourceInformation: sourceInformation,
140 callingConvention: callingConvention);
140 return letPrim(invoke); 141 return letPrim(invoke);
141 } 142 }
142 143
143 /// Inserts an invocation and returns a primitive holding the returned value. 144 /// Inserts an invocation and returns a primitive holding the returned value.
144 Primitive invokeStatic(FunctionElement target, List<Primitive> arguments) { 145 Primitive invokeStatic(FunctionElement target, List<Primitive> arguments) {
145 return letPrim(new InvokeStatic(target, new Selector.fromElement(target), 146 return letPrim(new InvokeStatic(target, new Selector.fromElement(target),
146 arguments, sourceInformation)); 147 arguments, sourceInformation));
147 } 148 }
148 149
149 /// Inserts an invocation to a static function that throws an error. 150 /// Inserts an invocation to a static function that throws an error.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 while (prim.firstRef != null) { 357 while (prim.firstRef != null) {
357 Refinement refine = prim.firstRef.parent; 358 Refinement refine = prim.firstRef.parent;
358 destroyRefinementsOfDeadPrimitive(refine); 359 destroyRefinementsOfDeadPrimitive(refine);
359 LetPrim letPrim = refine.parent; 360 LetPrim letPrim = refine.parent;
360 InteriorNode parent = letPrim.parent; 361 InteriorNode parent = letPrim.parent;
361 parent.body = letPrim.body; 362 parent.body = letPrim.body;
362 letPrim.body.parent = parent; 363 letPrim.body.parent = parent;
363 prim.firstRef.unlink(); 364 prim.firstRef.unlink();
364 } 365 }
365 } 366 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698