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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { | 51 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { |
52 if (fp == 0) return NONE; | 52 if (fp == 0) return NONE; |
53 // Compute the stack pointer. | 53 // Compute the stack pointer. |
54 Address sp = Memory::Address_at(fp + ExitFrameConstants::kSPOffset); | 54 Address sp = Memory::Address_at(fp + ExitFrameConstants::kSPOffset); |
55 // Fill in the state. | 55 // Fill in the state. |
56 state->fp = fp; | 56 state->fp = fp; |
57 state->sp = sp; | 57 state->sp = sp; |
58 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize); | 58 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize); |
59 // Determine frame type. | 59 // Determine frame type. |
60 if (Memory::Address_at(fp + ExitFrameConstants::kDebugMarkOffset) != 0) { | 60 return EXIT; |
61 return EXIT_DEBUG; | |
62 } else { | |
63 return EXIT; | |
64 } | |
65 } | 61 } |
66 | 62 |
67 int JavaScriptFrame::GetProvidedParametersCount() const { | 63 int JavaScriptFrame::GetProvidedParametersCount() const { |
68 return ComputeParametersCount(); | 64 return ComputeParametersCount(); |
69 } | 65 } |
70 | 66 |
71 | 67 |
72 void ExitFrame::Iterate(ObjectVisitor* a) const { | 68 void ExitFrame::Iterate(ObjectVisitor* v) const { |
73 // Exit frames on X64 do not contain any pointers. The arguments | 69 v->VisitPointer(&code_slot()); |
74 // are traversed as part of the expression stack of the calling | 70 // The arguments are traversed as part of the expression stack of |
75 // frame. | 71 // the calling frame. |
76 } | 72 } |
77 | 73 |
78 byte* InternalFrame::GetCallerStackPointer() const { | 74 byte* InternalFrame::GetCallerStackPointer() const { |
79 // Internal frames have no arguments. The stack pointer of the | 75 // Internal frames have no arguments. The stack pointer of the |
80 // caller is at a fixed offset from the frame pointer. | 76 // caller is at a fixed offset from the frame pointer. |
81 return fp() + StandardFrameConstants::kCallerSPOffset; | 77 return fp() + StandardFrameConstants::kCallerSPOffset; |
82 } | 78 } |
83 | 79 |
84 byte* JavaScriptFrame::GetCallerStackPointer() const { | 80 byte* JavaScriptFrame::GetCallerStackPointer() const { |
85 int arguments; | 81 int arguments; |
(...skipping 18 matching lines...) Expand all Loading... |
104 | 100 |
105 | 101 |
106 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const { | 102 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const { |
107 const int arguments = Smi::cast(GetExpression(0))->value(); | 103 const int arguments = Smi::cast(GetExpression(0))->value(); |
108 const int offset = StandardFrameConstants::kCallerSPOffset; | 104 const int offset = StandardFrameConstants::kCallerSPOffset; |
109 return fp() + offset + (arguments + 1) * kPointerSize; | 105 return fp() + offset + (arguments + 1) * kPointerSize; |
110 } | 106 } |
111 | 107 |
112 | 108 |
113 } } // namespace v8::internal | 109 } } // namespace v8::internal |
OLD | NEW |