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

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

Issue 2570273004: Make try/catch/finally work with Kernel code and some refactoring. (Closed)
Patch Set: . Created 4 years 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 'package:js_runtime/shared/embedded_names.dart'; 5 import 'package:js_runtime/shared/embedded_names.dart';
6 import 'package:kernel/ast.dart' as ir; 6 import 'package:kernel/ast.dart' as ir;
7 7
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 ir.Procedure get mapLiteralConstructor => 348 ir.Procedure get mapLiteralConstructor =>
349 kernel.functions[_backend.helpers.mapLiteralConstructor]; 349 kernel.functions[_backend.helpers.mapLiteralConstructor];
350 350
351 ir.Procedure get mapLiteralConstructorEmpty => 351 ir.Procedure get mapLiteralConstructorEmpty =>
352 kernel.functions[_backend.helpers.mapLiteralConstructorEmpty]; 352 kernel.functions[_backend.helpers.mapLiteralConstructorEmpty];
353 353
354 ir.Procedure get mapLiteralUntypedEmptyMaker => 354 ir.Procedure get mapLiteralUntypedEmptyMaker =>
355 kernel.functions[_backend.helpers.mapLiteralUntypedEmptyMaker]; 355 kernel.functions[_backend.helpers.mapLiteralUntypedEmptyMaker];
356 356
357 ir.Procedure get exceptionUnwrapper =>
358 kernel.functions[_backend.helpers.exceptionUnwrapper];
359
360 TypeMask get exceptionUnwrapperType =>
361 TypeMaskFactory.inferredReturnTypeForElement(
362 _backend.helpers.exceptionUnwrapper, _globalInferenceResults);
363
364 ir.Procedure get traceFromException =>
365 kernel.functions[_backend.helpers.traceFromException];
366
367 TypeMask get traceFromExceptionType =>
368 TypeMaskFactory.inferredReturnTypeForElement(
369 _backend.helpers.traceFromException, _globalInferenceResults);
370
357 ir.Procedure get mapLiteralUntypedMaker => 371 ir.Procedure get mapLiteralUntypedMaker =>
358 kernel.functions[_backend.helpers.mapLiteralUntypedMaker]; 372 kernel.functions[_backend.helpers.mapLiteralUntypedMaker];
359 373
360 MemberElement get jsIndexableLength => _backend.helpers.jsIndexableLength; 374 MemberElement get jsIndexableLength => _backend.helpers.jsIndexableLength;
361 375
362 ir.Procedure get checkConcurrentModificationError => 376 ir.Procedure get checkConcurrentModificationError =>
363 kernel.functions[_backend.helpers.checkConcurrentModificationError]; 377 kernel.functions[_backend.helpers.checkConcurrentModificationError];
364 378
365 TypeMask get checkConcurrentModificationErrorReturnType => 379 TypeMask get checkConcurrentModificationErrorReturnType =>
366 TypeMaskFactory.inferredReturnTypeForElement( 380 TypeMaskFactory.inferredReturnTypeForElement(
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 astAdapter.reporter.internalError( 868 astAdapter.reporter.internalError(
855 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element."); 869 CURRENT_ELEMENT_SPANNABLE, "Unexpected constant target: $element.");
856 return null; 870 return null;
857 } 871 }
858 872
859 @override 873 @override
860 ConstantExpression visitStringLiteral(ir.StringLiteral node) { 874 ConstantExpression visitStringLiteral(ir.StringLiteral node) {
861 return new StringConstantExpression(node.value); 875 return new StringConstantExpression(node.value);
862 } 876 }
863 } 877 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698