Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 8043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8054 } | 8054 } |
| 8055 | 8055 |
| 8056 return result; | 8056 return result; |
| 8057 } | 8057 } |
| 8058 | 8058 |
| 8059 | 8059 |
| 8060 Handle<Map> Map::CopyDropDescriptors(Handle<Map> map) { | 8060 Handle<Map> Map::CopyDropDescriptors(Handle<Map> map) { |
| 8061 Handle<Map> result = RawCopy(map, map->instance_size()); | 8061 Handle<Map> result = RawCopy(map, map->instance_size()); |
| 8062 | 8062 |
| 8063 // Please note instance_type and instance_size are set when allocated. | 8063 // Please note instance_type and instance_size are set when allocated. |
| 8064 result->SetInObjectProperties(map->GetInObjectProperties()); | 8064 if (map->IsJSObjectMap()) { |
|
Camillo Bruni
2015/11/11 12:38:21
Probably should only allow this during bootstrappi
| |
| 8065 result->set_unused_property_fields(map->unused_property_fields()); | 8065 result->SetInObjectProperties(map->GetInObjectProperties()); |
| 8066 | 8066 result->set_unused_property_fields(map->unused_property_fields()); |
| 8067 } | |
| 8067 result->ClearCodeCache(map->GetHeap()); | 8068 result->ClearCodeCache(map->GetHeap()); |
| 8068 map->NotifyLeafMapLayoutChange(); | 8069 map->NotifyLeafMapLayoutChange(); |
| 8069 return result; | 8070 return result; |
| 8070 } | 8071 } |
| 8071 | 8072 |
| 8072 | 8073 |
| 8073 Handle<Map> Map::ShareDescriptor(Handle<Map> map, | 8074 Handle<Map> Map::ShareDescriptor(Handle<Map> map, |
| 8074 Handle<DescriptorArray> descriptors, | 8075 Handle<DescriptorArray> descriptors, |
| 8075 Descriptor* descriptor) { | 8076 Descriptor* descriptor) { |
| 8076 // Sanity check. This path is only to be taken if the map owns its descriptor | 8077 // Sanity check. This path is only to be taken if the map owns its descriptor |
| (...skipping 9805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 17882 if (cell->value() != *new_value) { | 17883 if (cell->value() != *new_value) { |
| 17883 cell->set_value(*new_value); | 17884 cell->set_value(*new_value); |
| 17884 Isolate* isolate = cell->GetIsolate(); | 17885 Isolate* isolate = cell->GetIsolate(); |
| 17885 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17886 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 17886 isolate, DependentCode::kPropertyCellChangedGroup); | 17887 isolate, DependentCode::kPropertyCellChangedGroup); |
| 17887 } | 17888 } |
| 17888 } | 17889 } |
| 17889 | 17890 |
| 17890 } // namespace internal | 17891 } // namespace internal |
| 17891 } // namespace v8 | 17892 } // namespace v8 |
| OLD | NEW |