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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 return JSWeakMap::kSize; | 1660 return JSWeakMap::kSize; |
1661 case JS_WEAK_SET_TYPE: | 1661 case JS_WEAK_SET_TYPE: |
1662 return JSWeakSet::kSize; | 1662 return JSWeakSet::kSize; |
1663 case JS_REGEXP_TYPE: | 1663 case JS_REGEXP_TYPE: |
1664 return JSRegExp::kSize; | 1664 return JSRegExp::kSize; |
1665 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: | 1665 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
1666 return JSObject::kHeaderSize; | 1666 return JSObject::kHeaderSize; |
1667 case JS_MESSAGE_OBJECT_TYPE: | 1667 case JS_MESSAGE_OBJECT_TYPE: |
1668 return JSMessageObject::kSize; | 1668 return JSMessageObject::kSize; |
1669 default: | 1669 default: |
1670 UNREACHABLE(); | 1670 // TODO(jkummerow): Re-enable this. Blink currently hits this |
| 1671 // from its CustomElementConstructorBuilder. |
| 1672 // UNREACHABLE(); |
1671 return 0; | 1673 return 0; |
1672 } | 1674 } |
1673 } | 1675 } |
1674 | 1676 |
1675 | 1677 |
1676 int JSObject::GetInternalFieldCount() { | 1678 int JSObject::GetInternalFieldCount() { |
1677 ASSERT(1 << kPointerSizeLog2 == kPointerSize); | 1679 ASSERT(1 << kPointerSizeLog2 == kPointerSize); |
1678 // Make sure to adjust for the number of in-object properties. These | 1680 // Make sure to adjust for the number of in-object properties. These |
1679 // properties do contribute to the size, but are not internal fields. | 1681 // properties do contribute to the size, but are not internal fields. |
1680 return ((Size() - GetHeaderSize()) >> kPointerSizeLog2) - | 1682 return ((Size() - GetHeaderSize()) >> kPointerSizeLog2) - |
(...skipping 4717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6398 #undef WRITE_UINT32_FIELD | 6400 #undef WRITE_UINT32_FIELD |
6399 #undef READ_SHORT_FIELD | 6401 #undef READ_SHORT_FIELD |
6400 #undef WRITE_SHORT_FIELD | 6402 #undef WRITE_SHORT_FIELD |
6401 #undef READ_BYTE_FIELD | 6403 #undef READ_BYTE_FIELD |
6402 #undef WRITE_BYTE_FIELD | 6404 #undef WRITE_BYTE_FIELD |
6403 | 6405 |
6404 | 6406 |
6405 } } // namespace v8::internal | 6407 } } // namespace v8::internal |
6406 | 6408 |
6407 #endif // V8_OBJECTS_INL_H_ | 6409 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |