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 9913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9924 cache->set(header + last * step + kProtoTransitionPrototypeOffset, prototype); | 9924 cache->set(header + last * step + kProtoTransitionPrototypeOffset, prototype); |
9925 cache->set(header + last * step + kProtoTransitionMapOffset, map); | 9925 cache->set(header + last * step + kProtoTransitionMapOffset, map); |
9926 SetNumberOfProtoTransitions(transitions); | 9926 SetNumberOfProtoTransitions(transitions); |
9927 | 9927 |
9928 return cache; | 9928 return cache; |
9929 } | 9929 } |
9930 | 9930 |
9931 | 9931 |
9932 void Map::ZapTransitions() { | 9932 void Map::ZapTransitions() { |
9933 TransitionArray* transition_array = transitions(); | 9933 TransitionArray* transition_array = transitions(); |
9934 MemsetPointer(transition_array->data_start(), | 9934 // TODO(mstarzinger): Temporarily use a slower version instead of the faster |
9935 GetHeap()->the_hole_value(), | 9935 // MemsetPointer to investigate a crasher. Switch back to MemsetPointer. |
9936 transition_array->length()); | 9936 Object** data = transition_array->data_start(); |
| 9937 Object* the_hole = GetHeap()->the_hole_value(); |
| 9938 int length = transition_array->length(); |
| 9939 for (int i = 0; i < length; i++) { |
| 9940 data[i] = the_hole; |
| 9941 } |
9937 } | 9942 } |
9938 | 9943 |
9939 | 9944 |
9940 void Map::ZapPrototypeTransitions() { | 9945 void Map::ZapPrototypeTransitions() { |
9941 FixedArray* proto_transitions = GetPrototypeTransitions(); | 9946 FixedArray* proto_transitions = GetPrototypeTransitions(); |
9942 MemsetPointer(proto_transitions->data_start(), | 9947 MemsetPointer(proto_transitions->data_start(), |
9943 GetHeap()->the_hole_value(), | 9948 GetHeap()->the_hole_value(), |
9944 proto_transitions->length()); | 9949 proto_transitions->length()); |
9945 } | 9950 } |
9946 | 9951 |
(...skipping 4566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14513 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14518 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
14514 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14519 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
14515 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14520 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
14516 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14521 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
14517 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14522 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
14518 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14523 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
14519 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14524 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
14520 } | 14525 } |
14521 | 14526 |
14522 } } // namespace v8::internal | 14527 } } // namespace v8::internal |
OLD | NEW |