| 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 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3461 static const int kInlinedFunctionCountIndex = 1; | 3461 static const int kInlinedFunctionCountIndex = 1; |
| 3462 static const int kLiteralArrayIndex = 2; | 3462 static const int kLiteralArrayIndex = 2; |
| 3463 static const int kOsrAstIdIndex = 3; | 3463 static const int kOsrAstIdIndex = 3; |
| 3464 static const int kOsrPcOffsetIndex = 4; | 3464 static const int kOsrPcOffsetIndex = 4; |
| 3465 static const int kFirstDeoptEntryIndex = 5; | 3465 static const int kFirstDeoptEntryIndex = 5; |
| 3466 | 3466 |
| 3467 // Offsets of deopt entry elements relative to the start of the entry. | 3467 // Offsets of deopt entry elements relative to the start of the entry. |
| 3468 static const int kAstIdOffset = 0; | 3468 static const int kAstIdOffset = 0; |
| 3469 static const int kTranslationIndexOffset = 1; | 3469 static const int kTranslationIndexOffset = 1; |
| 3470 static const int kArgumentsStackHeightOffset = 2; | 3470 static const int kArgumentsStackHeightOffset = 2; |
| 3471 static const int kDeoptEntrySize = 3; | 3471 static const int kPcOffset = 3; |
| 3472 static const int kDeoptEntrySize = 4; |
| 3472 | 3473 |
| 3473 // Simple element accessors. | 3474 // Simple element accessors. |
| 3474 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ | 3475 #define DEFINE_ELEMENT_ACCESSORS(name, type) \ |
| 3475 type* name() { \ | 3476 type* name() { \ |
| 3476 return type::cast(get(k##name##Index)); \ | 3477 return type::cast(get(k##name##Index)); \ |
| 3477 } \ | 3478 } \ |
| 3478 void Set##name(type* value) { \ | 3479 void Set##name(type* value) { \ |
| 3479 set(k##name##Index, value); \ | 3480 set(k##name##Index, value); \ |
| 3480 } | 3481 } |
| 3481 | 3482 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3497 type* name(int i) { \ | 3498 type* name(int i) { \ |
| 3498 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ | 3499 return type::cast(get(IndexForEntry(i) + k##name##Offset)); \ |
| 3499 } \ | 3500 } \ |
| 3500 void Set##name(int i, type* value) { \ | 3501 void Set##name(int i, type* value) { \ |
| 3501 set(IndexForEntry(i) + k##name##Offset, value); \ | 3502 set(IndexForEntry(i) + k##name##Offset, value); \ |
| 3502 } | 3503 } |
| 3503 | 3504 |
| 3504 DEFINE_ENTRY_ACCESSORS(AstId, Smi) | 3505 DEFINE_ENTRY_ACCESSORS(AstId, Smi) |
| 3505 DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi) | 3506 DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi) |
| 3506 DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) | 3507 DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi) |
| 3508 DEFINE_ENTRY_ACCESSORS(Pc, Smi) |
| 3507 | 3509 |
| 3508 #undef DEFINE_ENTRY_ACCESSORS | 3510 #undef DEFINE_ENTRY_ACCESSORS |
| 3509 | 3511 |
| 3510 int DeoptCount() { | 3512 int DeoptCount() { |
| 3511 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; | 3513 return (length() - kFirstDeoptEntryIndex) / kDeoptEntrySize; |
| 3512 } | 3514 } |
| 3513 | 3515 |
| 3514 // Allocates a DeoptimizationInputData. | 3516 // Allocates a DeoptimizationInputData. |
| 3515 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, | 3517 MUST_USE_RESULT static MaybeObject* Allocate(int deopt_entry_count, |
| 3516 PretenureFlag pretenure); | 3518 PretenureFlag pretenure); |
| (...skipping 3981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7498 } else { | 7500 } else { |
| 7499 value &= ~(1 << bit_position); | 7501 value &= ~(1 << bit_position); |
| 7500 } | 7502 } |
| 7501 return value; | 7503 return value; |
| 7502 } | 7504 } |
| 7503 }; | 7505 }; |
| 7504 | 7506 |
| 7505 } } // namespace v8::internal | 7507 } } // namespace v8::internal |
| 7506 | 7508 |
| 7507 #endif // V8_OBJECTS_H_ | 7509 #endif // V8_OBJECTS_H_ |
| OLD | NEW |