| 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 11547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11558 break, | 11558 break, |
| 11559 return Handle<Map>()); | 11559 return Handle<Map>()); |
| 11560 } | 11560 } |
| 11561 | 11561 |
| 11562 // Reload number of transitions as GC might shrink them. | 11562 // Reload number of transitions as GC might shrink them. |
| 11563 int last = map->NumberOfProtoTransitions(); | 11563 int last = map->NumberOfProtoTransitions(); |
| 11564 int entry = header + last * step; | 11564 int entry = header + last * step; |
| 11565 | 11565 |
| 11566 cache->set(entry + kProtoTransitionPrototypeOffset, *prototype); | 11566 cache->set(entry + kProtoTransitionPrototypeOffset, *prototype); |
| 11567 cache->set(entry + kProtoTransitionMapOffset, *target_map); | 11567 cache->set(entry + kProtoTransitionMapOffset, *target_map); |
| 11568 map->SetNumberOfProtoTransitions(transitions); | 11568 map->SetNumberOfProtoTransitions(last + 1); |
| 11569 | 11569 |
| 11570 return map; | 11570 return map; |
| 11571 } | 11571 } |
| 11572 | 11572 |
| 11573 | 11573 |
| 11574 void Map::ZapTransitions() { | 11574 void Map::ZapTransitions() { |
| 11575 TransitionArray* transition_array = transitions(); | 11575 TransitionArray* transition_array = transitions(); |
| 11576 // TODO(mstarzinger): Temporarily use a slower version instead of the faster | 11576 // TODO(mstarzinger): Temporarily use a slower version instead of the faster |
| 11577 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. | 11577 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. |
| 11578 Object** data = transition_array->data_start(); | 11578 Object** data = transition_array->data_start(); |
| (...skipping 4927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16506 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16506 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16507 static const char* error_messages_[] = { | 16507 static const char* error_messages_[] = { |
| 16508 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16508 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16509 }; | 16509 }; |
| 16510 #undef ERROR_MESSAGES_TEXTS | 16510 #undef ERROR_MESSAGES_TEXTS |
| 16511 return error_messages_[reason]; | 16511 return error_messages_[reason]; |
| 16512 } | 16512 } |
| 16513 | 16513 |
| 16514 | 16514 |
| 16515 } } // namespace v8::internal | 16515 } } // namespace v8::internal |
| OLD | NEW |