| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 return context->boolean_function()->initial_map(); | 710 return context->boolean_function()->initial_map(); |
| 711 } | 711 } |
| 712 return isolate->heap()->null_value()->map(); | 712 return isolate->heap()->null_value()->map(); |
| 713 } | 713 } |
| 714 | 714 |
| 715 | 715 |
| 716 Object* Object::GetHash() { | 716 Object* Object::GetHash() { |
| 717 // The object is either a number, a name, an odd-ball, | 717 // The object is either a number, a name, an odd-ball, |
| 718 // a real JS object, or a Harmony proxy. | 718 // a real JS object, or a Harmony proxy. |
| 719 if (IsNumber()) { | 719 if (IsNumber()) { |
| 720 uint32_t hash = ComputeLongHash(double_to_uint64(Number())); | 720 uint32_t hash = std::isnan(Number()) |
| 721 ? Smi::kMaxValue |
| 722 : ComputeLongHash(double_to_uint64(Number())); |
| 721 return Smi::FromInt(hash & Smi::kMaxValue); | 723 return Smi::FromInt(hash & Smi::kMaxValue); |
| 722 } | 724 } |
| 723 if (IsName()) { | 725 if (IsName()) { |
| 724 uint32_t hash = Name::cast(this)->Hash(); | 726 uint32_t hash = Name::cast(this)->Hash(); |
| 725 return Smi::FromInt(hash); | 727 return Smi::FromInt(hash); |
| 726 } | 728 } |
| 727 if (IsOddball()) { | 729 if (IsOddball()) { |
| 728 uint32_t hash = Oddball::cast(this)->to_string()->Hash(); | 730 uint32_t hash = Oddball::cast(this)->to_string()->Hash(); |
| 729 return Smi::FromInt(hash); | 731 return Smi::FromInt(hash); |
| 730 } | 732 } |
| (...skipping 16155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16886 Handle<DependentCode> codes = | 16888 Handle<DependentCode> codes = |
| 16887 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16889 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
| 16888 DependentCode::kPropertyCellChangedGroup, | 16890 DependentCode::kPropertyCellChangedGroup, |
| 16889 info->object_wrapper()); | 16891 info->object_wrapper()); |
| 16890 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16892 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
| 16891 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16893 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
| 16892 cell, info->zone()); | 16894 cell, info->zone()); |
| 16893 } | 16895 } |
| 16894 | 16896 |
| 16895 } } // namespace v8::internal | 16897 } } // namespace v8::internal |
| OLD | NEW |