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 9490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9501 codes->clear_code_at(i); | 9501 codes->clear_code_at(i); |
9502 } | 9502 } |
9503 codes = new_codes; | 9503 codes = new_codes; |
9504 } | 9504 } |
9505 codes->set_code_at(append_index, *value); | 9505 codes->set_code_at(append_index, *value); |
9506 codes->set_number_of_codes(append_index + 1); | 9506 codes->set_number_of_codes(append_index + 1); |
9507 return codes; | 9507 return codes; |
9508 } | 9508 } |
9509 | 9509 |
9510 | 9510 |
| 9511 bool DependentCodes::Contains(Code* code) { |
| 9512 int limit = number_of_codes(); |
| 9513 for (int i = 0; i < limit; i++) { |
| 9514 if (code_at(i) == code) return true; |
| 9515 } |
| 9516 return false; |
| 9517 } |
| 9518 |
| 9519 |
9511 MaybeObject* JSReceiver::SetPrototype(Object* value, | 9520 MaybeObject* JSReceiver::SetPrototype(Object* value, |
9512 bool skip_hidden_prototypes) { | 9521 bool skip_hidden_prototypes) { |
9513 #ifdef DEBUG | 9522 #ifdef DEBUG |
9514 int size = Size(); | 9523 int size = Size(); |
9515 #endif | 9524 #endif |
9516 | 9525 |
9517 Heap* heap = GetHeap(); | 9526 Heap* heap = GetHeap(); |
9518 // Silently ignore the change if value is not a JSObject or null. | 9527 // Silently ignore the change if value is not a JSObject or null. |
9519 // SpiderMonkey behaves this way. | 9528 // SpiderMonkey behaves this way. |
9520 if (!value->IsJSReceiver() && !value->IsNull()) return value; | 9529 if (!value->IsJSReceiver() && !value->IsNull()) return value; |
(...skipping 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13855 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13864 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
13856 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13865 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
13857 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13866 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
13858 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13867 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
13859 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13868 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
13860 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13869 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
13861 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13870 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
13862 } | 13871 } |
13863 | 13872 |
13864 } } // namespace v8::internal | 13873 } } // namespace v8::internal |
OLD | NEW |