OLD | NEW |
(Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #ifndef VM_BECOME_H_ |
| 6 #define VM_BECOME_H_ |
| 7 |
| 8 #include "vm/allocation.h" |
| 9 |
| 10 namespace dart { |
| 11 |
| 12 class Array; |
| 13 |
| 14 // TODO(johnmccutchan): Refactor this class so that it is not all static and |
| 15 // provides utility methods for building the mapping of before and after. |
| 16 class Become : public AllStatic { |
| 17 public: |
| 18 // Smalltalk's one-way bulk become (Array>>#elementsForwardIdentityTo:). |
| 19 // Redirects all pointers to elements of 'before' to the corresponding element |
| 20 // in 'after'. Every element in 'before' is guaranteed to be not reachable. |
| 21 // Useful for atomically applying behavior and schema changes. |
| 22 static void ElementsForwardIdentity(const Array& before, const Array& after); |
| 23 }; |
| 24 |
| 25 } // namespace dart |
| 26 |
| 27 #endif // VM_BECOME_H_ |
OLD | NEW |