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 4920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4931 // | 4931 // |
4932 // It can be empty. | 4932 // It can be empty. |
4933 class DeoptimizationInputData: public FixedArray { | 4933 class DeoptimizationInputData: public FixedArray { |
4934 public: | 4934 public: |
4935 // Layout description. Indices in the array. | 4935 // Layout description. Indices in the array. |
4936 static const int kTranslationByteArrayIndex = 0; | 4936 static const int kTranslationByteArrayIndex = 0; |
4937 static const int kInlinedFunctionCountIndex = 1; | 4937 static const int kInlinedFunctionCountIndex = 1; |
4938 static const int kLiteralArrayIndex = 2; | 4938 static const int kLiteralArrayIndex = 2; |
4939 static const int kOsrAstIdIndex = 3; | 4939 static const int kOsrAstIdIndex = 3; |
4940 static const int kOsrPcOffsetIndex = 4; | 4940 static const int kOsrPcOffsetIndex = 4; |
4941 static const int kFirstDeoptEntryIndex = 5; | 4941 static const int kOptimizationIdIndex = 5; |
Vyacheslav Egorov (Chromium)
2014/01/29 16:41:36
Rest of the change introduces no overhead unless F
| |
4942 static const int kFirstDeoptEntryIndex = 6; | |
4942 | 4943 |
4943 // Offsets of deopt entry elements relative to the start of the entry. | 4944 // Offsets of deopt entry elements relative to the start of the entry. |
4944 static const int kAstIdRawOffset = 0; | 4945 static const int kAstIdRawOffset = 0; |
4945 static const int kTranslationIndexOffset = 1; | 4946 static const int kTranslationIndexOffset = 1; |
4946 static const int kArgumentsStackHeightOffset = 2; | 4947 static const int kArgumentsStackHeightOffset = 2; |
4947 static const int kPcOffset = 3; | 4948 static const int kPcOffset = 3; |
4948 static const int kDeoptEntrySize = 4; | 4949 static const int kDeoptEntrySize = 4; |
4949 | 4950 |
4950 // Simple element accessors. | 4951 // Simple element accessors. |
4951 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ | 4952 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ |
4952 type* name() { \ | 4953 type* name() { \ |
4953 return type::cast(get(k##name##Index)); \ | 4954 return type::cast(get(k##name##Index)); \ |
4954 } \ | 4955 } \ |
4955 void Set##name(type* value) { \ | 4956 void Set##name(type* value) { \ |
4956 set(k##name##Index, value); \ | 4957 set(k##name##Index, value); \ |
4957 } | 4958 } |
4958 | 4959 |
4959 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) | 4960 DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray) |
4960 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) | 4961 DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi) |
4961 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) | 4962 DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray) |
4962 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi) | 4963 DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi) |
4963 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) | 4964 DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi) |
4965 DEFINE_ELEMENT_ACCESSORS(OptimizationId, Smi) | |
4964 | 4966 |
4965 #undef DEFINE_ELEMENT_ACCESSORS | 4967 #undef DEFINE_ELEMENT_ACCESSORS |
4966 | 4968 |
4967 // Accessors for elements of the ith deoptimization entry. | 4969 // Accessors for elements of the ith deoptimization entry. |
4968 #define DEFINE_ENTRY_ACCESSORS(name, type) \ | 4970 #define DEFINE_ENTRY_ACCESSORS(name, type) \ |
4969 type* name(int i) { \ | 4971 type* name(int i) { \ |
4970 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ | 4972 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ |
4971 } \ | 4973 } \ |
4972 void Set##name(int i, type* value) { \ | 4974 void Set##name(int i, type* value) { \ |
4973 set(IndexForEntry(i) + k##name##Offset, value); \ | 4975 set(IndexForEntry(i) + k##name##Offset, value); \ |
(...skipping 5782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10756 } else { | 10758 } else { |
10757 value &= ~(1 << bit_position); | 10759 value &= ~(1 << bit_position); |
10758 } | 10760 } |
10759 return value; | 10761 return value; |
10760 } | 10762 } |
10761 }; | 10763 }; |
10762 | 10764 |
10763 } } // namespace v8::internal | 10765 } } // namespace v8::internal |
10764 | 10766 |
10765 #endif // V8_OBJECTS_H_ | 10767 #endif // V8_OBJECTS_H_ |
OLD | NEW |