| Index: src/frames.h
|
| ===================================================================
|
| --- src/frames.h (revision 9531)
|
| +++ src/frames.h (working copy)
|
| @@ -49,36 +49,36 @@
|
| class ThreadLocalTop;
|
| class Isolate;
|
|
|
| -class PcToCodeCache {
|
| +class InnerPointerToCodeCache {
|
| public:
|
| - struct PcToCodeCacheEntry {
|
| - Address pc;
|
| + struct InnerPointerToCodeCacheEntry {
|
| + Address inner_pointer;
|
| Code* code;
|
| SafepointEntry safepoint_entry;
|
| };
|
|
|
| - explicit PcToCodeCache(Isolate* isolate) : isolate_(isolate) {
|
| + explicit InnerPointerToCodeCache(Isolate* isolate) : isolate_(isolate) {
|
| Flush();
|
| }
|
|
|
| - Code* GcSafeFindCodeForPc(Address pc);
|
| - Code* GcSafeCastToCode(HeapObject* object, Address pc);
|
| + Code* GcSafeFindCodeForInnerPointer(Address inner_pointer);
|
| + Code* GcSafeCastToCode(HeapObject* object, Address inner_pointer);
|
|
|
| void Flush() {
|
| memset(&cache_[0], 0, sizeof(cache_));
|
| }
|
|
|
| - PcToCodeCacheEntry* GetCacheEntry(Address pc);
|
| + InnerPointerToCodeCacheEntry* GetCacheEntry(Address inner_pointer);
|
|
|
| private:
|
| - PcToCodeCacheEntry* cache(int index) { return &cache_[index]; }
|
| + InnerPointerToCodeCacheEntry* cache(int index) { return &cache_[index]; }
|
|
|
| Isolate* isolate_;
|
|
|
| - static const int kPcToCodeCacheSize = 1024;
|
| - PcToCodeCacheEntry cache_[kPcToCodeCacheSize];
|
| + static const int kInnerPointerToCodeCacheSize = 1024;
|
| + InnerPointerToCodeCacheEntry cache_[kInnerPointerToCodeCacheSize];
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(PcToCodeCache);
|
| + DISALLOW_COPY_AND_ASSIGN(InnerPointerToCodeCache);
|
| };
|
|
|
|
|
| @@ -106,9 +106,9 @@
|
| static inline StackHandler* FromAddress(Address address);
|
|
|
| // Testers
|
| - bool is_entry() { return state() == ENTRY; }
|
| - bool is_try_catch() { return state() == TRY_CATCH; }
|
| - bool is_try_finally() { return state() == TRY_FINALLY; }
|
| + inline bool is_entry() const;
|
| + inline bool is_try_catch() const;
|
| + inline bool is_try_finally() const;
|
|
|
| private:
|
| // Accessors.
|
| @@ -139,7 +139,10 @@
|
| enum Type {
|
| NONE = 0,
|
| STACK_FRAME_TYPE_LIST(DECLARE_TYPE)
|
| - NUMBER_OF_TYPES
|
| + NUMBER_OF_TYPES,
|
| + // Used by FrameScope to indicate that the stack frame is constructed
|
| + // manually and the FrameScope does not need to emit code.
|
| + MANUAL
|
| };
|
| #undef DECLARE_TYPE
|
|
|
| @@ -215,9 +218,7 @@
|
| virtual Code* unchecked_code() const = 0;
|
|
|
| // Get the code associated with this frame.
|
| - Code* LookupCode() const {
|
| - return GetContainingCode(isolate(), pc());
|
| - }
|
| + inline Code* LookupCode() const;
|
|
|
| // Get the code object that contains the given pc.
|
| static inline Code* GetContainingCode(Isolate* isolate, Address pc);
|
| @@ -299,7 +300,7 @@
|
| virtual void SetCallerFp(Address caller_fp);
|
|
|
| protected:
|
| - explicit EntryFrame(StackFrameIterator* iterator) : StackFrame(iterator) { }
|
| + inline explicit EntryFrame(StackFrameIterator* iterator);
|
|
|
| // The caller stack pointer for entry frames is always zero. The
|
| // real information about the caller frame is available through the
|
| @@ -326,8 +327,7 @@
|
| }
|
|
|
| protected:
|
| - explicit EntryConstructFrame(StackFrameIterator* iterator)
|
| - : EntryFrame(iterator) { }
|
| + inline explicit EntryConstructFrame(StackFrameIterator* iterator);
|
|
|
| private:
|
| friend class StackFrameIterator;
|
| @@ -361,7 +361,7 @@
|
| static void FillState(Address fp, Address sp, State* state);
|
|
|
| protected:
|
| - explicit ExitFrame(StackFrameIterator* iterator) : StackFrame(iterator) { }
|
| + inline explicit ExitFrame(StackFrameIterator* iterator);
|
|
|
| virtual Address GetCallerStackPointer() const;
|
|
|
| @@ -394,8 +394,7 @@
|
| }
|
|
|
| protected:
|
| - explicit StandardFrame(StackFrameIterator* iterator)
|
| - : StackFrame(iterator) { }
|
| + inline explicit StandardFrame(StackFrameIterator* iterator);
|
|
|
| virtual void ComputeCallerState(State* state) const;
|
|
|
| @@ -514,8 +513,7 @@
|
| }
|
|
|
| protected:
|
| - explicit JavaScriptFrame(StackFrameIterator* iterator)
|
| - : StandardFrame(iterator) { }
|
| + inline explicit JavaScriptFrame(StackFrameIterator* iterator);
|
|
|
| virtual Address GetCallerStackPointer() const;
|
|
|
| @@ -552,8 +550,7 @@
|
| DeoptimizationInputData* GetDeoptimizationData(int* deopt_index);
|
|
|
| protected:
|
| - explicit OptimizedFrame(StackFrameIterator* iterator)
|
| - : JavaScriptFrame(iterator) { }
|
| + inline explicit OptimizedFrame(StackFrameIterator* iterator);
|
|
|
| private:
|
| friend class StackFrameIterator;
|
| @@ -581,12 +578,9 @@
|
| int index) const;
|
|
|
| protected:
|
| - explicit ArgumentsAdaptorFrame(StackFrameIterator* iterator)
|
| - : JavaScriptFrame(iterator) { }
|
| + inline explicit ArgumentsAdaptorFrame(StackFrameIterator* iterator);
|
|
|
| - virtual int GetNumberOfIncomingArguments() const {
|
| - return Smi::cast(GetExpression(0))->value();
|
| - }
|
| + virtual int GetNumberOfIncomingArguments() const;
|
|
|
| virtual Address GetCallerStackPointer() const;
|
|
|
| @@ -611,8 +605,7 @@
|
| }
|
|
|
| protected:
|
| - explicit InternalFrame(StackFrameIterator* iterator)
|
| - : StandardFrame(iterator) { }
|
| + inline explicit InternalFrame(StackFrameIterator* iterator);
|
|
|
| virtual Address GetCallerStackPointer() const;
|
|
|
| @@ -633,8 +626,7 @@
|
| }
|
|
|
| protected:
|
| - explicit ConstructFrame(StackFrameIterator* iterator)
|
| - : InternalFrame(iterator) { }
|
| + inline explicit ConstructFrame(StackFrameIterator* iterator);
|
|
|
| private:
|
| friend class StackFrameIterator;
|
| @@ -715,15 +707,19 @@
|
|
|
| inline JavaScriptFrameIteratorTemp(Isolate* isolate, StackFrame::Id id);
|
|
|
| - JavaScriptFrameIteratorTemp(Address fp, Address sp,
|
| - Address low_bound, Address high_bound) :
|
| + JavaScriptFrameIteratorTemp(Address fp,
|
| + Address sp,
|
| + Address low_bound,
|
| + Address high_bound) :
|
| iterator_(fp, sp, low_bound, high_bound) {
|
| if (!done()) Advance();
|
| }
|
|
|
| JavaScriptFrameIteratorTemp(Isolate* isolate,
|
| - Address fp, Address sp,
|
| - Address low_bound, Address high_bound) :
|
| + Address fp,
|
| + Address sp,
|
| + Address low_bound,
|
| + Address high_bound) :
|
| iterator_(isolate, fp, sp, low_bound, high_bound) {
|
| if (!done()) Advance();
|
| }
|
|
|