| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 return JSReceiver::cast(this)->GetIdentityHash(flag); | 756 return JSReceiver::cast(this)->GetIdentityHash(flag); |
| 757 } | 757 } |
| 758 | 758 |
| 759 UNREACHABLE(); | 759 UNREACHABLE(); |
| 760 return Smi::FromInt(0); | 760 return Smi::FromInt(0); |
| 761 } | 761 } |
| 762 | 762 |
| 763 | 763 |
| 764 bool Object::SameValue(Object* other) { | 764 bool Object::SameValue(Object* other) { |
| 765 if (other == this) return true; | 765 if (other == this) return true; |
| 766 if (!IsHeapObject() || !other->IsHeapObject()) return false; | |
| 767 | 766 |
| 768 // The object is either a number, a string, an odd-ball, | 767 // The object is either a number, a string, an odd-ball, |
| 769 // a real JS object, or a Harmony proxy. | 768 // a real JS object, or a Harmony proxy. |
| 770 if (IsNumber() && other->IsNumber()) { | 769 if (IsNumber() && other->IsNumber()) { |
| 771 double this_value = Number(); | 770 double this_value = Number(); |
| 772 double other_value = other->Number(); | 771 double other_value = other->Number(); |
| 773 return (this_value == other_value) || | 772 return (this_value == other_value) || |
| 774 (isnan(this_value) && isnan(other_value)); | 773 (isnan(this_value) && isnan(other_value)); |
| 775 } | 774 } |
| 776 if (IsString() && other->IsString()) { | 775 if (IsString() && other->IsString()) { |
| (...skipping 12500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13277 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13276 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13278 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13277 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13279 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13278 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13280 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13279 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13281 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13280 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13282 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13281 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13283 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13282 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13284 } | 13283 } |
| 13285 | 13284 |
| 13286 } } // namespace v8::internal | 13285 } } // namespace v8::internal |
| OLD | NEW |