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 10532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10543 } | 10543 } |
10544 | 10544 |
10545 | 10545 |
10546 void Code::FindAllMaps(MapHandleList* maps) { | 10546 void Code::FindAllMaps(MapHandleList* maps) { |
10547 ASSERT(is_inline_cache_stub()); | 10547 ASSERT(is_inline_cache_stub()); |
10548 DisallowHeapAllocation no_allocation; | 10548 DisallowHeapAllocation no_allocation; |
10549 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 10549 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
10550 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 10550 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
10551 RelocInfo* info = it.rinfo(); | 10551 RelocInfo* info = it.rinfo(); |
10552 Object* object = info->target_object(); | 10552 Object* object = info->target_object(); |
10553 if (object->IsMap()) maps->Add(Handle<Map>(Map::cast(object))); | 10553 if (object->IsMap()) maps->Add(handle(Map::cast(object))); |
10554 } | 10554 } |
10555 } | 10555 } |
10556 | 10556 |
| 10557 |
| 10558 void Code::FindAllTypes(TypeHandleList* types) { |
| 10559 ASSERT(is_inline_cache_stub()); |
| 10560 DisallowHeapAllocation no_allocation; |
| 10561 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
| 10562 Isolate* isolate = GetIsolate(); |
| 10563 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
| 10564 RelocInfo* info = it.rinfo(); |
| 10565 Object* object = info->target_object(); |
| 10566 if (object->IsMap()) { |
| 10567 Handle<Map> map(Map::cast(object)); |
| 10568 types->Add(handle(IC::GetType(map), isolate)); |
| 10569 } |
| 10570 } |
| 10571 } |
| 10572 |
10557 | 10573 |
10558 void Code::ReplaceFirstMap(Map* replace_with) { | 10574 void Code::ReplaceFirstMap(Map* replace_with) { |
10559 ReplaceNthObject(1, GetHeap()->meta_map(), replace_with); | 10575 ReplaceNthObject(1, GetHeap()->meta_map(), replace_with); |
10560 } | 10576 } |
10561 | 10577 |
10562 | 10578 |
10563 Code* Code::FindFirstHandler() { | 10579 Code* Code::FindFirstHandler() { |
10564 ASSERT(is_inline_cache_stub()); | 10580 ASSERT(is_inline_cache_stub()); |
10565 DisallowHeapAllocation no_allocation; | 10581 DisallowHeapAllocation no_allocation; |
10566 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET); | 10582 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET); |
(...skipping 6065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16632 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16648 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16633 static const char* error_messages_[] = { | 16649 static const char* error_messages_[] = { |
16634 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16650 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16635 }; | 16651 }; |
16636 #undef ERROR_MESSAGES_TEXTS | 16652 #undef ERROR_MESSAGES_TEXTS |
16637 return error_messages_[reason]; | 16653 return error_messages_[reason]; |
16638 } | 16654 } |
16639 | 16655 |
16640 | 16656 |
16641 } } // namespace v8::internal | 16657 } } // namespace v8::internal |
OLD | NEW |