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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 TypeArguments::Handle(Z, type_arguments.Canonicalize())); | 136 TypeArguments::Handle(Z, type_arguments.Canonicalize())); |
137 } | 137 } |
138 arg_values.SetAt(0, instance); | 138 arg_values.SetAt(0, instance); |
139 } else { | 139 } else { |
140 // Prepend type_arguments to list of arguments to factory. | 140 // Prepend type_arguments to list of arguments to factory. |
141 ASSERT(type_arguments.IsZoneHandle()); | 141 ASSERT(type_arguments.IsZoneHandle()); |
142 arg_values.SetAt(0, type_arguments); | 142 arg_values.SetAt(0, type_arguments); |
143 } | 143 } |
144 arg_values.SetAt((0 + kNumExtraArgs), argument); | 144 arg_values.SetAt((0 + kNumExtraArgs), argument); |
145 const Array& args_descriptor = Array::Handle( | 145 const Array& args_descriptor = Array::Handle( |
146 Z, ArgumentsDescriptor::New(num_arguments, Object::empty_array())); | 146 Z, ArgumentsDescriptor::New(0, num_arguments, Object::empty_array())); |
147 const Object& result = Object::Handle( | 147 const Object& result = Object::Handle( |
148 Z, DartEntry::InvokeFunction(constructor, arg_values, args_descriptor)); | 148 Z, DartEntry::InvokeFunction(constructor, arg_values, args_descriptor)); |
149 ASSERT(!result.IsError()); | 149 ASSERT(!result.IsError()); |
150 if (constructor.IsFactory()) { | 150 if (constructor.IsFactory()) { |
151 // The factory method returns the allocated object. | 151 // The factory method returns the allocated object. |
152 instance ^= result.raw(); | 152 instance ^= result.raw(); |
153 } | 153 } |
154 return H.Canonicalize(instance); | 154 return H.Canonicalize(instance); |
155 } | 155 } |
156 | 156 |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 | 523 |
524 Fragment StreamingFlowGraphBuilder::BuildNullLiteral() { | 524 Fragment StreamingFlowGraphBuilder::BuildNullLiteral() { |
525 return Constant(Instance::ZoneHandle(Z, Instance::null())); | 525 return Constant(Instance::ZoneHandle(Z, Instance::null())); |
526 } | 526 } |
527 | 527 |
528 | 528 |
529 } // namespace kernel | 529 } // namespace kernel |
530 } // namespace dart | 530 } // namespace dart |
531 | 531 |
532 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 532 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |