| 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 8831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8842 it.rinfo()->apply(delta); | 8842 it.rinfo()->apply(delta); |
| 8843 } | 8843 } |
| 8844 CPU::FlushICache(instruction_start(), instruction_size()); | 8844 CPU::FlushICache(instruction_start(), instruction_size()); |
| 8845 } | 8845 } |
| 8846 | 8846 |
| 8847 | 8847 |
| 8848 void Code::CopyFrom(const CodeDesc& desc) { | 8848 void Code::CopyFrom(const CodeDesc& desc) { |
| 8849 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); | 8849 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); |
| 8850 | 8850 |
| 8851 // copy code | 8851 // copy code |
| 8852 CopyBytes(instruction_start(), desc.buffer, desc.instr_size); | 8852 CopyBytes(instruction_start(), desc.buffer, |
| 8853 static_cast<size_t>(desc.instr_size)); |
| 8853 | 8854 |
| 8854 // copy reloc info | 8855 // copy reloc info |
| 8855 CopyBytes(relocation_start(), | 8856 CopyBytes(relocation_start(), |
| 8856 desc.buffer + desc.buffer_size - desc.reloc_size, | 8857 desc.buffer + desc.buffer_size - desc.reloc_size, |
| 8857 desc.reloc_size); | 8858 static_cast<size_t>(desc.reloc_size)); |
| 8858 | 8859 |
| 8859 // unbox handles and relocate | 8860 // unbox handles and relocate |
| 8860 intptr_t delta = instruction_start() - desc.buffer; | 8861 intptr_t delta = instruction_start() - desc.buffer; |
| 8861 int mode_mask = RelocInfo::kCodeTargetMask | | 8862 int mode_mask = RelocInfo::kCodeTargetMask | |
| 8862 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | | 8863 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
| 8863 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) | | 8864 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) | |
| 8864 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) | | 8865 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) | |
| 8865 RelocInfo::kApplyMask; | 8866 RelocInfo::kApplyMask; |
| 8866 // Needed to find target_object and runtime_entry on X64 | 8867 // Needed to find target_object and runtime_entry on X64 |
| 8867 Assembler* origin = desc.origin; | 8868 Assembler* origin = desc.origin; |
| (...skipping 5501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14369 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14370 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 14370 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14371 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 14371 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14372 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 14372 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14373 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 14373 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14374 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 14374 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14375 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 14375 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14376 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 14376 } | 14377 } |
| 14377 | 14378 |
| 14378 } } // namespace v8::internal | 14379 } } // namespace v8::internal |
| OLD | NEW |