Revision: 15293
Author: [email protected]
Date: Mon Jun 24 06:27:48 2013
Log: Move ExitFrame::ComputeStackPointer from frames-<arch>.cc to
frames.cc
The method has identical implementation for all architectures. Moved it
into frames.cc
Drive-by: deleted SafeStackFrameIterator::is_working_iterator_,
SafeStackFrameIterator::iteration_done_ is used instead.
BUG=None
[email protected], [email protected]
Review URL: https://codereview.chromium.org/17581004
http://code.google.com/p/v8/source/detail?r=15293
Modified:
/branches/bleeding_edge/src/arm/frames-arm.cc
/branches/bleeding_edge/src/frames.cc
/branches/bleeding_edge/src/frames.h
/branches/bleeding_edge/src/ia32/frames-ia32.cc
/branches/bleeding_edge/src/mips/frames-mips.cc
/branches/bleeding_edge/src/x64/frames-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/frames-arm.cc Fri May 17 01:27:56 2013
+++ /branches/bleeding_edge/src/arm/frames-arm.cc Mon Jun 24 06:27:48 2013
@@ -32,7 +32,7 @@
#include "assembler.h"
#include "assembler-arm.h"
#include "assembler-arm-inl.h"
-#include "frames-inl.h"
+#include "frames.h"
#include "macro-assembler.h"
#include "macro-assembler-arm.h"
@@ -40,11 +40,6 @@
namespace internal {
-Address ExitFrame::ComputeStackPointer(Address fp) {
- return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
-}
-
-
Register JavaScriptFrame::fp_register() { return v8::internal::fp; }
Register JavaScriptFrame::context_register() { return cp; }
=======================================
--- /branches/bleeding_edge/src/frames.cc Mon Jun 24 01:38:37 2013
+++ /branches/bleeding_edge/src/frames.cc Mon Jun 24 06:27:48 2013
@@ -289,8 +289,7 @@
stack_validator_(low_bound, high_bound),
is_valid_top_(IsValidTop(isolate, low_bound, high_bound)),
is_valid_fp_(IsWithinBounds(low_bound, high_bound, fp)),
- is_working_iterator_(is_valid_top_ || is_valid_fp_),
- iteration_done_(!is_working_iterator_),
+ iteration_done_(!is_valid_top_ && !is_valid_fp_),
iterator_(isolate, is_valid_top_, is_valid_fp_ ? fp : NULL, sp) {
}
@@ -310,7 +309,6 @@
void SafeStackFrameIterator::Advance() {
- ASSERT(is_working_iterator_);
ASSERT(!done());
StackFrame* last_frame = iterator_.frame();
Address last_sp = last_frame->sp(), last_fp = last_frame->fp();
@@ -562,6 +560,11 @@
ASSERT(*state->pc_address != NULL);
return EXIT;
}
+
+
+Address ExitFrame::ComputeStackPointer(Address fp) {
+ return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
+}
void ExitFrame::FillState(Address fp, Address sp, State* state) {
=======================================
--- /branches/bleeding_edge/src/frames.h Mon Jun 24 01:38:37 2013
+++ /branches/bleeding_edge/src/frames.h Mon Jun 24 06:27:48 2013
@@ -860,7 +860,6 @@
// functions in runtime.js.
class StackTraceFrameIterator: public JavaScriptFrameIterator {
public:
- StackTraceFrameIterator();
explicit StackTraceFrameIterator(Isolate* isolate);
void Advance();
@@ -876,22 +875,22 @@
Address low_bound, Address high_bound);
StackFrame* frame() const {
- ASSERT(is_working_iterator_);
+ ASSERT(!iteration_done_);
return iterator_.frame();
}
- bool done() const { return iteration_done_ ? true : iterator_.done(); }
+ bool done() const { return iteration_done_ || iterator_.done(); }
void Advance();
static bool is_active(Isolate* isolate);
+ private:
static bool IsWithinBounds(
Address low_bound, Address high_bound, Address addr) {
return low_bound <= addr && addr <= high_bound;
}
- private:
class StackAddressValidator {
public:
StackAddressValidator(Address low_bound, Address high_bound)
@@ -941,7 +940,6 @@
StackAddressValidator stack_validator_;
const bool is_valid_top_;
const bool is_valid_fp_;
- const bool is_working_iterator_;
bool iteration_done_;
StackFrameIterator iterator_;
};
=======================================
--- /branches/bleeding_edge/src/ia32/frames-ia32.cc Fri May 17 01:27:56 2013
+++ /branches/bleeding_edge/src/ia32/frames-ia32.cc Mon Jun 24 06:27:48 2013
@@ -32,17 +32,12 @@
#include "assembler.h"
#include "assembler-ia32.h"
#include "assembler-ia32-inl.h"
-#include "frames-inl.h"
+#include "frames.h"
namespace v8 {
namespace internal {
-Address ExitFrame::ComputeStackPointer(Address fp) {
- return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
-}
-
-
Register JavaScriptFrame::fp_register() { return ebp; }
Register JavaScriptFrame::context_register() { return esi; }
=======================================
--- /branches/bleeding_edge/src/mips/frames-mips.cc Fri May 17 03:46:42 2013
+++ /branches/bleeding_edge/src/mips/frames-mips.cc Mon Jun 24 06:27:48 2013
@@ -33,20 +33,12 @@
#include "assembler.h"
#include "assembler-mips.h"
#include "assembler-mips-inl.h"
-#include "frames-inl.h"
-#include "mips/assembler-mips-inl.h"
-#include "macro-assembler.h"
-#include "macro-assembler-mips.h"
+#include "frames.h"
namespace v8 {
namespace internal {
-Address ExitFrame::ComputeStackPointer(Address fp) {
- return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
-}
-
-
Register JavaScriptFrame::fp_register() { return v8::internal::fp; }
Register JavaScriptFrame::context_register() { return cp; }
=======================================
--- /branches/bleeding_edge/src/x64/frames-x64.cc Fri May 17 01:27:56 2013
+++ /branches/bleeding_edge/src/x64/frames-x64.cc Mon Jun 24 06:27:48 2013
@@ -32,17 +32,12 @@
#include "assembler.h"
#include "assembler-x64.h"
#include "assembler-x64-inl.h"
-#include "frames-inl.h"
+#include "frames.h"
namespace v8 {
namespace internal {
-Address ExitFrame::ComputeStackPointer(Address fp) {
- return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
-}
-
-
Register JavaScriptFrame::fp_register() { return rbp; }
Register JavaScriptFrame::context_register() { return rsi; }
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.