| 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 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 } | 667 } |
| 668 if (values == NULL) { | 668 if (values == NULL) { |
| 669 RETURN_NULL_ERROR(values); | 669 RETURN_NULL_ERROR(values); |
| 670 } | 670 } |
| 671 if (num_values <= 0) { | 671 if (num_values <= 0) { |
| 672 return Api::NewError( | 672 return Api::NewError( |
| 673 "%s expects argument 'num_values' to be greater than 0.", | 673 "%s expects argument 'num_values' to be greater than 0.", |
| 674 CURRENT_FUNC); | 674 CURRENT_FUNC); |
| 675 } | 675 } |
| 676 | 676 |
| 677 WeakReference* reference = new WeakReference(keys, num_keys, | 677 WeakReferenceSet* reference_set = new WeakReferenceSet(keys, num_keys, |
| 678 values, num_values); | 678 values, num_values); |
| 679 state->DelayWeakReference(reference); | 679 state->DelayWeakReferenceSet(reference_set); |
| 680 return Api::Success(isolate); | 680 return Api::Success(isolate); |
| 681 } | 681 } |
| 682 | 682 |
| 683 | 683 |
| 684 // --- Garbage Collection Callbacks -- | 684 // --- Garbage Collection Callbacks -- |
| 685 | 685 |
| 686 | 686 |
| 687 DART_EXPORT Dart_Handle Dart_AddGcPrologueCallback( | 687 DART_EXPORT Dart_Handle Dart_AddGcPrologueCallback( |
| 688 Dart_GcPrologueCallback callback) { | 688 Dart_GcPrologueCallback callback) { |
| 689 Isolate* isolate = Isolate::Current(); | 689 Isolate* isolate = Isolate::Current(); |
| (...skipping 3486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4176 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { | 4176 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { |
| 4177 Dart::set_perf_events_writer(function); | 4177 Dart::set_perf_events_writer(function); |
| 4178 } | 4178 } |
| 4179 | 4179 |
| 4180 | 4180 |
| 4181 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { | 4181 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { |
| 4182 Dart::set_flow_graph_writer(function); | 4182 Dart::set_flow_graph_writer(function); |
| 4183 } | 4183 } |
| 4184 | 4184 |
| 4185 } // namespace dart | 4185 } // namespace dart |
| OLD | NEW |