| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/factory.h" | 5 #include "src/factory.h" |
| 6 | 6 |
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 // In order to keep heap in consistent state there must be no allocations | 1949 // In order to keep heap in consistent state there must be no allocations |
| 1950 // before object re-initialization is finished and filler object is installed. | 1950 // before object re-initialization is finished and filler object is installed. |
| 1951 DisallowHeapAllocation no_allocation; | 1951 DisallowHeapAllocation no_allocation; |
| 1952 | 1952 |
| 1953 // Put in filler if the new object is smaller than the old. | 1953 // Put in filler if the new object is smaller than the old. |
| 1954 if (size_difference > 0) { | 1954 if (size_difference > 0) { |
| 1955 Address address = proxy->address(); | 1955 Address address = proxy->address(); |
| 1956 heap->CreateFillerObjectAt(address + map->instance_size(), size_difference); | 1956 heap->CreateFillerObjectAt(address + map->instance_size(), size_difference); |
| 1957 heap->AdjustLiveBytes(address, -size_difference, Heap::FROM_MUTATOR); | 1957 heap->AdjustLiveBytes(address, -size_difference, |
| 1958 Heap::CONCURRENT_TO_SWEEPER); |
| 1958 } | 1959 } |
| 1959 | 1960 |
| 1960 // Reset the map for the object. | 1961 // Reset the map for the object. |
| 1961 proxy->synchronized_set_map(*map); | 1962 proxy->synchronized_set_map(*map); |
| 1962 Handle<JSObject> jsobj = Handle<JSObject>::cast(proxy); | 1963 Handle<JSObject> jsobj = Handle<JSObject>::cast(proxy); |
| 1963 | 1964 |
| 1964 // Reinitialize the object from the constructor map. | 1965 // Reinitialize the object from the constructor map. |
| 1965 heap->InitializeJSObjectFromMap(*jsobj, *properties, *map); | 1966 heap->InitializeJSObjectFromMap(*jsobj, *properties, *map); |
| 1966 | 1967 |
| 1967 // The current native context is used to set up certain bits. | 1968 // The current native context is used to set up certain bits. |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2349 return Handle<Object>::null(); | 2350 return Handle<Object>::null(); |
| 2350 } | 2351 } |
| 2351 | 2352 |
| 2352 | 2353 |
| 2353 Handle<Object> Factory::ToBoolean(bool value) { | 2354 Handle<Object> Factory::ToBoolean(bool value) { |
| 2354 return value ? true_value() : false_value(); | 2355 return value ? true_value() : false_value(); |
| 2355 } | 2356 } |
| 2356 | 2357 |
| 2357 | 2358 |
| 2358 } } // namespace v8::internal | 2359 } } // namespace v8::internal |
| OLD | NEW |