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

Side by Side Diff: src/ia32/fast-codegen-ia32.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/fast-codegen.cc ('k') | src/x64/fast-codegen-x64.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 __ pop(eax); 108 __ pop(eax);
109 __ RecordJSReturn(); 109 __ RecordJSReturn();
110 // Do not use the leave instruction here because it is too short to 110 // Do not use the leave instruction here because it is too short to
111 // patch with the code required by the debugger. 111 // patch with the code required by the debugger.
112 __ mov(esp, ebp); 112 __ mov(esp, ebp);
113 __ pop(ebp); 113 __ pop(ebp);
114 __ ret((function_->scope()->num_parameters() + 1) * kPointerSize); 114 __ ret((function_->scope()->num_parameters() + 1) * kPointerSize);
115 } 115 }
116 116
117 117
118 void FastCodeGenerator::VisitSlot(Slot* expr) { 118 void FastCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
119 Comment cmnt(masm_, "[ Slot"); 119 Comment cmnt(masm_, "[ VariableProxy");
120 if (expr->location().is_temporary()) { 120 Expression* rewrite = expr->var()->rewrite();
121 __ push(Operand(ebp, SlotOffset(expr))); 121 ASSERT(rewrite != NULL);
122 } else { 122
123 ASSERT(expr->location().is_nowhere()); 123 Slot* slot = rewrite->AsSlot();
124 ASSERT(slot != NULL);
125 { Comment cmnt(masm_, "[ Slot");
126 if (expr->location().is_temporary()) {
127 __ push(Operand(ebp, SlotOffset(slot)));
128 } else {
129 ASSERT(expr->location().is_nowhere());
130 }
124 } 131 }
125 } 132 }
126 133
127 134
128 void FastCodeGenerator::VisitLiteral(Literal* expr) { 135 void FastCodeGenerator::VisitLiteral(Literal* expr) {
129 Comment cmnt(masm_, "[ Literal"); 136 Comment cmnt(masm_, "[ Literal");
130 if (expr->location().is_temporary()) { 137 if (expr->location().is_temporary()) {
131 __ push(Immediate(expr->handle())); 138 __ push(Immediate(expr->handle()));
132 } else { 139 } else {
133 ASSERT(expr->location().is_nowhere()); 140 ASSERT(expr->location().is_nowhere());
(...skipping 13 matching lines...) Expand all
147 __ mov(eax, Operand(esp, 0)); 154 __ mov(eax, Operand(esp, 0));
148 __ mov(Operand(ebp, SlotOffset(var->slot())), eax); 155 __ mov(Operand(ebp, SlotOffset(var->slot())), eax);
149 } else { 156 } else {
150 ASSERT(expr->location().is_nowhere()); 157 ASSERT(expr->location().is_nowhere());
151 __ pop(Operand(ebp, SlotOffset(var->slot()))); 158 __ pop(Operand(ebp, SlotOffset(var->slot())));
152 } 159 }
153 } 160 }
154 161
155 162
156 } } // namespace v8::internal 163 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/fast-codegen.cc ('k') | src/x64/fast-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698