| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 } | 403 } |
| 404 | 404 |
| 405 | 405 |
| 406 Object*& ExitFrame::code_slot() const { | 406 Object*& ExitFrame::code_slot() const { |
| 407 const int offset = ExitFrameConstants::kCodeOffset; | 407 const int offset = ExitFrameConstants::kCodeOffset; |
| 408 return Memory::Object_at(fp() + offset); | 408 return Memory::Object_at(fp() + offset); |
| 409 } | 409 } |
| 410 | 410 |
| 411 | 411 |
| 412 Code* ExitFrame::code() const { | 412 Code* ExitFrame::code() const { |
| 413 Object* code = code_slot(); | 413 return Code::cast(code_slot()); |
| 414 if (code->IsSmi()) { | |
| 415 return Heap::debugger_statement_code(); | |
| 416 } else { | |
| 417 return Code::cast(code); | |
| 418 } | |
| 419 } | 414 } |
| 420 | 415 |
| 421 | 416 |
| 422 void ExitFrame::ComputeCallerState(State* state) const { | 417 void ExitFrame::ComputeCallerState(State* state) const { |
| 423 // Setup the caller state. | 418 // Setup the caller state. |
| 424 state->sp = caller_sp(); | 419 state->sp = caller_sp(); |
| 425 state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset); | 420 state->fp = Memory::Address_at(fp() + ExitFrameConstants::kCallerFPOffset); |
| 426 state->pc_address | 421 state->pc_address |
| 427 = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset); | 422 = reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset); |
| 428 } | 423 } |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 reg_code[i++] = r; | 745 reg_code[i++] = r; |
| 751 | 746 |
| 752 ASSERT(i == kNumJSCallerSaved); | 747 ASSERT(i == kNumJSCallerSaved); |
| 753 } | 748 } |
| 754 ASSERT(0 <= n && n < kNumJSCallerSaved); | 749 ASSERT(0 <= n && n < kNumJSCallerSaved); |
| 755 return reg_code[n]; | 750 return reg_code[n]; |
| 756 } | 751 } |
| 757 | 752 |
| 758 | 753 |
| 759 } } // namespace v8::internal | 754 } } // namespace v8::internal |
| OLD | NEW |