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

Side by Side Diff: src/x64/frames-x64.cc

Issue 3410012: Merge r5467..r5469 into branches/2.3.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: '' Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/version.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // The marker and function offsets overlap. If the marker isn't a 43 // The marker and function offsets overlap. If the marker isn't a
44 // smi then the frame is a JavaScript frame -- and the marker is 44 // smi then the frame is a JavaScript frame -- and the marker is
45 // really the function. 45 // really the function.
46 const int offset = StandardFrameConstants::kMarkerOffset; 46 const int offset = StandardFrameConstants::kMarkerOffset;
47 Object* marker = Memory::Object_at(state->fp + offset); 47 Object* marker = Memory::Object_at(state->fp + offset);
48 if (!marker->IsSmi()) return JAVA_SCRIPT; 48 if (!marker->IsSmi()) return JAVA_SCRIPT;
49 return static_cast<StackFrame::Type>(Smi::cast(marker)->value()); 49 return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
50 } 50 }
51 51
52 52
53 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) { 53 Address ExitFrame::ComputeStackPointer(Address fp) {
54 if (fp == 0) return NONE; 54 return Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
55 // Compute the stack pointer.
56 Address sp = Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
57 // Fill in the state.
58 state->fp = fp;
59 state->sp = sp;
60 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize);
61 ASSERT(*state->pc_address != NULL);
62 return EXIT;
63 } 55 }
64 56
57
65 int JavaScriptFrame::GetProvidedParametersCount() const { 58 int JavaScriptFrame::GetProvidedParametersCount() const {
66 return ComputeParametersCount(); 59 return ComputeParametersCount();
67 } 60 }
68 61
69 62
70 void ExitFrame::Iterate(ObjectVisitor* v) const { 63 void ExitFrame::Iterate(ObjectVisitor* v) const {
71 v->VisitPointer(&code_slot()); 64 v->VisitPointer(&code_slot());
72 // The arguments are traversed as part of the expression stack of 65 // The arguments are traversed as part of the expression stack of
73 // the calling frame. 66 // the calling frame.
74 } 67 }
(...skipping 29 matching lines...) Expand all
104 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const { 97 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const {
105 const int arguments = Smi::cast(GetExpression(0))->value(); 98 const int arguments = Smi::cast(GetExpression(0))->value();
106 const int offset = StandardFrameConstants::kCallerSPOffset; 99 const int offset = StandardFrameConstants::kCallerSPOffset;
107 return fp() + offset + (arguments + 1) * kPointerSize; 100 return fp() + offset + (arguments + 1) * kPointerSize;
108 } 101 }
109 102
110 103
111 } } // namespace v8::internal 104 } } // namespace v8::internal
112 105
113 #endif // V8_TARGET_ARCH_X64 106 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698