| 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 11541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11552 break, | 11552 break, |
| 11553 return Handle<Map>()); | 11553 return Handle<Map>()); |
| 11554 } | 11554 } |
| 11555 | 11555 |
| 11556 // Reload number of transitions as GC might shrink them. | 11556 // Reload number of transitions as GC might shrink them. |
| 11557 int last = map->NumberOfProtoTransitions(); | 11557 int last = map->NumberOfProtoTransitions(); |
| 11558 int entry = header + last * step; | 11558 int entry = header + last * step; |
| 11559 | 11559 |
| 11560 cache->set(entry + kProtoTransitionPrototypeOffset, *prototype); | 11560 cache->set(entry + kProtoTransitionPrototypeOffset, *prototype); |
| 11561 cache->set(entry + kProtoTransitionMapOffset, *target_map); | 11561 cache->set(entry + kProtoTransitionMapOffset, *target_map); |
| 11562 map->SetNumberOfProtoTransitions(transitions); | 11562 map->SetNumberOfProtoTransitions(last + 1); |
| 11563 | 11563 |
| 11564 return map; | 11564 return map; |
| 11565 } | 11565 } |
| 11566 | 11566 |
| 11567 | 11567 |
| 11568 void Map::ZapTransitions() { | 11568 void Map::ZapTransitions() { |
| 11569 TransitionArray* transition_array = transitions(); | 11569 TransitionArray* transition_array = transitions(); |
| 11570 // TODO(mstarzinger): Temporarily use a slower version instead of the faster | 11570 // TODO(mstarzinger): Temporarily use a slower version instead of the faster |
| 11571 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. | 11571 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. |
| 11572 Object** data = transition_array->data_start(); | 11572 Object** data = transition_array->data_start(); |
| (...skipping 4919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16492 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16492 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16493 static const char* error_messages_[] = { | 16493 static const char* error_messages_[] = { |
| 16494 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16494 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16495 }; | 16495 }; |
| 16496 #undef ERROR_MESSAGES_TEXTS | 16496 #undef ERROR_MESSAGES_TEXTS |
| 16497 return error_messages_[reason]; | 16497 return error_messages_[reason]; |
| 16498 } | 16498 } |
| 16499 | 16499 |
| 16500 | 16500 |
| 16501 } } // namespace v8::internal | 16501 } } // namespace v8::internal |
| OLD | NEW |