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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/tracer.dart

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
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 library tracer; 5 library tracer;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'ssa.dart'; 8 import 'ssa.dart';
9 import '../js_backend/js_backend.dart'; 9 import '../js_backend/js_backend.dart';
10 import '../dart2jslib.dart'; 10 import '../dart2jslib.dart';
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 341 }
342 342
343 String visitInvokeClosure(HInvokeClosure node) 343 String visitInvokeClosure(HInvokeClosure node)
344 => visitInvokeDynamic(node, "closure"); 344 => visitInvokeDynamic(node, "closure");
345 345
346 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) { 346 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) {
347 String receiver = temporaryId(invoke.receiver); 347 String receiver = temporaryId(invoke.receiver);
348 String name = invoke.selector.name.slowToString(); 348 String name = invoke.selector.name.slowToString();
349 String target = "($kind) $receiver.$name"; 349 String target = "($kind) $receiver.$name";
350 int offset = HInvoke.ARGUMENTS_OFFSET; 350 int offset = HInvoke.ARGUMENTS_OFFSET;
351 List arguments = 351 List arguments = invoke.inputs.sublist(offset);
352 invoke.inputs.getRange(offset, invoke.inputs.length - offset);
353 return visitGenericInvoke("Invoke", target, arguments); 352 return visitGenericInvoke("Invoke", target, arguments);
354 } 353 }
355 354
356 String visitInvokeDynamicMethod(HInvokeDynamicMethod node) 355 String visitInvokeDynamicMethod(HInvokeDynamicMethod node)
357 => visitInvokeDynamic(node, "method"); 356 => visitInvokeDynamic(node, "method");
358 String visitInvokeDynamicGetter(HInvokeDynamicGetter node) 357 String visitInvokeDynamicGetter(HInvokeDynamicGetter node)
359 => visitInvokeDynamic(node, "get"); 358 => visitInvokeDynamic(node, "get");
360 String visitInvokeDynamicSetter(HInvokeDynamicSetter node) 359 String visitInvokeDynamicSetter(HInvokeDynamicSetter node)
361 => visitInvokeDynamic(node, "set"); 360 => visitInvokeDynamic(node, "set");
362 361
363 String visitInvokeStatic(HInvokeStatic invoke) { 362 String visitInvokeStatic(HInvokeStatic invoke) {
364 String target = temporaryId(invoke.target); 363 String target = temporaryId(invoke.target);
365 int offset = HInvoke.ARGUMENTS_OFFSET; 364 int offset = HInvoke.ARGUMENTS_OFFSET;
366 List arguments = 365 List arguments = invoke.inputs.sublist(offset);
367 invoke.inputs.getRange(offset, invoke.inputs.length - offset);
368 return visitGenericInvoke("Invoke", target, arguments); 366 return visitGenericInvoke("Invoke", target, arguments);
369 } 367 }
370 368
371 String visitInvokeSuper(HInvokeSuper invoke) { 369 String visitInvokeSuper(HInvokeSuper invoke) {
372 String target = temporaryId(invoke.target); 370 String target = temporaryId(invoke.target);
373 int offset = HInvoke.ARGUMENTS_OFFSET + 1; 371 int offset = HInvoke.ARGUMENTS_OFFSET + 1;
374 List arguments = 372 List arguments = invoke.inputs.sublist(offset);
375 invoke.inputs.getRange(offset, invoke.inputs.length - offset);
376 return visitGenericInvoke("Invoke super", target, arguments); 373 return visitGenericInvoke("Invoke super", target, arguments);
377 } 374 }
378 375
379 String visitForeign(HForeign foreign) { 376 String visitForeign(HForeign foreign) {
380 return visitGenericInvoke("Foreign", "${foreign.code}", foreign.inputs); 377 return visitGenericInvoke("Foreign", "${foreign.code}", foreign.inputs);
381 } 378 }
382 379
383 String visitForeignNew(HForeignNew node) { 380 String visitForeignNew(HForeignNew node) {
384 return visitGenericInvoke("New", 381 return visitGenericInvoke("New",
385 "${node.element.name.slowToString()}", 382 "${node.element.name.slowToString()}",
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 547
551 String visitTypeConversion(HTypeConversion node) { 548 String visitTypeConversion(HTypeConversion node) {
552 return "TypeConversion: ${temporaryId(node.checkedInput)} to " 549 return "TypeConversion: ${temporaryId(node.checkedInput)} to "
553 "${node.instructionType}"; 550 "${node.instructionType}";
554 } 551 }
555 552
556 String visitRangeConversion(HRangeConversion node) { 553 String visitRangeConversion(HRangeConversion node) {
557 return "RangeConversion: ${node.checkedInput}"; 554 return "RangeConversion: ${node.checkedInput}";
558 } 555 }
559 } 556 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698