| OLD | NEW |
| 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 #include "vm/kernel_binary_flowgraph.h" | 5 #include "vm/kernel_binary_flowgraph.h" |
| 6 | 6 |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/longjump.h" | 8 #include "vm/longjump.h" |
| 9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
| 10 | 10 |
| (...skipping 3477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3488 Z, dart::String::New("main")))); | 3488 Z, dart::String::New("main")))); |
| 3489 if (main.IsField()) { | 3489 if (main.IsField()) { |
| 3490 UNIMPLEMENTED(); | 3490 UNIMPLEMENTED(); |
| 3491 } else if (main.IsFunction()) { | 3491 } else if (main.IsFunction()) { |
| 3492 const Function& function = Function::Cast(main); | 3492 const Function& function = Function::Cast(main); |
| 3493 if (function.kind() == RawFunction::kRegularFunction) { | 3493 if (function.kind() == RawFunction::kRegularFunction) { |
| 3494 const Function& closure_function = | 3494 const Function& closure_function = |
| 3495 Function::Handle(Z, function.ImplicitClosureFunction()); | 3495 Function::Handle(Z, function.ImplicitClosureFunction()); |
| 3496 const Instance& closure = | 3496 const Instance& closure = |
| 3497 Instance::ZoneHandle(Z, closure_function.ImplicitStaticClosure()); | 3497 Instance::ZoneHandle(Z, closure_function.ImplicitStaticClosure()); |
| 3498 return Constant(closure) + Return(TokenPosition::kNoSource); | 3498 Fragment instructions = Constant(closure); |
| 3499 instructions += Return(TokenPosition::kNoSource); |
| 3500 return instructions; |
| 3499 } else { | 3501 } else { |
| 3500 UNIMPLEMENTED(); | 3502 UNIMPLEMENTED(); |
| 3501 } | 3503 } |
| 3502 } else { | 3504 } else { |
| 3503 UNIMPLEMENTED(); | 3505 UNIMPLEMENTED(); |
| 3504 } | 3506 } |
| 3505 return Fragment(); | 3507 return Fragment(); |
| 3506 } | 3508 } |
| 3507 | 3509 |
| 3508 FlowGraph* StreamingFlowGraphBuilder::BuildGraph(intptr_t kernel_offset) { | 3510 FlowGraph* StreamingFlowGraphBuilder::BuildGraph(intptr_t kernel_offset) { |
| (...skipping 3639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7148 metadata_values.SetAt(i, value); | 7150 metadata_values.SetAt(i, value); |
| 7149 } | 7151 } |
| 7150 | 7152 |
| 7151 return metadata_values.raw(); | 7153 return metadata_values.raw(); |
| 7152 } | 7154 } |
| 7153 | 7155 |
| 7154 } // namespace kernel | 7156 } // namespace kernel |
| 7155 } // namespace dart | 7157 } // namespace dart |
| 7156 | 7158 |
| 7157 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 7159 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |