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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 }; | 304 }; |
305 | 305 |
306 // ICs store extra state in a Code object. The default extra state is | 306 // ICs store extra state in a Code object. The default extra state is |
307 // kNoExtraICState. | 307 // kNoExtraICState. |
308 typedef int ExtraICState; | 308 typedef int ExtraICState; |
309 static const ExtraICState kNoExtraICState = 0; | 309 static const ExtraICState kNoExtraICState = 0; |
310 | 310 |
311 // Instance size sentinel for objects of variable size. | 311 // Instance size sentinel for objects of variable size. |
312 const int kVariableSizeSentinel = 0; | 312 const int kVariableSizeSentinel = 0; |
313 | 313 |
314 const int kStubMajorKeyBits = 6; | 314 const int kStubMajorKeyBits = 7; |
315 const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; | 315 const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits; |
316 | 316 |
317 // All Maps have a field instance_type containing a InstanceType. | 317 // All Maps have a field instance_type containing a InstanceType. |
318 // It describes the type of the instances. | 318 // It describes the type of the instances. |
319 // | 319 // |
320 // As an example, a JavaScript object is a heap object and its map | 320 // As an example, a JavaScript object is a heap object and its map |
321 // instance_type is JS_OBJECT_TYPE. | 321 // instance_type is JS_OBJECT_TYPE. |
322 // | 322 // |
323 // The names of the string instance types are intended to systematically | 323 // The names of the string instance types are intended to systematically |
324 // mirror their encoding in the instance_type field of the map. The default | 324 // mirror their encoding in the instance_type field of the map. The default |
(...skipping 5152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5477 | 5477 |
5478 // KindSpecificFlags2 layout (ALL) | 5478 // KindSpecificFlags2 layout (ALL) |
5479 static const int kIsCrankshaftedBit = 0; | 5479 static const int kIsCrankshaftedBit = 0; |
5480 class IsCrankshaftedField: public BitField<bool, | 5480 class IsCrankshaftedField: public BitField<bool, |
5481 kIsCrankshaftedBit, 1> {}; // NOLINT | 5481 kIsCrankshaftedBit, 1> {}; // NOLINT |
5482 | 5482 |
5483 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) | 5483 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
5484 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; | 5484 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; |
5485 static const int kSafepointTableOffsetFirstBit = | 5485 static const int kSafepointTableOffsetFirstBit = |
5486 kStubMajorKeyFirstBit + kStubMajorKeyBits; | 5486 kStubMajorKeyFirstBit + kStubMajorKeyBits; |
5487 static const int kSafepointTableOffsetBitCount = 25; | 5487 static const int kSafepointTableOffsetBitCount = 24; |
5488 | 5488 |
5489 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32); | 5489 STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32); |
5490 STATIC_ASSERT(kSafepointTableOffsetFirstBit + | 5490 STATIC_ASSERT(kSafepointTableOffsetFirstBit + |
5491 kSafepointTableOffsetBitCount <= 32); | 5491 kSafepointTableOffsetBitCount <= 32); |
5492 STATIC_ASSERT(1 + kStubMajorKeyBits + | 5492 STATIC_ASSERT(1 + kStubMajorKeyBits + |
5493 kSafepointTableOffsetBitCount <= 32); | 5493 kSafepointTableOffsetBitCount <= 32); |
5494 | 5494 |
5495 class SafepointTableOffsetField: public BitField<int, | 5495 class SafepointTableOffsetField: public BitField<int, |
5496 kSafepointTableOffsetFirstBit, | 5496 kSafepointTableOffsetFirstBit, |
5497 kSafepointTableOffsetBitCount> {}; // NOLINT | 5497 kSafepointTableOffsetBitCount> {}; // NOLINT |
(...skipping 5108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10606 } else { | 10606 } else { |
10607 value &= ~(1 << bit_position); | 10607 value &= ~(1 << bit_position); |
10608 } | 10608 } |
10609 return value; | 10609 return value; |
10610 } | 10610 } |
10611 }; | 10611 }; |
10612 | 10612 |
10613 } } // namespace v8::internal | 10613 } } // namespace v8::internal |
10614 | 10614 |
10615 #endif // V8_OBJECTS_H_ | 10615 #endif // V8_OBJECTS_H_ |
OLD | NEW |