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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1730 } | 1730 } |
1731 break; | 1731 break; |
1732 } | 1732 } |
1733 return; | 1733 return; |
1734 } | 1734 } |
1735 | 1735 |
1736 switch (type) { | 1736 switch (type) { |
1737 case FIXED_ARRAY_TYPE: | 1737 case FIXED_ARRAY_TYPE: |
1738 FixedArray::BodyDescriptor::IterateBody(this, object_size, v); | 1738 FixedArray::BodyDescriptor::IterateBody(this, object_size, v); |
1739 break; | 1739 break; |
| 1740 case CONSTANT_POOL_ARRAY_TYPE: |
| 1741 reinterpret_cast<ConstantPoolArray*>(this)->ConstantPoolIterateBody(v); |
| 1742 break; |
1740 case FIXED_DOUBLE_ARRAY_TYPE: | 1743 case FIXED_DOUBLE_ARRAY_TYPE: |
1741 break; | 1744 break; |
1742 case JS_OBJECT_TYPE: | 1745 case JS_OBJECT_TYPE: |
1743 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: | 1746 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
1744 case JS_GENERATOR_OBJECT_TYPE: | 1747 case JS_GENERATOR_OBJECT_TYPE: |
1745 case JS_MODULE_TYPE: | 1748 case JS_MODULE_TYPE: |
1746 case JS_VALUE_TYPE: | 1749 case JS_VALUE_TYPE: |
1747 case JS_DATE_TYPE: | 1750 case JS_DATE_TYPE: |
1748 case JS_ARRAY_TYPE: | 1751 case JS_ARRAY_TYPE: |
1749 case JS_ARRAY_BUFFER_TYPE: | 1752 case JS_ARRAY_BUFFER_TYPE: |
(...skipping 7605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9355 | 9358 |
9356 | 9359 |
9357 bool Map::EquivalentToForNormalization(Map* other, | 9360 bool Map::EquivalentToForNormalization(Map* other, |
9358 PropertyNormalizationMode mode) { | 9361 PropertyNormalizationMode mode) { |
9359 int properties = mode == CLEAR_INOBJECT_PROPERTIES | 9362 int properties = mode == CLEAR_INOBJECT_PROPERTIES |
9360 ? 0 : other->inobject_properties(); | 9363 ? 0 : other->inobject_properties(); |
9361 return CheckEquivalent(this, other) && inobject_properties() == properties; | 9364 return CheckEquivalent(this, other) && inobject_properties() == properties; |
9362 } | 9365 } |
9363 | 9366 |
9364 | 9367 |
| 9368 void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) { |
| 9369 int first_ptr_offset = OffsetOfElementAt(first_ptr_index()); |
| 9370 int last_ptr_offset = |
| 9371 OffsetOfElementAt(first_ptr_index() + count_of_ptr_entries()); |
| 9372 v->VisitPointers( |
| 9373 HeapObject::RawField(this, first_ptr_offset), |
| 9374 HeapObject::RawField(this, last_ptr_offset)); |
| 9375 } |
| 9376 |
| 9377 |
9365 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { | 9378 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { |
9366 // Iterate over all fields in the body but take care in dealing with | 9379 // Iterate over all fields in the body but take care in dealing with |
9367 // the code entry. | 9380 // the code entry. |
9368 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); | 9381 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); |
9369 v->VisitCodeEntry(this->address() + kCodeEntryOffset); | 9382 v->VisitCodeEntry(this->address() + kCodeEntryOffset); |
9370 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); | 9383 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); |
9371 } | 9384 } |
9372 | 9385 |
9373 | 9386 |
9374 void JSFunction::MarkForLazyRecompilation() { | 9387 void JSFunction::MarkForLazyRecompilation() { |
(...skipping 6886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16261 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16274 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16262 static const char* error_messages_[] = { | 16275 static const char* error_messages_[] = { |
16263 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16276 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16264 }; | 16277 }; |
16265 #undef ERROR_MESSAGES_TEXTS | 16278 #undef ERROR_MESSAGES_TEXTS |
16266 return error_messages_[reason]; | 16279 return error_messages_[reason]; |
16267 } | 16280 } |
16268 | 16281 |
16269 | 16282 |
16270 } } // namespace v8::internal | 16283 } } // namespace v8::internal |
OLD | NEW |