Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: src/frames.cc

Issue 20073004: Introduce the SetFp function in StackHandler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.h ('k') | src/ia32/frames-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 61792a628cd2cae82b87547dc9b17a0a02b17932..c17a9d5f82eab08e7de6bf45eb4170eb5c60ffd9 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1521,9 +1521,9 @@ void StackHandler::Unwind(Isolate* isolate,
FixedArray* array,
int offset,
int previous_handler_offset) const {
- STATIC_ASSERT(StackHandlerConstants::kSlotCount == 5);
+ STATIC_ASSERT(StackHandlerConstants::kSlotCount >= 5);
ASSERT_LE(0, offset);
- ASSERT_GE(array->length(), offset + 5);
+ ASSERT_GE(array->length(), offset + StackHandlerConstants::kSlotCount);
// Unwinding a stack handler into an array chains it in the opposite
// direction, re-using the "next" slot as a "previous" link, so that stack
// handlers can be later re-wound in the correct order. Decode the "state"
@@ -1542,9 +1542,9 @@ int StackHandler::Rewind(Isolate* isolate,
FixedArray* array,
int offset,
Address fp) {
- STATIC_ASSERT(StackHandlerConstants::kSlotCount == 5);
+ STATIC_ASSERT(StackHandlerConstants::kSlotCount >= 5);
ASSERT_LE(0, offset);
- ASSERT_GE(array->length(), offset + 5);
+ ASSERT_GE(array->length(), offset + StackHandlerConstants::kSlotCount);
Smi* prev_handler_offset = Smi::cast(array->get(offset));
Code* code = Code::cast(array->get(offset + 1));
Smi* smi_index = Smi::cast(array->get(offset + 2));
@@ -1560,7 +1560,7 @@ int StackHandler::Rewind(Isolate* isolate,
Memory::uintptr_at(address() + StackHandlerConstants::kStateOffset) = state;
Memory::Object_at(address() + StackHandlerConstants::kContextOffset) =
context;
- Memory::Address_at(address() + StackHandlerConstants::kFPOffset) = fp;
+ SetFp(address() + StackHandlerConstants::kFPOffset, fp);
*isolate->handler_address() = address();
« no previous file with comments | « src/frames.h ('k') | src/ia32/frames-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698