OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 15809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15820 set_elements(GetHeap()->EmptyExternalArrayForMap(map())); | 15820 set_elements(GetHeap()->EmptyExternalArrayForMap(map())); |
15821 } | 15821 } |
15822 | 15822 |
15823 | 15823 |
15824 Type* PropertyCell::type() { | 15824 Type* PropertyCell::type() { |
15825 return static_cast<Type*>(type_raw()); | 15825 return static_cast<Type*>(type_raw()); |
15826 } | 15826 } |
15827 | 15827 |
15828 | 15828 |
15829 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { | 15829 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { |
| 15830 ASSERT(IsPropertyCell()); |
15830 set_type_raw(type, ignored); | 15831 set_type_raw(type, ignored); |
15831 } | 15832 } |
15832 | 15833 |
15833 | 15834 |
15834 Type* PropertyCell::UpdateType(Handle<PropertyCell> cell, | 15835 Type* PropertyCell::UpdateType(Handle<PropertyCell> cell, |
15835 Handle<Object> value) { | 15836 Handle<Object> value) { |
15836 Isolate* isolate = cell->GetIsolate(); | 15837 Isolate* isolate = cell->GetIsolate(); |
15837 Handle<Type> old_type(cell->type(), isolate); | 15838 Handle<Type> old_type(cell->type(), isolate); |
15838 Handle<Type> new_type((value->IsSmi() || value->IsUndefined()) | 15839 Handle<Type> new_type((value->IsSmi() || value->IsUndefined()) |
15839 ? Type::Constant(value, isolate) | 15840 ? Type::Constant(value, isolate) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15884 | 15885 |
15885 void PropertyCell::AddDependentCode(Handle<Code> code) { | 15886 void PropertyCell::AddDependentCode(Handle<Code> code) { |
15886 Handle<DependentCode> codes = DependentCode::Insert( | 15887 Handle<DependentCode> codes = DependentCode::Insert( |
15887 Handle<DependentCode>(dependent_code()), | 15888 Handle<DependentCode>(dependent_code()), |
15888 DependentCode::kPropertyCellChangedGroup, code); | 15889 DependentCode::kPropertyCellChangedGroup, code); |
15889 if (*codes != dependent_code()) set_dependent_code(*codes); | 15890 if (*codes != dependent_code()) set_dependent_code(*codes); |
15890 } | 15891 } |
15891 | 15892 |
15892 | 15893 |
15893 } } // namespace v8::internal | 15894 } } // namespace v8::internal |
OLD | NEW |