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

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

Issue 2306203002: Rename HForeignNew -> HCreate (Closed)
Patch Set: comments and reformat Created 4 years, 3 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 | « pkg/compiler/lib/src/ssa/ssa_branch_builder.dart ('k') | no next file » | 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) 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 library ssa.tracer; 5 library ssa.tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 8
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../diagnostics/invariant.dart' show DEBUG_MODE; 10 import '../diagnostics/invariant.dart' show DEBUG_MODE;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 String visitConstant(HConstant constant) => "Constant: ${constant.constant}"; 195 String visitConstant(HConstant constant) => "Constant: ${constant.constant}";
196 196
197 String visitContinue(HContinue node) { 197 String visitContinue(HContinue node) {
198 HBasicBlock target = currentBlock.successors[0]; 198 HBasicBlock target = currentBlock.successors[0];
199 if (node.label != null) { 199 if (node.label != null) {
200 return "Continue ${node.label.labelName}: (B${target.id})"; 200 return "Continue ${node.label.labelName}: (B${target.id})";
201 } 201 }
202 return "Continue: (B${target.id})"; 202 return "Continue: (B${target.id})";
203 } 203 }
204 204
205 String visitCreate(HCreate node) {
206 return handleGenericInvoke("Create", "${node.element.name}", node.inputs);
207 }
208
205 String visitDivide(HDivide node) => handleInvokeBinary(node, 'Divide'); 209 String visitDivide(HDivide node) => handleInvokeBinary(node, 'Divide');
206 210
207 String visitExit(HExit node) => "Exit"; 211 String visitExit(HExit node) => "Exit";
208 212
209 String visitFieldGet(HFieldGet node) { 213 String visitFieldGet(HFieldGet node) {
210 if (node.isNullCheck) { 214 if (node.isNullCheck) {
211 return 'FieldGet: NullCheck ${temporaryId(node.receiver)}'; 215 return 'FieldGet: NullCheck ${temporaryId(node.receiver)}';
212 } 216 }
213 String fieldName = node.element.name; 217 String fieldName = node.element.name;
214 return 'FieldGet: ${temporaryId(node.receiver)}.$fieldName'; 218 return 'FieldGet: ${temporaryId(node.receiver)}.$fieldName';
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 String visitInvokeConstructorBody(HInvokeConstructorBody invoke) { 334 String visitInvokeConstructorBody(HInvokeConstructorBody invoke) {
331 String target = invoke.element.name; 335 String target = invoke.element.name;
332 return handleGenericInvoke("InvokeConstructorBody", target, invoke.inputs); 336 return handleGenericInvoke("InvokeConstructorBody", target, invoke.inputs);
333 } 337 }
334 338
335 String visitForeignCode(HForeignCode foreign) { 339 String visitForeignCode(HForeignCode foreign) {
336 return handleGenericInvoke( 340 return handleGenericInvoke(
337 "ForeignCode", "${foreign.codeTemplate.ast}", foreign.inputs); 341 "ForeignCode", "${foreign.codeTemplate.ast}", foreign.inputs);
338 } 342 }
339 343
340 String visitForeignNew(HForeignNew node) {
341 return handleGenericInvoke(
342 "ForeignNew", "${node.element.name}", node.inputs);
343 }
344
345 String visitLess(HLess node) => handleInvokeBinary(node, 'Less'); 344 String visitLess(HLess node) => handleInvokeBinary(node, 'Less');
346 String visitLessEqual(HLessEqual node) => 345 String visitLessEqual(HLessEqual node) =>
347 handleInvokeBinary(node, 'LessEqual'); 346 handleInvokeBinary(node, 'LessEqual');
348 347
349 String visitLiteralList(HLiteralList node) { 348 String visitLiteralList(HLiteralList node) {
350 StringBuffer elementsString = new StringBuffer(); 349 StringBuffer elementsString = new StringBuffer();
351 for (int i = 0; i < node.inputs.length; i++) { 350 for (int i = 0; i < node.inputs.length; i++) {
352 if (i != 0) elementsString.write(", "); 351 if (i != 0) elementsString.write(", ");
353 elementsString.write(temporaryId(node.inputs[i])); 352 elementsString.write(temporaryId(node.inputs[i]));
354 } 353 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 538 }
540 539
541 String visitAwait(HAwait node) { 540 String visitAwait(HAwait node) {
542 return "Await: ${temporaryId(node.inputs[0])}"; 541 return "Await: ${temporaryId(node.inputs[0])}";
543 } 542 }
544 543
545 String visitYield(HYield node) { 544 String visitYield(HYield node) {
546 return "Yield${node.hasStar ? "*" : ""}: ${temporaryId(node.inputs[0])}"; 545 return "Yield${node.hasStar ? "*" : ""}: ${temporaryId(node.inputs[0])}";
547 } 546 }
548 } 547 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa_branch_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698