| 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 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 static const int kInlinedFunctionCountIndex = 1; | 3662 static const int kInlinedFunctionCountIndex = 1; |
| 3663 static const int kLiteralArrayIndex = 2; | 3663 static const int kLiteralArrayIndex = 2; |
| 3664 static const int kOsrAstIdIndex = 3; | 3664 static const int kOsrAstIdIndex = 3; |
| 3665 static const int kOsrPcOffsetIndex = 4; | 3665 static const int kOsrPcOffsetIndex = 4; |
| 3666 static const int kFirstDeoptEntryIndex = 5; | 3666 static const int kFirstDeoptEntryIndex = 5; |
| 3667 | 3667 |
| 3668 // Offsets of deopt entry elements relative to the start of the entry. | 3668 // Offsets of deopt entry elements relative to the start of the entry. |
| 3669 static const int kAstIdOffset = 0; | 3669 static const int kAstIdOffset = 0; |
| 3670 static const int kTranslationIndexOffset = 1; | 3670 static const int kTranslationIndexOffset = 1; |
| 3671 static const int kArgumentsStackHeightOffset = 2; | 3671 static const int kArgumentsStackHeightOffset = 2; |
| 3672 static const int kDeoptEntrySize = 3; | 3672 static const int kPcOffset = 3; |
| 3673 static const int kDeoptEntrySize = 4; |
| 3673 | 3674 |
| 3674 // Simple element accessors. | 3675 // Simple element accessors. |
| 3675 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ | 3676 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ |
| 3676 type* name() { \ | 3677 type* name() { \ |
| 3677 return type::cast(get(k##name##Index)); \ | 3678 return type::cast(get(k##name##Index)); \ |
| 3678 } \ | 3679 } \ |
| 3679 void Set##name(type* value) { \ | 3680 void Set##name(type* value) { \ |
| 3680 set(k##name##Index, value); \ | 3681 set(k##name##Index, value); \ |
| 3681 } | 3682 } |
| 3682 | 3683 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3698 type* name(int i) { \ | 3699 type* name(int i) { \ |
| 3699 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ | 3700 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ |
| 3700 } \ | 3701 } \ |
| 3701 void Set##name(int i, type* value) { \ | 3702 void Set##name(int i, type* value) { \ |
| 3702 set(IndexForEntry(i) + k##name##Offset, value); \ | 3703 set(IndexForEntry(i) + k##name##Offset, value); \ |
| 3703 } | 3704 } |
| 3704 | 3705 |
| 3705 DEFINE_ENTRY_ACCESSORS(AstId, Smi) | 3706 DEFINE_ENTRY_ACCESSORS(AstId, Smi) |
| 3706 DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi) | 3707 DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi) |
| 3707 DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) | 3708 DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) |
| 3709 DEFINE_ENTRY_ACCESSORS(Pc, Smi) |
| 3708 | 3710 |
| 3709 #undef DEFINE_ENTRY_ACCESSORS | 3711 #undef DEFINE_ENTRY_ACCESSORS |
| 3710 | 3712 |
| 3711 int DeoptCount() { | 3713 int DeoptCount() { |
| 3712 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; | 3714 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; |
| 3713 } | 3715 } |
| 3714 | 3716 |
| 3715 // Allocates a DeoptimizationInputData. | 3717 // Allocates a DeoptimizationInputData. |
| 3716 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, | 3718 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, |
| 3717 PretenureFlag pretenure); | 3719 PretenureFlag pretenure); |
| (...skipping 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7870 } else { | 7872 } else { |
| 7871 value &= ~(1 << bit_position); | 7873 value &= ~(1 << bit_position); |
| 7872 } | 7874 } |
| 7873 return value; | 7875 return value; |
| 7874 } | 7876 } |
| 7875 }; | 7877 }; |
| 7876 | 7878 |
| 7877 } } // namespace v8::internal | 7879 } } // namespace v8::internal |
| 7878 | 7880 |
| 7879 #endif // V8_OBJECTS_H_ | 7881 #endif // V8_OBJECTS_H_ |
| OLD | NEW |