| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4695 Map* Map::elements_transition_map() { | 4695 Map* Map::elements_transition_map() { |
| 4696 int index = transitions()->Search(GetHeap()->elements_transition_symbol()); | 4696 int index = transitions()->Search(GetHeap()->elements_transition_symbol()); |
| 4697 return transitions()->GetTarget(index); | 4697 return transitions()->GetTarget(index); |
| 4698 } | 4698 } |
| 4699 | 4699 |
| 4700 | 4700 |
| 4701 bool Map::CanHaveMoreTransitions() { | 4701 bool Map::CanHaveMoreTransitions() { |
| 4702 if (!HasTransitionArray()) return true; | 4702 if (!HasTransitionArray()) return true; |
| 4703 return FixedArray::SizeFor(transitions()->length() + | 4703 return FixedArray::SizeFor(transitions()->length() + |
| 4704 TransitionArray::kTransitionSize) | 4704 TransitionArray::kTransitionSize) |
| 4705 <= Page::kMaxNonCodeHeapObjectSize; | 4705 <= Page::kMaxRegularHeapObjectSize; |
| 4706 } | 4706 } |
| 4707 | 4707 |
| 4708 | 4708 |
| 4709 MaybeObject* Map::AddTransition(Name* key, | 4709 MaybeObject* Map::AddTransition(Name* key, |
| 4710 Map* target, | 4710 Map* target, |
| 4711 SimpleTransitionFlag flag) { | 4711 SimpleTransitionFlag flag) { |
| 4712 if (HasTransitionArray()) return transitions()->CopyInsert(key, target); | 4712 if (HasTransitionArray()) return transitions()->CopyInsert(key, target); |
| 4713 return TransitionArray::NewWith(flag, key, target, GetBackPointer()); | 4713 return TransitionArray::NewWith(flag, key, target, GetBackPointer()); |
| 4714 } | 4714 } |
| 4715 | 4715 |
| (...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6794 #undef READ_UINT32_FIELD | 6794 #undef READ_UINT32_FIELD |
| 6795 #undef WRITE_UINT32_FIELD | 6795 #undef WRITE_UINT32_FIELD |
| 6796 #undef READ_SHORT_FIELD | 6796 #undef READ_SHORT_FIELD |
| 6797 #undef WRITE_SHORT_FIELD | 6797 #undef WRITE_SHORT_FIELD |
| 6798 #undef READ_BYTE_FIELD | 6798 #undef READ_BYTE_FIELD |
| 6799 #undef WRITE_BYTE_FIELD | 6799 #undef WRITE_BYTE_FIELD |
| 6800 | 6800 |
| 6801 } } // namespace v8::internal | 6801 } } // namespace v8::internal |
| 6802 | 6802 |
| 6803 #endif // V8_OBJECTS_INL_H_ | 6803 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |