| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3660 static const int kInlinedFunctionCountIndex = 1; | 3660 static const int kInlinedFunctionCountIndex = 1; |
| 3661 static const int kLiteralArrayIndex = 2; | 3661 static const int kLiteralArrayIndex = 2; |
| 3662 static const int kOsrAstIdIndex = 3; | 3662 static const int kOsrAstIdIndex = 3; |
| 3663 static const int kOsrPcOffsetIndex = 4; | 3663 static const int kOsrPcOffsetIndex = 4; |
| 3664 static const int kFirstDeoptEntryIndex = 5; | 3664 static const int kFirstDeoptEntryIndex = 5; |
| 3665 | 3665 |
| 3666 // Offsets of deopt entry elements relative to the start of the entry. | 3666 // Offsets of deopt entry elements relative to the start of the entry. |
| 3667 static const int kAstIdOffset = 0; | 3667 static const int kAstIdOffset = 0; |
| 3668 static const int kTranslationIndexOffset = 1; | 3668 static const int kTranslationIndexOffset = 1; |
| 3669 static const int kArgumentsStackHeightOffset = 2; | 3669 static const int kArgumentsStackHeightOffset = 2; |
| 3670 static const int kDeoptEntrySize = 3; | 3670 static const int kPcOffset = 3; |
| 3671 static const int kDeoptEntrySize = 4; |
| 3671 | 3672 |
| 3672 // Simple element accessors. | 3673 // Simple element accessors. |
| 3673 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ | 3674 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ |
| 3674 type* name() { \ | 3675 type* name() { \ |
| 3675 return type::cast(get(k##name##Index)); \ | 3676 return type::cast(get(k##name##Index)); \ |
| 3676 } \ | 3677 } \ |
| 3677 void Set##name(type* value) { \ | 3678 void Set##name(type* value) { \ |
| 3678 set(k##name##Index, value); \ | 3679 set(k##name##Index, value); \ |
| 3679 } | 3680 } |
| 3680 | 3681 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3696 type* name(int i) { \ | 3697 type* name(int i) { \ |
| 3697 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ | 3698 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ |
| 3698 } \ | 3699 } \ |
| 3699 void Set##name(int i, type* value) { \ | 3700 void Set##name(int i, type* value) { \ |
| 3700 set(IndexForEntry(i) + k##name##Offset, value); \ | 3701 set(IndexForEntry(i) + k##name##Offset, value); \ |
| 3701 } | 3702 } |
| 3702 | 3703 |
| 3703 DEFINE_ENTRY_ACCESSORS(AstId, Smi) | 3704 DEFINE_ENTRY_ACCESSORS(AstId, Smi) |
| 3704 DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi) | 3705 DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi) |
| 3705 DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) | 3706 DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) |
| 3707 DEFINE_ENTRY_ACCESSORS(Pc, Smi) |
| 3706 | 3708 |
| 3707 #undef DEFINE_ENTRY_ACCESSORS | 3709 #undef DEFINE_ENTRY_ACCESSORS |
| 3708 | 3710 |
| 3709 int DeoptCount() { | 3711 int DeoptCount() { |
| 3710 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; | 3712 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; |
| 3711 } | 3713 } |
| 3712 | 3714 |
| 3713 // Allocates a DeoptimizationInputData. | 3715 // Allocates a DeoptimizationInputData. |
| 3714 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, | 3716 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, |
| 3715 PretenureFlag pretenure); | 3717 PretenureFlag pretenure); |
| (...skipping 4142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7858 } else { | 7860 } else { |
| 7859 value &= ~(1 << bit_position); | 7861 value &= ~(1 << bit_position); |
| 7860 } | 7862 } |
| 7861 return value; | 7863 return value; |
| 7862 } | 7864 } |
| 7863 }; | 7865 }; |
| 7864 | 7866 |
| 7865 } } // namespace v8::internal | 7867 } } // namespace v8::internal |
| 7866 | 7868 |
| 7867 #endif // V8_OBJECTS_H_ | 7869 #endif // V8_OBJECTS_H_ |
| OLD | NEW |