OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 117 matching lines...) Loading... |
128 result->SetPrototypeTransitions(GetPrototypeTransitions()); | 128 result->SetPrototypeTransitions(GetPrototypeTransitions()); |
129 } | 129 } |
130 | 130 |
131 if (insertion_index != kNotFound) { | 131 if (insertion_index != kNotFound) { |
132 for (int i = 0; i < number_of_transitions; ++i) { | 132 for (int i = 0; i < number_of_transitions; ++i) { |
133 if (i != insertion_index) { | 133 if (i != insertion_index) { |
134 result->NoIncrementalWriteBarrierCopyFrom(this, i, i); | 134 result->NoIncrementalWriteBarrierCopyFrom(this, i, i); |
135 } | 135 } |
136 } | 136 } |
137 result->NoIncrementalWriteBarrierSet(insertion_index, name, target); | 137 result->NoIncrementalWriteBarrierSet(insertion_index, name, target); |
| 138 result->set_back_pointer_storage(back_pointer_storage()); |
138 return result; | 139 return result; |
139 } | 140 } |
140 | 141 |
141 insertion_index = 0; | 142 insertion_index = 0; |
142 for (; insertion_index < number_of_transitions; ++insertion_index) { | 143 for (; insertion_index < number_of_transitions; ++insertion_index) { |
143 if (InsertionPointFound(GetKey(insertion_index), name)) break; | 144 if (InsertionPointFound(GetKey(insertion_index), name)) break; |
144 result->NoIncrementalWriteBarrierCopyFrom( | 145 result->NoIncrementalWriteBarrierCopyFrom( |
145 this, insertion_index, insertion_index); | 146 this, insertion_index, insertion_index); |
146 } | 147 } |
147 | 148 |
148 result->NoIncrementalWriteBarrierSet(insertion_index, name, target); | 149 result->NoIncrementalWriteBarrierSet(insertion_index, name, target); |
149 | 150 |
150 for (; insertion_index < number_of_transitions; ++insertion_index) { | 151 for (; insertion_index < number_of_transitions; ++insertion_index) { |
151 result->NoIncrementalWriteBarrierCopyFrom( | 152 result->NoIncrementalWriteBarrierCopyFrom( |
152 this, insertion_index, insertion_index + 1); | 153 this, insertion_index, insertion_index + 1); |
153 } | 154 } |
154 | 155 |
155 result->set_back_pointer_storage(back_pointer_storage()); | 156 result->set_back_pointer_storage(back_pointer_storage()); |
156 return result; | 157 return result; |
157 } | 158 } |
158 | 159 |
159 | 160 |
160 } } // namespace v8::internal | 161 } } // namespace v8::internal |
OLD | NEW |