diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2009-11-18 15:25:58 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2009-11-18 15:28:54 +0100 |
commit | 728d8a37f471afaeaa6af19823f9da8c41f1f65a (patch) | |
tree | 21e014089ff0bfb7d493691620ab9eee51176d28 /deps/v8/src/frames.cc | |
parent | 8195e0f7232fed3d6a3a2cc8464fec5e36f4433c (diff) | |
download | node-728d8a37f471afaeaa6af19823f9da8c41f1f65a.tar.gz |
Upgrade v8 to 2.0
(With just one change: remove -Werror)
Diffstat (limited to 'deps/v8/src/frames.cc')
-rw-r--r-- | deps/v8/src/frames.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/deps/v8/src/frames.cc b/deps/v8/src/frames.cc index 5cd83324c..7c327dd32 100644 --- a/deps/v8/src/frames.cc +++ b/deps/v8/src/frames.cc @@ -393,8 +393,19 @@ Code* EntryConstructFrame::code() const { } +Object*& ExitFrame::code_slot() const { + const int offset = ExitFrameConstants::kCodeOffset; + return Memory::Object_at(fp() + offset); +} + + Code* ExitFrame::code() const { - return Heap::c_entry_code(); + Object* code = code_slot(); + if (code->IsSmi()) { + return Heap::c_entry_debug_break_code(); + } else { + return Code::cast(code); + } } @@ -412,11 +423,6 @@ Address ExitFrame::GetCallerStackPointer() const { } -Code* ExitDebugFrame::code() const { - return Heap::c_entry_debug_break_code(); -} - - Address StandardFrame::GetExpressionAddress(int n) const { const int offset = StandardFrameConstants::kExpressionsOffset; return fp() + offset - n * kPointerSize; @@ -430,7 +436,7 @@ int StandardFrame::ComputeExpressionsCount() const { Address limit = sp(); ASSERT(base >= limit); // stack grows downwards // Include register-allocated locals in number of expressions. - return (base - limit) / kPointerSize; + return static_cast<int>((base - limit) / kPointerSize); } @@ -460,7 +466,7 @@ Object* JavaScriptFrame::GetParameter(int index) const { int JavaScriptFrame::ComputeParametersCount() const { Address base = caller_sp() + JavaScriptFrameConstants::kReceiverOffset; Address limit = fp() + JavaScriptFrameConstants::kSavedRegistersOffset; - return (base - limit) / kPointerSize; + return static_cast<int>((base - limit) / kPointerSize); } |