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 5230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5241 inline bool is_handler() { return kind() == HANDLER; } | 5241 inline bool is_handler() { return kind() == HANDLER; } |
5242 inline bool is_load_stub() { return kind() == LOAD_IC; } | 5242 inline bool is_load_stub() { return kind() == LOAD_IC; } |
5243 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } | 5243 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } |
5244 inline bool is_store_stub() { return kind() == STORE_IC; } | 5244 inline bool is_store_stub() { return kind() == STORE_IC; } |
5245 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } | 5245 inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } |
5246 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } | 5246 inline bool is_binary_op_stub() { return kind() == BINARY_OP_IC; } |
5247 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } | 5247 inline bool is_compare_ic_stub() { return kind() == COMPARE_IC; } |
5248 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } | 5248 inline bool is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; } |
5249 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } | 5249 inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } |
5250 inline bool is_keyed_stub(); | 5250 inline bool is_keyed_stub(); |
5251 inline bool is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; } | |
5251 | 5252 |
5252 inline void set_raw_kind_specific_flags1(int value); | 5253 inline void set_raw_kind_specific_flags1(int value); |
5253 inline void set_raw_kind_specific_flags2(int value); | 5254 inline void set_raw_kind_specific_flags2(int value); |
5254 | 5255 |
5255 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. | 5256 // [major_key]: For kind STUB or BINARY_OP_IC, the major key. |
5256 inline int major_key(); | 5257 inline int major_key(); |
5257 inline void set_major_key(int value); | 5258 inline void set_major_key(int value); |
5258 inline bool has_major_key(); | 5259 inline bool has_major_key(); |
5259 | 5260 |
5260 // For kind STUB or ICs, tells whether or not a code object was generated by | 5261 // For kind STUB or ICs, tells whether or not a code object was generated by |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5496 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); | 5497 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); |
5497 } | 5498 } |
5498 | 5499 |
5499 void PrintDeoptLocation(FILE* out, int bailout_id); | 5500 void PrintDeoptLocation(FILE* out, int bailout_id); |
5500 bool CanDeoptAt(Address pc); | 5501 bool CanDeoptAt(Address pc); |
5501 | 5502 |
5502 #ifdef VERIFY_HEAP | 5503 #ifdef VERIFY_HEAP |
5503 void VerifyEmbeddedObjectsDependency(); | 5504 void VerifyEmbeddedObjectsDependency(); |
5504 #endif | 5505 #endif |
5505 | 5506 |
5506 static bool IsWeakEmbeddedObject(Kind kind, Object* object); | 5507 inline bool IsWeakObject(Object* object) { |
5508 if (is_optimized_code()) return IsWeakObjectInOptimizedCode(object); | |
Sven Panne
2014/02/19 12:38:40
return is_optimized_code() && IsWeakObjectInOptimi
| |
5509 return false; | |
5510 } | |
5511 | |
5512 inline bool IsWeakObjectInOptimizedCode(Object* object); | |
5507 | 5513 |
5508 // Max loop nesting marker used to postpose OSR. We don't take loop | 5514 // Max loop nesting marker used to postpose OSR. We don't take loop |
5509 // nesting that is deeper than 5 levels into account. | 5515 // nesting that is deeper than 5 levels into account. |
5510 static const int kMaxLoopNestingMarker = 6; | 5516 static const int kMaxLoopNestingMarker = 6; |
5511 | 5517 |
5512 // Layout description. | 5518 // Layout description. |
5513 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; | 5519 static const int kInstructionSizeOffset = HeapObject::kHeaderSize; |
5514 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; | 5520 static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize; |
5515 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; | 5521 static const int kHandlerTableOffset = kRelocationInfoOffset + kPointerSize; |
5516 static const int kDeoptimizationDataOffset = | 5522 static const int kDeoptimizationDataOffset = |
(...skipping 5252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10769 } else { | 10775 } else { |
10770 value &= ~(1 << bit_position); | 10776 value &= ~(1 << bit_position); |
10771 } | 10777 } |
10772 return value; | 10778 return value; |
10773 } | 10779 } |
10774 }; | 10780 }; |
10775 | 10781 |
10776 } } // namespace v8::internal | 10782 } } // namespace v8::internal |
10777 | 10783 |
10778 #endif // V8_OBJECTS_H_ | 10784 #endif // V8_OBJECTS_H_ |
OLD | NEW |