| 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/object_store.h" | 7 #include "vm/object_store.h" |
| 8 | 8 |
| 9 #if !defined(DART_PRECOMPILED_RUNTIME) | 9 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 10 | 10 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 TypeArguments::Handle(Z, type_arguments.Canonicalize())); | 137 TypeArguments::Handle(Z, type_arguments.Canonicalize())); |
| 138 } | 138 } |
| 139 arg_values.SetAt(0, instance); | 139 arg_values.SetAt(0, instance); |
| 140 } else { | 140 } else { |
| 141 // Prepend type_arguments to list of arguments to factory. | 141 // Prepend type_arguments to list of arguments to factory. |
| 142 ASSERT(type_arguments.IsZoneHandle()); | 142 ASSERT(type_arguments.IsZoneHandle()); |
| 143 arg_values.SetAt(0, type_arguments); | 143 arg_values.SetAt(0, type_arguments); |
| 144 } | 144 } |
| 145 arg_values.SetAt((0 + kNumExtraArgs), argument); | 145 arg_values.SetAt((0 + kNumExtraArgs), argument); |
| 146 const Array& args_descriptor = Array::Handle( | 146 const Array& args_descriptor = Array::Handle( |
| 147 Z, ArgumentsDescriptor::New(num_arguments, Object::empty_array())); | 147 Z, ArgumentsDescriptor::New(0, num_arguments, Object::empty_array())); |
| 148 const Object& result = Object::Handle( | 148 const Object& result = Object::Handle( |
| 149 Z, DartEntry::InvokeFunction(constructor, arg_values, args_descriptor)); | 149 Z, DartEntry::InvokeFunction(constructor, arg_values, args_descriptor)); |
| 150 ASSERT(!result.IsError()); | 150 ASSERT(!result.IsError()); |
| 151 if (constructor.IsFactory()) { | 151 if (constructor.IsFactory()) { |
| 152 // The factory method returns the allocated object. | 152 // The factory method returns the allocated object. |
| 153 instance ^= result.raw(); | 153 instance ^= result.raw(); |
| 154 } | 154 } |
| 155 return H.Canonicalize(instance); | 155 return H.Canonicalize(instance); |
| 156 } | 156 } |
| 157 | 157 |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 598 |
| 599 Fragment StreamingFlowGraphBuilder::BuildNullLiteral() { | 599 Fragment StreamingFlowGraphBuilder::BuildNullLiteral() { |
| 600 return Constant(Instance::ZoneHandle(Z, Instance::null())); | 600 return Constant(Instance::ZoneHandle(Z, Instance::null())); |
| 601 } | 601 } |
| 602 | 602 |
| 603 | 603 |
| 604 } // namespace kernel | 604 } // namespace kernel |
| 605 } // namespace dart | 605 } // namespace dart |
| 606 | 606 |
| 607 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 607 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| OLD | NEW |