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 5472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5483 | 5483 |
5484 void ResetForNewContext(int new_ic_age); | 5484 void ResetForNewContext(int new_ic_age); |
5485 | 5485 |
5486 // Helpers to compile the shared code. Returns true on success, false on | 5486 // Helpers to compile the shared code. Returns true on success, false on |
5487 // failure (e.g., stack overflow during compilation). | 5487 // failure (e.g., stack overflow during compilation). |
5488 static bool EnsureCompiled(Handle<SharedFunctionInfo> shared, | 5488 static bool EnsureCompiled(Handle<SharedFunctionInfo> shared, |
5489 ClearExceptionFlag flag); | 5489 ClearExceptionFlag flag); |
5490 static bool CompileLazy(Handle<SharedFunctionInfo> shared, | 5490 static bool CompileLazy(Handle<SharedFunctionInfo> shared, |
5491 ClearExceptionFlag flag); | 5491 ClearExceptionFlag flag); |
5492 | 5492 |
| 5493 void SharedFunctionInfoIterateBody(ObjectVisitor* v); |
| 5494 |
5493 // Casting. | 5495 // Casting. |
5494 static inline SharedFunctionInfo* cast(Object* obj); | 5496 static inline SharedFunctionInfo* cast(Object* obj); |
5495 | 5497 |
5496 // Constants. | 5498 // Constants. |
5497 static const int kDontAdaptArgumentsSentinel = -1; | 5499 static const int kDontAdaptArgumentsSentinel = -1; |
5498 | 5500 |
5499 // Layout description. | 5501 // Layout description. |
5500 // Pointer fields. | 5502 // Pointer fields. |
5501 static const int kNameOffset = HeapObject::kHeaderSize; | 5503 static const int kNameOffset = HeapObject::kHeaderSize; |
5502 static const int kCodeOffset = kNameOffset + kPointerSize; | 5504 static const int kCodeOffset = kNameOffset + kPointerSize; |
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8531 | 8533 |
8532 // Visits a debug call target in the instruction stream. | 8534 // Visits a debug call target in the instruction stream. |
8533 virtual void VisitDebugTarget(RelocInfo* rinfo); | 8535 virtual void VisitDebugTarget(RelocInfo* rinfo); |
8534 | 8536 |
8535 // Handy shorthand for visiting a single pointer. | 8537 // Handy shorthand for visiting a single pointer. |
8536 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); } | 8538 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); } |
8537 | 8539 |
8538 // Visit pointer embedded into a code object. | 8540 // Visit pointer embedded into a code object. |
8539 virtual void VisitEmbeddedPointer(RelocInfo* rinfo); | 8541 virtual void VisitEmbeddedPointer(RelocInfo* rinfo); |
8540 | 8542 |
| 8543 virtual void VisitSharedFunctionInfo(SharedFunctionInfo* shared); |
| 8544 |
8541 // Visits a contiguous arrays of external references (references to the C++ | 8545 // Visits a contiguous arrays of external references (references to the C++ |
8542 // heap) in the half-open range [start, end). Any or all of the values | 8546 // heap) in the half-open range [start, end). Any or all of the values |
8543 // may be modified on return. | 8547 // may be modified on return. |
8544 virtual void VisitExternalReferences(Address* start, Address* end) {} | 8548 virtual void VisitExternalReferences(Address* start, Address* end) {} |
8545 | 8549 |
8546 virtual void VisitExternalReference(RelocInfo* rinfo); | 8550 virtual void VisitExternalReference(RelocInfo* rinfo); |
8547 | 8551 |
8548 inline void VisitExternalReference(Address* p) { | 8552 inline void VisitExternalReference(Address* p) { |
8549 VisitExternalReferences(p, p + 1); | 8553 VisitExternalReferences(p, p + 1); |
8550 } | 8554 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8590 } else { | 8594 } else { |
8591 value &= ~(1 << bit_position); | 8595 value &= ~(1 << bit_position); |
8592 } | 8596 } |
8593 return value; | 8597 return value; |
8594 } | 8598 } |
8595 }; | 8599 }; |
8596 | 8600 |
8597 } } // namespace v8::internal | 8601 } } // namespace v8::internal |
8598 | 8602 |
8599 #endif // V8_OBJECTS_H_ | 8603 #endif // V8_OBJECTS_H_ |
OLD | NEW |