| 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 #ifndef VM_BECOME_H_ | 5 #ifndef VM_BECOME_H_ |
| 6 #define VM_BECOME_H_ | 6 #define VM_BECOME_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/raw_object.h" | 9 #include "vm/raw_object.h" |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // TODO(johnmccutchan): Refactor this class so that it is not all static and | 74 // TODO(johnmccutchan): Refactor this class so that it is not all static and |
| 75 // provides utility methods for building the mapping of before and after. | 75 // provides utility methods for building the mapping of before and after. |
| 76 class Become : public AllStatic { | 76 class Become : public AllStatic { |
| 77 public: | 77 public: |
| 78 // Smalltalk's one-way bulk become (Array>>#elementsForwardIdentityTo:). | 78 // Smalltalk's one-way bulk become (Array>>#elementsForwardIdentityTo:). |
| 79 // Redirects all pointers to elements of 'before' to the corresponding element | 79 // Redirects all pointers to elements of 'before' to the corresponding element |
| 80 // in 'after'. Every element in 'before' is guaranteed to be not reachable. | 80 // in 'after'. Every element in 'before' is guaranteed to be not reachable. |
| 81 // Useful for atomically applying behavior and schema changes. | 81 // Useful for atomically applying behavior and schema changes. |
| 82 static void ElementsForwardIdentity(const Array& before, const Array& after); | 82 static void ElementsForwardIdentity(const Array& before, const Array& after); |
| 83 |
| 84 // Convert and instance object into a dummy object, |
| 85 // making the instance independent of its class. |
| 86 // (used for morphic instances during reload). |
| 87 static void MakeDummyObject(const Instance& instance); |
| 83 }; | 88 }; |
| 84 | 89 |
| 85 } // namespace dart | 90 } // namespace dart |
| 86 | 91 |
| 87 #endif // VM_BECOME_H_ | 92 #endif // VM_BECOME_H_ |
| OLD | NEW |