Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: src/objects.cc

Issue 220923003: Lazily initialize the target map list in IC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/ic.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10522 matching lines...) Expand 10 before | Expand all | Expand 10 after
10533 DisallowHeapAllocation no_allocation; 10533 DisallowHeapAllocation no_allocation;
10534 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); 10534 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
10535 for (RelocIterator it(this, mask); !it.done(); it.next()) { 10535 for (RelocIterator it(this, mask); !it.done(); it.next()) {
10536 RelocInfo* info = it.rinfo(); 10536 RelocInfo* info = it.rinfo();
10537 Object* object = info->target_object(); 10537 Object* object = info->target_object();
10538 if (object->IsMap()) maps->Add(handle(Map::cast(object))); 10538 if (object->IsMap()) maps->Add(handle(Map::cast(object)));
10539 } 10539 }
10540 } 10540 }
10541 10541
10542 10542
10543 void Code::FindAllTypes(TypeHandleList* types) {
10544 ASSERT(is_inline_cache_stub());
10545 DisallowHeapAllocation no_allocation;
10546 int mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
10547 for (RelocIterator it(this, mask); !it.done(); it.next()) {
10548 RelocInfo* info = it.rinfo();
10549 Object* object = info->target_object();
10550 if (object->IsMap()) {
10551 Handle<Map> map(Map::cast(object));
10552 types->Add(IC::MapToType<HeapType>(map, map->GetIsolate()));
10553 }
10554 }
10555 }
10556
10557
10558 Code* Code::FindFirstHandler() { 10543 Code* Code::FindFirstHandler() {
10559 ASSERT(is_inline_cache_stub()); 10544 ASSERT(is_inline_cache_stub());
10560 DisallowHeapAllocation no_allocation; 10545 DisallowHeapAllocation no_allocation;
10561 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET); 10546 int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET);
10562 for (RelocIterator it(this, mask); !it.done(); it.next()) { 10547 for (RelocIterator it(this, mask); !it.done(); it.next()) {
10563 RelocInfo* info = it.rinfo(); 10548 RelocInfo* info = it.rinfo();
10564 Code* code = Code::GetCodeFromTargetAddress(info->target_address()); 10549 Code* code = Code::GetCodeFromTargetAddress(info->target_address());
10565 if (code->kind() == Code::HANDLER) return code; 10550 if (code->kind() == Code::HANDLER) return code;
10566 } 10551 }
10567 return NULL; 10552 return NULL;
(...skipping 5908 matching lines...) Expand 10 before | Expand all | Expand 10 after
16476 #define ERROR_MESSAGES_TEXTS(C, T) T, 16461 #define ERROR_MESSAGES_TEXTS(C, T) T,
16477 static const char* error_messages_[] = { 16462 static const char* error_messages_[] = {
16478 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16463 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16479 }; 16464 };
16480 #undef ERROR_MESSAGES_TEXTS 16465 #undef ERROR_MESSAGES_TEXTS
16481 return error_messages_[reason]; 16466 return error_messages_[reason];
16482 } 16467 }
16483 16468
16484 16469
16485 } } // namespace v8::internal 16470 } } // namespace v8::internal
OLDNEW
« src/ic.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698