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

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

Issue 9193016: Add the arity to calls, and support noSuchMethodException. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 conditionBlock.addSuccessor(loopEntryBlock); // The back-edge. 521 conditionBlock.addSuccessor(loopEntryBlock); // The back-edge.
522 loopEntryBlock.postProcessLoopHeader(); 522 loopEntryBlock.postProcessLoopHeader();
523 523
524 endLoop(loopEntryBlock, conditionBlock, true, entryDefinitions); 524 endLoop(loopEntryBlock, conditionBlock, true, entryDefinitions);
525 } 525 }
526 526
527 visitFunctionExpression(FunctionExpression node) { 527 visitFunctionExpression(FunctionExpression node) {
528 FunctionElement element = elements[node]; 528 FunctionElement element = elements[node];
529 ClassElement globalizedClosureElement = 529 ClassElement globalizedClosureElement =
530 new ClassElement(const SourceString("Closure"), null); 530 new ClassElement(const SourceString("Closure"), null);
531 String callName = compiler.namer.closureInvocationName();
532 Modifiers modifiers = new Modifiers.empty(); 531 Modifiers modifiers = new Modifiers.empty();
533 FunctionElement callElement = 532 FunctionElement callElement =
534 new FunctionElement(new SourceString(callName), 533 new FunctionElement(const SourceString('\$call'),
floitsch 2012/01/24 11:46:03 I would prefer keeping the '\$call' local to some
ngeoffray 2012/01/24 12:09:39 Done.
535 ElementKind.FUNCTION, 534 ElementKind.FUNCTION,
536 modifiers, 535 modifiers,
537 globalizedClosureElement, 536 globalizedClosureElement,
538 node: element.parseNode(compiler, compiler)); 537 node: element.parseNode(compiler, compiler));
539 callElement.parameters = element.parameters; 538 callElement.parameters = element.parameters;
540 globalizedClosureElement.backendMembers = 539 globalizedClosureElement.backendMembers =
541 const EmptyLink<Element>().prepend(callElement); 540 const EmptyLink<Element>().prepend(callElement);
542 globalizedClosureElement.isResolved = true; 541 globalizedClosureElement.isResolved = true;
543 compiler.enqueue(new WorkItem.toCodegen(callElement, elements)); 542 compiler.enqueue(new WorkItem.toCodegen(callElement, elements));
544 compiler.registerInstantiatedClass(globalizedClosureElement); 543 compiler.registerInstantiatedClass(globalizedClosureElement);
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 } 1409 }
1411 1410
1412 visitCatchBlock(CatchBlock node) { 1411 visitCatchBlock(CatchBlock node) {
1413 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node); 1412 compiler.unimplemented('SsaBuilder.visitCatchBlock', node: node);
1414 } 1413 }
1415 1414
1416 visitTypedef(Typedef node) { 1415 visitTypedef(Typedef node) {
1417 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 1416 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
1418 } 1417 }
1419 } 1418 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698