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

Side by Side Diff: pkg/compiler/lib/src/inferrer/locals_handler.dart

Issue 2841543002: Spelling a (Closed)
Patch Set: Created 3 years, 8 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) 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 locals_handler; 5 library locals_handler;
6 6
7 import 'dart:collection' show IterableMixin; 7 import 'dart:collection' show IterableMixin;
8 8
9 import '../options.dart' show CompilerOptions; 9 import '../options.dart' show CompilerOptions;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 locals[local] = type; 329 locals[local] = type;
330 if (currentType != type) { 330 if (currentType != type) {
331 inferrer.recordLocalUpdate(local, type); 331 inferrer.recordLocalUpdate(local, type);
332 } 332 }
333 } 333 }
334 334
335 if (capturedAndBoxed.containsKey(local)) { 335 if (capturedAndBoxed.containsKey(local)) {
336 inferrer.recordTypeOfNonFinalField(node, capturedAndBoxed[local], type); 336 inferrer.recordTypeOfNonFinalField(node, capturedAndBoxed[local], type);
337 } else if (inTryBlock) { 337 } else if (inTryBlock) {
338 // We don'TypeInformation know if an assignment in a try block 338 // We don'TypeInformation know if an assignment in a try block
339 // will be executed, so all assigments in that block are 339 // will be executed, so all assignments in that block are
340 // potential types after we have left it. We update the parent 340 // potential types after we have left it. We update the parent
341 // of the try block so that, at exit of the try block, we get 341 // of the try block so that, at exit of the try block, we get
342 // the right phi for it. 342 // the right phi for it.
343 TypeInformation existing = tryBlock.locals.parent[local]; 343 TypeInformation existing = tryBlock.locals.parent[local];
344 if (existing != null) { 344 if (existing != null) {
345 TypeInformation phiType = 345 TypeInformation phiType =
346 types.allocatePhi(tryBlock.locals.block, local, existing); 346 types.allocatePhi(tryBlock.locals.block, local, existing);
347 TypeInformation inputType = types.addPhiInput(local, phiType, type); 347 TypeInformation inputType = types.addPhiInput(local, phiType, type);
348 tryBlock.locals.parent[local] = inputType; 348 tryBlock.locals.parent[local] = inputType;
349 } 349 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 if (newType != type) { 543 if (newType != type) {
544 locals[variable] = newType; 544 locals[variable] = newType;
545 } 545 }
546 }); 546 });
547 } 547 }
548 548
549 void updateField(Element element, TypeInformation type) { 549 void updateField(Element element, TypeInformation type) {
550 fieldScope.updateField(element, type); 550 fieldScope.updateField(element, type);
551 } 551 }
552 } 552 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_engine.dart ('k') | pkg/compiler/lib/src/js_emitter/constant_ordering.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698