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

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

Issue 140068: Implement code generation for conditional expressions and regexp... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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
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 14 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "frames-inl.h" 30 #include "frames-inl.h"
31 31
32 namespace v8 { 32 namespace v8 {
33 namespace internal { 33 namespace internal {
34 34
35 StackFrame::Type ExitFrame::GetStateForFramePointer(unsigned char* a, 35
36 StackFrame::State* b) { 36 StackFrame::Type StackFrame::ComputeType(State* state) {
37 // TODO(X64): UNIMPLEMENTED 37 ASSERT(state->fp != NULL);
38 return NONE; 38 if (StandardFrame::IsArgumentsAdaptorFrame(state->fp)) {
39 return ARGUMENTS_ADAPTOR;
40 }
41 // The marker and function offsets overlap. If the marker isn't a
42 // smi then the frame is a JavaScript frame -- and the marker is
43 // really the function.
44 const int offset = StandardFrameConstants::kMarkerOffset;
45 Object* marker = Memory::Object_at(state->fp + offset);
46 if (!marker->IsSmi()) return JAVA_SCRIPT;
47 return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
48 }
49
50
51 StackFrame::Type ExitFrame::GetStateForFramePointer(Address fp, State* state) {
52 if (fp == 0) return NONE;
53 // Compute the stack pointer.
54 Address sp = Memory::Address_at(fp + ExitFrameConstants::kSPOffset);
55 // Fill in the state.
56 state->fp = fp;
57 state->sp = sp;
58 state->pc_address = reinterpret_cast<Address*>(sp - 1 * kPointerSize);
59 // Determine frame type.
60 if (Memory::Address_at(fp + ExitFrameConstants::kDebugMarkOffset) != 0) {
61 return EXIT_DEBUG;
62 } else {
63 return EXIT;
64 }
39 } 65 }
40 66
41 int JavaScriptFrame::GetProvidedParametersCount() const { 67 int JavaScriptFrame::GetProvidedParametersCount() const {
42 UNIMPLEMENTED(); 68 UNIMPLEMENTED();
43 return 0; 69 return 0;
44 } 70 }
45 71
46 StackFrame::Type StackFrame::ComputeType(StackFrame::State* a) {
47 UNIMPLEMENTED();
48 return NONE;
49 }
50
51 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const { 72 byte* ArgumentsAdaptorFrame::GetCallerStackPointer() const {
52 UNIMPLEMENTED(); 73 UNIMPLEMENTED();
53 return NULL; 74 return NULL;
54 } 75 }
55 76
56 77
57 void ExitFrame::Iterate(ObjectVisitor* a) const { 78 void ExitFrame::Iterate(ObjectVisitor* a) const {
58 UNIMPLEMENTED(); 79 UNIMPLEMENTED();
59 } 80 }
60 81
61 byte* InternalFrame::GetCallerStackPointer() const { 82 byte* InternalFrame::GetCallerStackPointer() const {
62 UNIMPLEMENTED(); 83 UNIMPLEMENTED();
63 return NULL; 84 return NULL;
64 } 85 }
65 86
66 byte* JavaScriptFrame::GetCallerStackPointer() const { 87 byte* JavaScriptFrame::GetCallerStackPointer() const {
67 UNIMPLEMENTED(); 88 UNIMPLEMENTED();
68 return NULL; 89 return NULL;
69 } 90 }
70 91
71 92
72 } } // namespace v8::internal 93 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | src/x64/ic-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698