| 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 4285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4296 DECL_ACCESSORS(relocation_info, ByteArray) | 4296 DECL_ACCESSORS(relocation_info, ByteArray) |
| 4297 void InvalidateRelocation(); | 4297 void InvalidateRelocation(); |
| 4298 | 4298 |
| 4299 // [handler_table]: Fixed array containing offsets of exception handlers. | 4299 // [handler_table]: Fixed array containing offsets of exception handlers. |
| 4300 DECL_ACCESSORS(handler_table, FixedArray) | 4300 DECL_ACCESSORS(handler_table, FixedArray) |
| 4301 | 4301 |
| 4302 // [deoptimization_data]: Array containing data for deopt. | 4302 // [deoptimization_data]: Array containing data for deopt. |
| 4303 DECL_ACCESSORS(deoptimization_data, FixedArray) | 4303 DECL_ACCESSORS(deoptimization_data, FixedArray) |
| 4304 | 4304 |
| 4305 // [type_feedback_info]: Struct containing type feedback information. | 4305 // [type_feedback_info]: Struct containing type feedback information. |
| 4306 // Will contain either a TypeFeedbackInfo object, or undefined. | 4306 // STUBs can use this slot to store arbitrary information as a Smi. |
| 4307 // Will contain either a TypeFeedbackInfo object, or undefined, or a Smi. |
| 4307 DECL_ACCESSORS(type_feedback_info, Object) | 4308 DECL_ACCESSORS(type_feedback_info, Object) |
| 4309 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value); |
| 4310 inline int stub_info(); |
| 4311 inline void set_stub_info(int info); |
| 4308 | 4312 |
| 4309 // [gc_metadata]: Field used to hold GC related metadata. The contents of this | 4313 // [gc_metadata]: Field used to hold GC related metadata. The contents of this |
| 4310 // field does not have to be traced during garbage collection since | 4314 // field does not have to be traced during garbage collection since |
| 4311 // it is only used by the garbage collector itself. | 4315 // it is only used by the garbage collector itself. |
| 4312 DECL_ACCESSORS(gc_metadata, Object) | 4316 DECL_ACCESSORS(gc_metadata, Object) |
| 4313 | 4317 |
| 4314 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age | 4318 // [ic_age]: Inline caching age: the value of the Heap::global_ic_age |
| 4315 // at the moment when this object was created. | 4319 // at the moment when this object was created. |
| 4316 inline void set_ic_age(int count); | 4320 inline void set_ic_age(int count); |
| 4317 inline int ic_age(); | 4321 inline int ic_age(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4403 | 4407 |
| 4404 // [check type]: For kind CALL_IC, tells how to check if the | 4408 // [check type]: For kind CALL_IC, tells how to check if the |
| 4405 // receiver is valid for the given call. | 4409 // receiver is valid for the given call. |
| 4406 inline CheckType check_type(); | 4410 inline CheckType check_type(); |
| 4407 inline void set_check_type(CheckType value); | 4411 inline void set_check_type(CheckType value); |
| 4408 | 4412 |
| 4409 // [type-recording unary op type]: For kind UNARY_OP_IC. | 4413 // [type-recording unary op type]: For kind UNARY_OP_IC. |
| 4410 inline byte unary_op_type(); | 4414 inline byte unary_op_type(); |
| 4411 inline void set_unary_op_type(byte value); | 4415 inline void set_unary_op_type(byte value); |
| 4412 | 4416 |
| 4413 // [type-recording binary op type]: For kind BINARY_OP_IC. | |
| 4414 inline byte binary_op_type(); | |
| 4415 inline void set_binary_op_type(byte value); | |
| 4416 inline byte binary_op_result_type(); | |
| 4417 inline void set_binary_op_result_type(byte value); | |
| 4418 | |
| 4419 // [compare state]: For kind COMPARE_IC, tells what state the stub is in. | |
| 4420 inline byte compare_state(); | |
| 4421 inline void set_compare_state(byte value); | |
| 4422 | |
| 4423 // [compare_operation]: For kind COMPARE_IC tells what compare operation the | |
| 4424 // stub was generated for. | |
| 4425 inline byte compare_operation(); | |
| 4426 inline void set_compare_operation(byte value); | |
| 4427 | |
| 4428 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. | 4417 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. |
| 4429 inline byte to_boolean_state(); | 4418 inline byte to_boolean_state(); |
| 4430 inline void set_to_boolean_state(byte value); | 4419 inline void set_to_boolean_state(byte value); |
| 4431 | 4420 |
| 4432 // [has_function_cache]: For kind STUB tells whether there is a function | 4421 // [has_function_cache]: For kind STUB tells whether there is a function |
| 4433 // cache is passed to the stub. | 4422 // cache is passed to the stub. |
| 4434 inline bool has_function_cache(); | 4423 inline bool has_function_cache(); |
| 4435 inline void set_has_function_cache(bool flag); | 4424 inline void set_has_function_cache(bool flag); |
| 4436 | 4425 |
| 4437 bool allowed_in_shared_map_code_cache(); | 4426 bool allowed_in_shared_map_code_cache(); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4627 class KindField: public BitField<Kind, 7, 4> {}; | 4616 class KindField: public BitField<Kind, 7, 4> {}; |
| 4628 class ExtraICStateField: public BitField<ExtraICState, 11, 2> {}; | 4617 class ExtraICStateField: public BitField<ExtraICState, 11, 2> {}; |
| 4629 class IsPregeneratedField: public BitField<bool, 13, 1> {}; | 4618 class IsPregeneratedField: public BitField<bool, 13, 1> {}; |
| 4630 | 4619 |
| 4631 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) | 4620 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) |
| 4632 static const int kStackSlotsFirstBit = 0; | 4621 static const int kStackSlotsFirstBit = 0; |
| 4633 static const int kStackSlotsBitCount = 24; | 4622 static const int kStackSlotsBitCount = 24; |
| 4634 static const int kUnaryOpTypeFirstBit = | 4623 static const int kUnaryOpTypeFirstBit = |
| 4635 kStackSlotsFirstBit + kStackSlotsBitCount; | 4624 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 4636 static const int kUnaryOpTypeBitCount = 3; | 4625 static const int kUnaryOpTypeBitCount = 3; |
| 4637 static const int kBinaryOpTypeFirstBit = | |
| 4638 kStackSlotsFirstBit + kStackSlotsBitCount; | |
| 4639 static const int kBinaryOpTypeBitCount = 3; | |
| 4640 static const int kBinaryOpResultTypeFirstBit = | |
| 4641 kBinaryOpTypeFirstBit + kBinaryOpTypeBitCount; | |
| 4642 static const int kBinaryOpResultTypeBitCount = 3; | |
| 4643 static const int kCompareStateFirstBit = | |
| 4644 kStackSlotsFirstBit + kStackSlotsBitCount; | |
| 4645 static const int kCompareStateBitCount = 3; | |
| 4646 static const int kCompareOperationFirstBit = | |
| 4647 kCompareStateFirstBit + kCompareStateBitCount; | |
| 4648 static const int kCompareOperationBitCount = 4; | |
| 4649 static const int kToBooleanStateFirstBit = | 4626 static const int kToBooleanStateFirstBit = |
| 4650 kStackSlotsFirstBit + kStackSlotsBitCount; | 4627 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 4651 static const int kToBooleanStateBitCount = 8; | 4628 static const int kToBooleanStateBitCount = 8; |
| 4652 static const int kHasFunctionCacheFirstBit = | 4629 static const int kHasFunctionCacheFirstBit = |
| 4653 kStackSlotsFirstBit + kStackSlotsBitCount; | 4630 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 4654 static const int kHasFunctionCacheBitCount = 1; | 4631 static const int kHasFunctionCacheBitCount = 1; |
| 4655 | 4632 |
| 4656 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 4633 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
| 4657 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32); | 4634 STATIC_ASSERT(kUnaryOpTypeFirstBit + kUnaryOpTypeBitCount <= 32); |
| 4658 STATIC_ASSERT(kBinaryOpTypeFirstBit + kBinaryOpTypeBitCount <= 32); | |
| 4659 STATIC_ASSERT(kBinaryOpResultTypeFirstBit + | |
| 4660 kBinaryOpResultTypeBitCount <= 32); | |
| 4661 STATIC_ASSERT(kCompareStateFirstBit + kCompareStateBitCount <= 32); | |
| 4662 STATIC_ASSERT(kCompareOperationFirstBit + kCompareOperationBitCount <= 32); | |
| 4663 STATIC_ASSERT(kToBooleanStateFirstBit + kToBooleanStateBitCount <= 32); | 4635 STATIC_ASSERT(kToBooleanStateFirstBit + kToBooleanStateBitCount <= 32); |
| 4664 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); | 4636 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); |
| 4665 | 4637 |
| 4666 class StackSlotsField: public BitField<int, | 4638 class StackSlotsField: public BitField<int, |
| 4667 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT | 4639 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT |
| 4668 class UnaryOpTypeField: public BitField<int, | 4640 class UnaryOpTypeField: public BitField<int, |
| 4669 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT | 4641 kUnaryOpTypeFirstBit, kUnaryOpTypeBitCount> {}; // NOLINT |
| 4670 class BinaryOpTypeField: public BitField<int, | |
| 4671 kBinaryOpTypeFirstBit, kBinaryOpTypeBitCount> {}; // NOLINT | |
| 4672 class BinaryOpResultTypeField: public BitField<int, | |
| 4673 kBinaryOpResultTypeFirstBit, kBinaryOpResultTypeBitCount> {}; // NOLINT | |
| 4674 class CompareStateField: public BitField<int, | |
| 4675 kCompareStateFirstBit, kCompareStateBitCount> {}; // NOLINT | |
| 4676 class CompareOperationField: public BitField<int, | |
| 4677 kCompareOperationFirstBit, kCompareOperationBitCount> {}; // NOLINT | |
| 4678 class ToBooleanStateField: public BitField<int, | 4642 class ToBooleanStateField: public BitField<int, |
| 4679 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT | 4643 kToBooleanStateFirstBit, kToBooleanStateBitCount> {}; // NOLINT |
| 4680 class HasFunctionCacheField: public BitField<bool, | 4644 class HasFunctionCacheField: public BitField<bool, |
| 4681 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT | 4645 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT |
| 4682 | 4646 |
| 4683 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) | 4647 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
| 4684 static const int kStubMajorKeyFirstBit = 0; | 4648 static const int kStubMajorKeyFirstBit = 0; |
| 4685 static const int kSafepointTableOffsetFirstBit = | 4649 static const int kSafepointTableOffsetFirstBit = |
| 4686 kStubMajorKeyFirstBit + kStubMajorKeyBits; | 4650 kStubMajorKeyFirstBit + kStubMajorKeyBits; |
| 4687 static const int kSafepointTableOffsetBitCount = 26; | 4651 static const int kSafepointTableOffsetBitCount = 26; |
| (...skipping 4345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9033 } else { | 8997 } else { |
| 9034 value &= ~(1 << bit_position); | 8998 value &= ~(1 << bit_position); |
| 9035 } | 8999 } |
| 9036 return value; | 9000 return value; |
| 9037 } | 9001 } |
| 9038 }; | 9002 }; |
| 9039 | 9003 |
| 9040 } } // namespace v8::internal | 9004 } } // namespace v8::internal |
| 9041 | 9005 |
| 9042 #endif // V8_OBJECTS_H_ | 9006 #endif // V8_OBJECTS_H_ |
| OLD | NEW |