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 10358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10369 Address p = rinfo->target_reference(); | 10369 Address p = rinfo->target_reference(); |
10370 VisitExternalReference(&p); | 10370 VisitExternalReference(&p); |
10371 } | 10371 } |
10372 | 10372 |
10373 | 10373 |
10374 void Code::InvalidateRelocation() { | 10374 void Code::InvalidateRelocation() { |
10375 set_relocation_info(GetHeap()->empty_byte_array()); | 10375 set_relocation_info(GetHeap()->empty_byte_array()); |
10376 } | 10376 } |
10377 | 10377 |
10378 | 10378 |
| 10379 void Code::InvalidateEmbeddedObjects() { |
| 10380 Object* undefined = GetHeap()->undefined_value(); |
| 10381 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
| 10382 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
| 10383 RelocInfo::Mode mode = it.rinfo()->rmode(); |
| 10384 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 10385 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
| 10386 } |
| 10387 } |
| 10388 } |
| 10389 |
| 10390 |
10379 void Code::Relocate(intptr_t delta) { | 10391 void Code::Relocate(intptr_t delta) { |
10380 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 10392 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
10381 it.rinfo()->apply(delta); | 10393 it.rinfo()->apply(delta); |
10382 } | 10394 } |
10383 CPU::FlushICache(instruction_start(), instruction_size()); | 10395 CPU::FlushICache(instruction_start(), instruction_size()); |
10384 } | 10396 } |
10385 | 10397 |
10386 | 10398 |
10387 void Code::CopyFrom(const CodeDesc& desc) { | 10399 void Code::CopyFrom(const CodeDesc& desc) { |
10388 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); | 10400 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); |
(...skipping 6259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16648 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16660 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16649 static const char* error_messages_[] = { | 16661 static const char* error_messages_[] = { |
16650 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16662 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16651 }; | 16663 }; |
16652 #undef ERROR_MESSAGES_TEXTS | 16664 #undef ERROR_MESSAGES_TEXTS |
16653 return error_messages_[reason]; | 16665 return error_messages_[reason]; |
16654 } | 16666 } |
16655 | 16667 |
16656 | 16668 |
16657 } } // namespace v8::internal | 16669 } } // namespace v8::internal |
OLD | NEW |