Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2394 Send selector = send.selector; | 2394 Send selector = send.selector; |
| 2395 if (selector.receiver is TypeAnnotation) { | 2395 if (selector.receiver is TypeAnnotation) { |
| 2396 return selector.receiver; | 2396 return selector.receiver; |
| 2397 } | 2397 } |
| 2398 } else { | 2398 } else { |
| 2399 compiler.internalError("malformed send in new expression"); | 2399 compiler.internalError("malformed send in new expression"); |
| 2400 } | 2400 } |
| 2401 } | 2401 } |
| 2402 | 2402 |
| 2403 visitNewExpression(NewExpression node) { | 2403 visitNewExpression(NewExpression node) { |
| 2404 if (node.isConst()) { | 2404 Element element = elements[node.send]; |
| 2405 if (Element.isInvalid(element)) { | |
| 2406 // TODO(karlklose): generate runtime error or noSuchMethodCall, depending | |
| 2407 // on whether element is null or it is an erroneous element with a | |
| 2408 // particular error message. | |
| 2409 compiler.cancel('Unimplemented non-matching static call', node: node); | |
|
ahe
2012/08/20 15:06:47
No really a non-matching static call.
karlklose
2012/08/21 11:44:10
Done.
| |
| 2410 } else if (node.isConst()) { | |
| 2405 // TODO(karlklose): add type representation | 2411 // TODO(karlklose): add type representation |
| 2406 ConstantHandler handler = compiler.constantHandler; | 2412 ConstantHandler handler = compiler.constantHandler; |
| 2407 Constant constant = handler.compileNodeWithDefinitions(node, elements); | 2413 Constant constant = handler.compileNodeWithDefinitions(node, elements); |
| 2408 stack.add(graph.addConstant(constant)); | 2414 stack.add(graph.addConstant(constant)); |
| 2409 } else { | 2415 } else { |
| 2410 visitNewSend(node.send); | 2416 visitNewSend(node.send); |
| 2411 } | 2417 } |
| 2412 } | 2418 } |
| 2413 | 2419 |
| 2414 visitSendSet(SendSet node) { | 2420 visitSendSet(SendSet node) { |
| (...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3625 new HSubGraphBlockInformation(elseBranch.graph)); | 3631 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3626 | 3632 |
| 3627 HBasicBlock conditionStartBlock = conditionBranch.block; | 3633 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3628 conditionStartBlock.setBlockFlow(info, joinBlock); | 3634 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3629 SubGraph conditionGraph = conditionBranch.graph; | 3635 SubGraph conditionGraph = conditionBranch.graph; |
| 3630 HIf branch = conditionGraph.end.last; | 3636 HIf branch = conditionGraph.end.last; |
| 3631 assert(branch is HIf); | 3637 assert(branch is HIf); |
| 3632 branch.blockInformation = conditionStartBlock.blockFlow; | 3638 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3633 } | 3639 } |
| 3634 } | 3640 } |
| OLD | NEW |