| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1972 return JSWeakMap::kSize; | 1972 return JSWeakMap::kSize; |
| 1973 case JS_WEAK_SET_TYPE: | 1973 case JS_WEAK_SET_TYPE: |
| 1974 return JSWeakSet::kSize; | 1974 return JSWeakSet::kSize; |
| 1975 case JS_REGEXP_TYPE: | 1975 case JS_REGEXP_TYPE: |
| 1976 return JSRegExp::kSize; | 1976 return JSRegExp::kSize; |
| 1977 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: | 1977 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
| 1978 return JSObject::kHeaderSize; | 1978 return JSObject::kHeaderSize; |
| 1979 case JS_MESSAGE_OBJECT_TYPE: | 1979 case JS_MESSAGE_OBJECT_TYPE: |
| 1980 return JSMessageObject::kSize; | 1980 return JSMessageObject::kSize; |
| 1981 default: | 1981 default: |
| 1982 // TODO(jkummerow): Re-enable this. Blink currently hits this | 1982 UNREACHABLE(); |
| 1983 // from its CustomElementConstructorBuilder. | |
| 1984 // UNREACHABLE(); | |
| 1985 return 0; | 1983 return 0; |
| 1986 } | 1984 } |
| 1987 } | 1985 } |
| 1988 | 1986 |
| 1989 | 1987 |
| 1990 int JSObject::GetInternalFieldCount() { | 1988 int JSObject::GetInternalFieldCount() { |
| 1991 DCHECK(1 << kPointerSizeLog2 == kPointerSize); | 1989 DCHECK(1 << kPointerSizeLog2 == kPointerSize); |
| 1992 // Make sure to adjust for the number of in-object properties. These | 1990 // Make sure to adjust for the number of in-object properties. These |
| 1993 // properties do contribute to the size, but are not internal fields. | 1991 // properties do contribute to the size, but are not internal fields. |
| 1994 return ((Size() - GetHeaderSize()) >> kPointerSizeLog2) - | 1992 return ((Size() - GetHeaderSize()) >> kPointerSizeLog2) - |
| (...skipping 5536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7531 #undef READ_SHORT_FIELD | 7529 #undef READ_SHORT_FIELD |
| 7532 #undef WRITE_SHORT_FIELD | 7530 #undef WRITE_SHORT_FIELD |
| 7533 #undef READ_BYTE_FIELD | 7531 #undef READ_BYTE_FIELD |
| 7534 #undef WRITE_BYTE_FIELD | 7532 #undef WRITE_BYTE_FIELD |
| 7535 #undef NOBARRIER_READ_BYTE_FIELD | 7533 #undef NOBARRIER_READ_BYTE_FIELD |
| 7536 #undef NOBARRIER_WRITE_BYTE_FIELD | 7534 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7537 | 7535 |
| 7538 } } // namespace v8::internal | 7536 } } // namespace v8::internal |
| 7539 | 7537 |
| 7540 #endif // V8_OBJECTS_INL_H_ | 7538 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |