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

Side by Side Diff: src/x64/fast-codegen-x64.cc

Issue 284009: Do not visit slots in the top-level code generator's backend.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/ia32/fast-codegen-ia32.cc ('k') | no next file » | 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // have just generated "movq rsp, rbp; pop rbp; ret k" with length 7 125 // have just generated "movq rsp, rbp; pop rbp; ret k" with length 7
126 // (3 + 1 + 3). 126 // (3 + 1 + 3).
127 const int kPadding = Debug::kX64JSReturnSequenceLength - 7; 127 const int kPadding = Debug::kX64JSReturnSequenceLength - 7;
128 for (int i = 0; i < kPadding; ++i) { 128 for (int i = 0; i < kPadding; ++i) {
129 masm_->int3(); 129 masm_->int3();
130 } 130 }
131 #endif 131 #endif
132 } 132 }
133 133
134 134
135 void FastCodeGenerator::VisitSlot(Slot* expr) { 135 void FastCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
136 Comment cmnt(masm_, "[ Slot"); 136 Comment cmnt(masm_, "[ VariableProxy");
137 if (expr->location().is_temporary()) { 137 Expression* rewrite = expr->var()->rewrite();
138 __ push(Operand(rbp, SlotOffset(expr))); 138 ASSERT(rewrite != NULL);
139 } else { 139
140 ASSERT(expr->location().is_nowhere()); 140 Slot* slot = rewrite->AsSlot();
141 ASSERT(slot != NULL);
142 { Comment cmnt(masm_, "[ Slot");
143 if (expr->location().is_temporary()) {
144 __ push(Operand(rbp, SlotOffset(slot)));
145 } else {
146 ASSERT(expr->location().is_nowhere());
147 }
141 } 148 }
142 } 149 }
143 150
144 151
145 void FastCodeGenerator::VisitLiteral(Literal* expr) { 152 void FastCodeGenerator::VisitLiteral(Literal* expr) {
146 Comment cmnt(masm_, "[ Literal"); 153 Comment cmnt(masm_, "[ Literal");
147 if (expr->location().is_temporary()) { 154 if (expr->location().is_temporary()) {
148 __ Push(expr->handle()); 155 __ Push(expr->handle());
149 } else { 156 } else {
150 ASSERT(expr->location().is_nowhere()); 157 ASSERT(expr->location().is_nowhere());
(...skipping 14 matching lines...) Expand all
165 __ movq(rax, Operand(rsp, 0)); 172 __ movq(rax, Operand(rsp, 0));
166 __ movq(Operand(rbp, SlotOffset(var->slot())), rax); 173 __ movq(Operand(rbp, SlotOffset(var->slot())), rax);
167 } else { 174 } else {
168 ASSERT(expr->location().is_nowhere()); 175 ASSERT(expr->location().is_nowhere());
169 __ pop(Operand(rbp, SlotOffset(var->slot()))); 176 __ pop(Operand(rbp, SlotOffset(var->slot())));
170 } 177 }
171 } 178 }
172 179
173 180
174 } } // namespace v8::internal 181 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/fast-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698