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 4524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4535 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset) | 4535 SMI_ACCESSORS(SharedFunctionInfo, num_literals, kNumLiteralsOffset) |
4536 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type, | 4536 SMI_ACCESSORS(SharedFunctionInfo, start_position_and_type, |
4537 kStartPositionAndTypeOffset) | 4537 kStartPositionAndTypeOffset) |
4538 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) | 4538 SMI_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) |
4539 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, | 4539 SMI_ACCESSORS(SharedFunctionInfo, function_token_position, |
4540 kFunctionTokenPositionOffset) | 4540 kFunctionTokenPositionOffset) |
4541 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, | 4541 SMI_ACCESSORS(SharedFunctionInfo, compiler_hints, |
4542 kCompilerHintsOffset) | 4542 kCompilerHintsOffset) |
4543 SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset) | 4543 SMI_ACCESSORS(SharedFunctionInfo, opt_count, kOptCountOffset) |
4544 SMI_ACCESSORS(SharedFunctionInfo, counters, kCountersOffset) | 4544 SMI_ACCESSORS(SharedFunctionInfo, counters, kCountersOffset) |
4545 SMI_ACCESSORS(SharedFunctionInfo, | 4545 |
4546 stress_deopt_counter, | |
4547 kStressDeoptCounterOffset) | |
4548 #else | 4546 #else |
4549 | 4547 |
4550 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ | 4548 #define PSEUDO_SMI_ACCESSORS_LO(holder, name, offset) \ |
4551 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ | 4549 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ |
4552 int holder::name() { \ | 4550 int holder::name() { \ |
4553 int value = READ_INT_FIELD(this, offset); \ | 4551 int value = READ_INT_FIELD(this, offset); \ |
4554 ASSERT(kHeapObjectTag == 1); \ | 4552 ASSERT(kHeapObjectTag == 1); \ |
4555 ASSERT((value & kHeapObjectTag) == 0); \ | 4553 ASSERT((value & kHeapObjectTag) == 0); \ |
4556 return value >> 1; \ | 4554 return value >> 1; \ |
4557 } \ | 4555 } \ |
(...skipping 29 matching lines...) Expand all Loading... |
4587 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, | 4585 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, |
4588 function_token_position, | 4586 function_token_position, |
4589 kFunctionTokenPositionOffset) | 4587 kFunctionTokenPositionOffset) |
4590 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, | 4588 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, |
4591 compiler_hints, | 4589 compiler_hints, |
4592 kCompilerHintsOffset) | 4590 kCompilerHintsOffset) |
4593 | 4591 |
4594 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, opt_count, kOptCountOffset) | 4592 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, opt_count, kOptCountOffset) |
4595 | 4593 |
4596 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, counters, kCountersOffset) | 4594 PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, counters, kCountersOffset) |
4597 PSEUDO_SMI_ACCESSORS_LO(SharedFunctionInfo, | 4595 |
4598 stress_deopt_counter, | |
4599 kStressDeoptCounterOffset) | |
4600 #endif | 4596 #endif |
4601 | 4597 |
4602 | 4598 |
4603 int SharedFunctionInfo::construction_count() { | 4599 int SharedFunctionInfo::construction_count() { |
4604 return READ_BYTE_FIELD(this, kConstructionCountOffset); | 4600 return READ_BYTE_FIELD(this, kConstructionCountOffset); |
4605 } | 4601 } |
4606 | 4602 |
4607 | 4603 |
4608 void SharedFunctionInfo::set_construction_count(int value) { | 4604 void SharedFunctionInfo::set_construction_count(int value) { |
4609 ASSERT(0 <= value && value < 256); | 4605 ASSERT(0 <= value && value < 256); |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6184 #undef WRITE_UINT32_FIELD | 6180 #undef WRITE_UINT32_FIELD |
6185 #undef READ_SHORT_FIELD | 6181 #undef READ_SHORT_FIELD |
6186 #undef WRITE_SHORT_FIELD | 6182 #undef WRITE_SHORT_FIELD |
6187 #undef READ_BYTE_FIELD | 6183 #undef READ_BYTE_FIELD |
6188 #undef WRITE_BYTE_FIELD | 6184 #undef WRITE_BYTE_FIELD |
6189 | 6185 |
6190 | 6186 |
6191 } } // namespace v8::internal | 6187 } } // namespace v8::internal |
6192 | 6188 |
6193 #endif // V8_OBJECTS_INL_H_ | 6189 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |