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(Object* undefined) { | |
10380 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | |
10381 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { | |
10382 RelocInfo::Mode mode = it.rinfo()->rmode(); | |
10383 if (mode == RelocInfo::EMBEDDED_OBJECT) { | |
10384 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); | |
ulan
2013/11/19 10:40:27
We cannot put smi(0) here because, target object h
| |
10385 } | |
10386 } | |
10387 } | |
10388 | |
10389 | |
10379 void Code::Relocate(intptr_t delta) { | 10390 void Code::Relocate(intptr_t delta) { |
10380 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { | 10391 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
10381 it.rinfo()->apply(delta); | 10392 it.rinfo()->apply(delta); |
10382 } | 10393 } |
10383 CPU::FlushICache(instruction_start(), instruction_size()); | 10394 CPU::FlushICache(instruction_start(), instruction_size()); |
10384 } | 10395 } |
10385 | 10396 |
10386 | 10397 |
10387 void Code::CopyFrom(const CodeDesc& desc) { | 10398 void Code::CopyFrom(const CodeDesc& desc) { |
10388 ASSERT(Marking::Color(this) == Marking::WHITE_OBJECT); | 10399 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, | 16659 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16649 static const char* error_messages_[] = { | 16660 static const char* error_messages_[] = { |
16650 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16661 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16651 }; | 16662 }; |
16652 #undef ERROR_MESSAGES_TEXTS | 16663 #undef ERROR_MESSAGES_TEXTS |
16653 return error_messages_[reason]; | 16664 return error_messages_[reason]; |
16654 } | 16665 } |
16655 | 16666 |
16656 | 16667 |
16657 } } // namespace v8::internal | 16668 } } // namespace v8::internal |
OLD | NEW |