| 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 10459 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 10470     if (object->IsHeapObject()) { | 10470     if (object->IsHeapObject()) { | 
| 10471       if (HeapObject::cast(object)->map() == match_map) { | 10471       if (HeapObject::cast(object)->map() == match_map) { | 
| 10472         if (--n == 0) return object; | 10472         if (--n == 0) return object; | 
| 10473       } | 10473       } | 
| 10474     } | 10474     } | 
| 10475   } | 10475   } | 
| 10476   return NULL; | 10476   return NULL; | 
| 10477 } | 10477 } | 
| 10478 | 10478 | 
| 10479 | 10479 | 
|  | 10480 AllocationSite* Code::FindFirstAllocationSite() { | 
|  | 10481   Object* result = FindNthObject(1, GetHeap()->allocation_site_map()); | 
|  | 10482   return (result != NULL) ? AllocationSite::cast(result) : NULL; | 
|  | 10483 } | 
|  | 10484 | 
|  | 10485 | 
| 10480 Map* Code::FindFirstMap() { | 10486 Map* Code::FindFirstMap() { | 
| 10481   Object* result = FindNthObject(1, GetHeap()->meta_map()); | 10487   Object* result = FindNthObject(1, GetHeap()->meta_map()); | 
| 10482   return (result != NULL) ? Map::cast(result) : NULL; | 10488   return (result != NULL) ? Map::cast(result) : NULL; | 
| 10483 } | 10489 } | 
| 10484 | 10490 | 
| 10485 | 10491 | 
| 10486 void Code::ReplaceNthObject(int n, | 10492 void Code::ReplaceNthObject(int n, | 
| 10487                             Map* match_map, | 10493                             Map* match_map, | 
| 10488                             Object* replace_with) { | 10494                             Object* replace_with) { | 
| 10489   ASSERT(is_inline_cache_stub() || is_handler()); | 10495   ASSERT(is_inline_cache_stub() || is_handler()); | 
| (...skipping 6136 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 16626 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16632 #define ERROR_MESSAGES_TEXTS(C, T) T, | 
| 16627   static const char* error_messages_[] = { | 16633   static const char* error_messages_[] = { | 
| 16628       ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16634       ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 
| 16629   }; | 16635   }; | 
| 16630 #undef ERROR_MESSAGES_TEXTS | 16636 #undef ERROR_MESSAGES_TEXTS | 
| 16631   return error_messages_[reason]; | 16637   return error_messages_[reason]; | 
| 16632 } | 16638 } | 
| 16633 | 16639 | 
| 16634 | 16640 | 
| 16635 } }  // namespace v8::internal | 16641 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|