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

Side by Side Diff: dart/frog/leg/ssa/builder.dart

Issue 9549002: For reasons beyond logic, null matches any exception type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
« no previous file with comments | « no previous file | dart/frog/leg/ssa/codegen.dart » ('j') | dart/frog/leg/ssa/codegen.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after
2291 VariableDefinitions declaration = catchBlock.formals.nodes.head; 2291 VariableDefinitions declaration = catchBlock.formals.nodes.head;
2292 HInstruction condition = null; 2292 HInstruction condition = null;
2293 if (declaration.type == null) { 2293 if (declaration.type == null) {
2294 condition = graph.addNewLiteralTrue(); 2294 condition = graph.addNewLiteralTrue();
2295 stack.add(condition); 2295 stack.add(condition);
2296 } else { 2296 } else {
2297 Element typeElement = elements[declaration.type]; 2297 Element typeElement = elements[declaration.type];
2298 if (typeElement == null) { 2298 if (typeElement == null) {
2299 compiler.cancel('Catch with unresolved type', node: catchBlock); 2299 compiler.cancel('Catch with unresolved type', node: catchBlock);
2300 } 2300 }
2301 condition = new HIs(typeElement, unwrappedException); 2301 condition = new HIs(typeElement, unwrappedException, nullOk: true);
2302 push(condition); 2302 push(condition);
2303 } 2303 }
2304 } 2304 }
2305 2305
2306 void visitThen() { 2306 void visitThen() {
2307 CatchBlock catchBlock = link.head; 2307 CatchBlock catchBlock = link.head;
2308 link = link.tail; 2308 link = link.tail;
2309 VariableDefinitions declaration = catchBlock.formals.nodes.head; 2309 VariableDefinitions declaration = catchBlock.formals.nodes.head;
2310 localsHandler.updateLocal(elements[declaration.definitions.nodes.head], 2310 localsHandler.updateLocal(elements[declaration.definitions.nodes.head],
2311 unwrappedException); 2311 unwrappedException);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 // Normally, we would call [close] here. However, then we hit 2366 // Normally, we would call [close] here. However, then we hit
2367 // another unimplemented feature: aborting loop body. Simply 2367 // another unimplemented feature: aborting loop body. Simply
2368 // calling [add] does not work as it asserts that the instruction 2368 // calling [add] does not work as it asserts that the instruction
2369 // isn't a control flow instruction. So we inline parts of [add]. 2369 // isn't a control flow instruction. So we inline parts of [add].
2370 current.addAfter(current.last, new HThrow(message)); 2370 current.addAfter(current.last, new HThrow(message));
2371 if (isExpression) { 2371 if (isExpression) {
2372 stack.add(graph.addNewLiteralNull()); 2372 stack.add(graph.addNewLiteralNull());
2373 } 2373 }
2374 } 2374 }
2375 } 2375 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/ssa/codegen.dart » ('j') | dart/frog/leg/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698