| 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "vm/kernel_to_il.h" | 9 #include "vm/kernel_to_il.h" |
| 10 | 10 |
| (...skipping 4246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4257 } | 4257 } |
| 4258 } else { | 4258 } else { |
| 4259 Procedure* procedure = Procedure::Cast(target); | 4259 Procedure* procedure = Procedure::Cast(target); |
| 4260 const Function& target = Function::ZoneHandle( | 4260 const Function& target = Function::ZoneHandle( |
| 4261 Z, H.LookupStaticMethodByKernelProcedure(procedure)); | 4261 Z, H.LookupStaticMethodByKernelProcedure(procedure)); |
| 4262 | 4262 |
| 4263 if (procedure->kind() == Procedure::kGetter) { | 4263 if (procedure->kind() == Procedure::kGetter) { |
| 4264 fragment_ = StaticCall(node->position(), target, 0); | 4264 fragment_ = StaticCall(node->position(), target, 0); |
| 4265 } else if (procedure->kind() == Procedure::kMethod) { | 4265 } else if (procedure->kind() == Procedure::kMethod) { |
| 4266 ASSERT(procedure->IsStatic()); | 4266 ASSERT(procedure->IsStatic()); |
| 4267 Function& closure_function = | 4267 fragment_ = Constant(constant_evaluator_.EvaluateExpression(node)); |
| 4268 Function::ZoneHandle(Z, target.ImplicitClosureFunction()); | |
| 4269 closure_function.set_kernel_function(target.kernel_function()); | |
| 4270 const Instance& closure = | |
| 4271 Instance::ZoneHandle(Z, closure_function.ImplicitStaticClosure()); | |
| 4272 fragment_ = Constant(closure); | |
| 4273 } else { | 4268 } else { |
| 4274 UNIMPLEMENTED(); | 4269 UNIMPLEMENTED(); |
| 4275 } | 4270 } |
| 4276 } | 4271 } |
| 4277 } | 4272 } |
| 4278 | 4273 |
| 4279 | 4274 |
| 4280 void FlowGraphBuilder::VisitStaticSet(StaticSet* node) { | 4275 void FlowGraphBuilder::VisitStaticSet(StaticSet* node) { |
| 4281 Member* target = node->target(); | 4276 Member* target = node->target(); |
| 4282 if (target->IsField()) { | 4277 if (target->IsField()) { |
| (...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5851 instructions += LoadLocal(parsed_function_->current_context_var()); | 5846 instructions += LoadLocal(parsed_function_->current_context_var()); |
| 5852 instructions += StoreInstanceField(Closure::context_offset()); | 5847 instructions += StoreInstanceField(Closure::context_offset()); |
| 5853 | 5848 |
| 5854 return instructions; | 5849 return instructions; |
| 5855 } | 5850 } |
| 5856 | 5851 |
| 5857 | 5852 |
| 5858 } // namespace kernel | 5853 } // namespace kernel |
| 5859 } // namespace dart | 5854 } // namespace dart |
| 5860 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 5855 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |