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 11591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11602 break, | 11602 break, |
11603 return Handle<Map>()); | 11603 return Handle<Map>()); |
11604 } | 11604 } |
11605 | 11605 |
11606 // Reload number of transitions as GC might shrink them. | 11606 // Reload number of transitions as GC might shrink them. |
11607 int last = map->NumberOfProtoTransitions(); | 11607 int last = map->NumberOfProtoTransitions(); |
11608 int entry = header + last * step; | 11608 int entry = header + last * step; |
11609 | 11609 |
11610 cache->set(entry + kProtoTransitionPrototypeOffset, *prototype); | 11610 cache->set(entry + kProtoTransitionPrototypeOffset, *prototype); |
11611 cache->set(entry + kProtoTransitionMapOffset, *target_map); | 11611 cache->set(entry + kProtoTransitionMapOffset, *target_map); |
11612 map->SetNumberOfProtoTransitions(transitions); | 11612 map->SetNumberOfProtoTransitions(last + 1); |
11613 | 11613 |
11614 return map; | 11614 return map; |
11615 } | 11615 } |
11616 | 11616 |
11617 | 11617 |
11618 void Map::ZapTransitions() { | 11618 void Map::ZapTransitions() { |
11619 TransitionArray* transition_array = transitions(); | 11619 TransitionArray* transition_array = transitions(); |
11620 // TODO(mstarzinger): Temporarily use a slower version instead of the faster | 11620 // TODO(mstarzinger): Temporarily use a slower version instead of the faster |
11621 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. | 11621 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. |
11622 Object** data = transition_array->data_start(); | 11622 Object** data = transition_array->data_start(); |
(...skipping 5044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16667 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16667 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16668 static const char* error_messages_[] = { | 16668 static const char* error_messages_[] = { |
16669 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16669 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16670 }; | 16670 }; |
16671 #undef ERROR_MESSAGES_TEXTS | 16671 #undef ERROR_MESSAGES_TEXTS |
16672 return error_messages_[reason]; | 16672 return error_messages_[reason]; |
16673 } | 16673 } |
16674 | 16674 |
16675 | 16675 |
16676 } } // namespace v8::internal | 16676 } } // namespace v8::internal |
OLD | NEW |