summaryrefslogtreecommitdiff
path: root/deps/v8/src/frames.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/frames.h')
-rw-r--r--deps/v8/src/frames.h47
1 files changed, 10 insertions, 37 deletions
diff --git a/deps/v8/src/frames.h b/deps/v8/src/frames.h
index 2d4f338ae0..20111904f5 100644
--- a/deps/v8/src/frames.h
+++ b/deps/v8/src/frames.h
@@ -67,7 +67,7 @@ class PcToCodeCache : AllStatic {
static PcToCodeCacheEntry* GetCacheEntry(Address pc);
private:
- static const int kPcToCodeCacheSize = 1024;
+ static const int kPcToCodeCacheSize = 256;
static PcToCodeCacheEntry cache_[kPcToCodeCacheSize];
};
@@ -141,13 +141,6 @@ class StackFrame BASE_EMBEDDED {
NO_ID = 0
};
- struct State {
- State() : sp(NULL), fp(NULL), pc_address(NULL) { }
- Address sp;
- Address fp;
- Address* pc_address;
- };
-
// Copy constructor; it breaks the connection to host iterator.
StackFrame(const StackFrame& original) {
this->state_ = original.state_;
@@ -208,6 +201,12 @@ class StackFrame BASE_EMBEDDED {
int index) const { }
protected:
+ struct State {
+ Address sp;
+ Address fp;
+ Address* pc_address;
+ };
+
explicit StackFrame(StackFrameIterator* iterator) : iterator_(iterator) { }
virtual ~StackFrame() { }
@@ -319,8 +318,6 @@ class ExitFrame: public StackFrame {
// pointer. Used when constructing the first stack frame seen by an
// iterator and the frames following entry frames.
static Type GetStateForFramePointer(Address fp, State* state);
- static Address ComputeStackPointer(Address fp);
- static void FillState(Address fp, Address sp, State* state);
protected:
explicit ExitFrame(StackFrameIterator* iterator) : StackFrame(iterator) { }
@@ -446,7 +443,6 @@ class JavaScriptFrame: public StandardFrame {
inline Object* function_slot_object() const;
friend class StackFrameIterator;
- friend class StackTracer;
};
@@ -658,36 +654,12 @@ class SafeStackFrameIterator BASE_EMBEDDED {
}
private:
- class StackAddressValidator {
- public:
- StackAddressValidator(Address low_bound, Address high_bound)
- : low_bound_(low_bound), high_bound_(high_bound) { }
- bool IsValid(Address addr) const {
- return IsWithinBounds(low_bound_, high_bound_, addr);
- }
- private:
- Address low_bound_;
- Address high_bound_;
- };
-
- class ExitFrameValidator {
- public:
- explicit ExitFrameValidator(const StackAddressValidator& validator)
- : validator_(validator) { }
- ExitFrameValidator(Address low_bound, Address high_bound)
- : validator_(low_bound, high_bound) { }
- bool IsValidFP(Address fp);
- private:
- StackAddressValidator validator_;
- };
-
bool IsValidStackAddress(Address addr) const {
- return stack_validator_.IsValid(addr);
+ return IsWithinBounds(low_bound_, high_bound_, addr);
}
bool CanIterateHandles(StackFrame* frame, StackHandler* handler);
bool IsValidFrame(StackFrame* frame) const;
bool IsValidCaller(StackFrame* frame);
- static bool IsValidTop(Address low_bound, Address high_bound);
// This is a nasty hack to make sure the active count is incremented
// before the constructor for the embedded iterator is invoked. This
@@ -702,7 +674,8 @@ class SafeStackFrameIterator BASE_EMBEDDED {
ActiveCountMaintainer maintainer_;
static int active_count_;
- StackAddressValidator stack_validator_;
+ Address low_bound_;
+ Address high_bound_;
const bool is_valid_top_;
const bool is_valid_fp_;
const bool is_working_iterator_;