| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 | 52 |
| 53 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { | 53 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { |
| 54 if (fp == 0) return NONE; | 54 if (fp == 0) return NONE; |
| 55 // Compute the stack pointer. | 55 // Compute the stack pointer. |
| 56 Address sp = Memory::Address_at(fp + ExitFrameConstants::kSPOffset); | 56 Address sp = Memory::Address_at(fp + ExitFrameConstants::kSPOffset); |
| 57 // Fill in the state. | 57 // Fill in the state. |
| 58 state->fp = fp; | 58 state->fp = fp; |
| 59 state->sp = sp; | 59 state->sp = sp; |
| 60 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize); | 60 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize); |
| 61 // Determine frame type. | 61 ASSERT(*state->pc_address != NULL); |
| 62 return EXIT; | 62 return EXIT; |
| 63 } | 63 } |
| 64 | 64 |
| 65 int JavaScriptFrame::GetProvidedParametersCount() const { | 65 int JavaScriptFrame::GetProvidedParametersCount() const { |
| 66 return ComputeParametersCount(); | 66 return ComputeParametersCount(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 void ExitFrame::Iterate(ObjectVisitor* v) const { | 70 void ExitFrame::Iterate(ObjectVisitor* v) const { |
| 71 v->VisitPointer(&code_slot()); | 71 v->VisitPointer(&code_slot()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const { | 104 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const { |
| 105 const int arguments = Smi::cast(GetExpression(0))->value(); | 105 const int arguments = Smi::cast(GetExpression(0))->value(); |
| 106 const int offset = StandardFrameConstants::kCallerSPOffset; | 106 const int offset = StandardFrameConstants::kCallerSPOffset; |
| 107 return fp() + offset + (arguments + 1) * kPointerSize; | 107 return fp() + offset + (arguments + 1) * kPointerSize; |
| 108 } | 108 } |
| 109 | 109 |
| 110 | 110 |
| 111 } } // namespace v8::internal | 111 } } // namespace v8::internal |
| 112 | 112 |
| 113 #endif // V8_TARGET_ARCH_X64 | 113 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |