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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 object->ShortPrint(file); | 1672 object->ShortPrint(file); |
1673 PrintF(file, " from "); | 1673 PrintF(file, " from "); |
1674 from_elements->ShortPrint(file); | 1674 from_elements->ShortPrint(file); |
1675 PrintF(file, " to "); | 1675 PrintF(file, " to "); |
1676 to_elements->ShortPrint(file); | 1676 to_elements->ShortPrint(file); |
1677 PrintF(file, "\n"); | 1677 PrintF(file, "\n"); |
1678 } | 1678 } |
1679 } | 1679 } |
1680 | 1680 |
1681 | 1681 |
| 1682 // static |
| 1683 MaybeHandle<JSFunction> Map::GetConstructorFunction( |
| 1684 Handle<Map> map, Handle<Context> native_context) { |
| 1685 if (map->IsPrimitiveMap()) { |
| 1686 int const constructor_function_index = map->GetConstructorFunctionIndex(); |
| 1687 if (constructor_function_index != kNoConstructorFunctionIndex) { |
| 1688 return handle( |
| 1689 JSFunction::cast(native_context->get(constructor_function_index))); |
| 1690 } |
| 1691 } |
| 1692 return MaybeHandle<JSFunction>(); |
| 1693 } |
| 1694 |
| 1695 |
1682 void Map::PrintReconfiguration(FILE* file, int modify_index, PropertyKind kind, | 1696 void Map::PrintReconfiguration(FILE* file, int modify_index, PropertyKind kind, |
1683 PropertyAttributes attributes) { | 1697 PropertyAttributes attributes) { |
1684 OFStream os(file); | 1698 OFStream os(file); |
1685 os << "[reconfiguring "; | 1699 os << "[reconfiguring "; |
1686 constructor_name()->PrintOn(file); | 1700 constructor_name()->PrintOn(file); |
1687 os << "] "; | 1701 os << "] "; |
1688 Name* name = instance_descriptors()->GetKey(modify_index); | 1702 Name* name = instance_descriptors()->GetKey(modify_index); |
1689 if (name->IsString()) { | 1703 if (name->IsString()) { |
1690 String::cast(name)->PrintOn(file); | 1704 String::cast(name)->PrintOn(file); |
1691 } else { | 1705 } else { |
(...skipping 16158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17850 if (cell->value() != *new_value) { | 17864 if (cell->value() != *new_value) { |
17851 cell->set_value(*new_value); | 17865 cell->set_value(*new_value); |
17852 Isolate* isolate = cell->GetIsolate(); | 17866 Isolate* isolate = cell->GetIsolate(); |
17853 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17867 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
17854 isolate, DependentCode::kPropertyCellChangedGroup); | 17868 isolate, DependentCode::kPropertyCellChangedGroup); |
17855 } | 17869 } |
17856 } | 17870 } |
17857 | 17871 |
17858 } // namespace internal | 17872 } // namespace internal |
17859 } // namespace v8 | 17873 } // namespace v8 |
OLD | NEW |