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

Side by Side Diff: src/objects.cc

Issue 106453003: Allocation site support for monomorphic StringAdds in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 7 years 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
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 10498 matching lines...) Expand 10 before | Expand all | Expand 10 after
10509 if (object->IsHeapObject()) { 10509 if (object->IsHeapObject()) {
10510 if (HeapObject::cast(object)->map() == match_map) { 10510 if (HeapObject::cast(object)->map() == match_map) {
10511 if (--n == 0) return object; 10511 if (--n == 0) return object;
10512 } 10512 }
10513 } 10513 }
10514 } 10514 }
10515 return NULL; 10515 return NULL;
10516 } 10516 }
10517 10517
10518 10518
10519 AllocationSite* Code::FindFirstAllocationSite() {
10520 Object* result = FindNthObject(1, GetHeap()->allocation_site_map());
10521 return (result != NULL) ? AllocationSite::cast(result) : NULL;
10522 }
10523
10524
10519 Map* Code::FindFirstMap() { 10525 Map* Code::FindFirstMap() {
10520 Object* result = FindNthObject(1, GetHeap()->meta_map()); 10526 Object* result = FindNthObject(1, GetHeap()->meta_map());
10521 return (result != NULL) ? Map::cast(result) : NULL; 10527 return (result != NULL) ? Map::cast(result) : NULL;
10522 } 10528 }
10523 10529
10524 10530
10525 void Code::ReplaceNthObject(int n, 10531 void Code::ReplaceNthObject(int n,
10526 Map* match_map, 10532 Map* match_map,
10527 Object* replace_with) { 10533 Object* replace_with) {
10528 ASSERT(is_inline_cache_stub() || is_handler()); 10534 ASSERT(is_inline_cache_stub() || is_handler());
(...skipping 6122 matching lines...) Expand 10 before | Expand all | Expand 10 after
16651 #define ERROR_MESSAGES_TEXTS(C, T) T, 16657 #define ERROR_MESSAGES_TEXTS(C, T) T,
16652 static const char* error_messages_[] = { 16658 static const char* error_messages_[] = {
16653 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16659 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16654 }; 16660 };
16655 #undef ERROR_MESSAGES_TEXTS 16661 #undef ERROR_MESSAGES_TEXTS
16656 return error_messages_[reason]; 16662 return error_messages_[reason];
16657 } 16663 }
16658 16664
16659 16665
16660 } } // namespace v8::internal 16666 } } // namespace v8::internal
OLDNEW
« src/hydrogen.cc ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698