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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart

Issue 1321013006: dart2js cps: Remove some uses of giveup. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index 712e5cd7a6bf875ecb956fb445f9fa01403bbe0f..8ad289f9d38028b1ea429755a024a6f78450792b 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -777,10 +777,6 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
ast.Send node,
MethodElement function,
_) {
- // TODO(karlklose): support foreign functions.
- if (compiler.backend.isForeign(function)) {
- return giveup(node, 'handleStaticFunctionGet: foreign: $function');
- }
return irBuilder.buildStaticFunctionGet(function);
}
@@ -1183,9 +1179,6 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
ast.NodeList arguments,
CallStructure callStructure,
_) {
- if (compiler.backend.isForeign(getter)) {
- return giveup(node, 'handleStaticGetterInvoke: foreign: $getter');
- }
ir.Primitive target = irBuilder.buildStaticGetterGet(
getter, sourceInformationBuilder.buildGet(node));
return irBuilder.buildCallInvocation(target,
@@ -2261,12 +2254,12 @@ abstract class IrBuilderVisitor extends ast.Visitor<ir.Primitive>
}
internalError(ast.Node node, String message) {
- giveup(node, message);
+ compiler.internalError(node, message);
}
@override
visitNode(ast.Node node) {
- internalError(node, "Unhandled node");
+ giveup(node, "Unhandled node");
}
dynamic giveup(ast.Node node, [String reason]) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698