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

Side by Side Diff: src/arm/fast-codegen-arm.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 | « no previous file | src/fast-codegen.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 __ pop(r0); 118 __ pop(r0);
119 __ RecordJSReturn(); 119 __ RecordJSReturn();
120 __ mov(sp, fp); 120 __ mov(sp, fp);
121 __ ldm(ia_w, sp, fp.bit() | lr.bit()); 121 __ ldm(ia_w, sp, fp.bit() | lr.bit());
122 int num_parameters = function_->scope()->num_parameters(); 122 int num_parameters = function_->scope()->num_parameters();
123 __ add(sp, sp, Operand((num_parameters + 1) * kPointerSize)); 123 __ add(sp, sp, Operand((num_parameters + 1) * kPointerSize));
124 __ Jump(lr); 124 __ Jump(lr);
125 } 125 }
126 126
127 127
128 void FastCodeGenerator::VisitSlot(Slot* expr) { 128 void FastCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
129 Comment cmnt(masm_, "[ Slot"); 129 Comment cmnt(masm_, "[ VariableProxy");
130 if (expr->location().is_temporary()) { 130 Expression* rewrite = expr->var()->rewrite();
131 __ ldr(ip, MemOperand(fp, SlotOffset(expr))); 131 ASSERT(rewrite != NULL);
132 __ push(ip); 132
133 } else { 133 Slot* slot = rewrite->AsSlot();
134 ASSERT(expr->location().is_nowhere()); 134 ASSERT(slot != NULL);
135 { Comment cmnt(masm_, "[ Slot");
136 if (expr->location().is_temporary()) {
137 __ ldr(ip, MemOperand(fp, SlotOffset(slot)));
138 __ push(ip);
139 } else {
140 ASSERT(expr->location().is_nowhere());
141 }
135 } 142 }
136 } 143 }
137 144
138 145
139 void FastCodeGenerator::VisitLiteral(Literal* expr) { 146 void FastCodeGenerator::VisitLiteral(Literal* expr) {
140 Comment cmnt(masm_, "[ Literal"); 147 Comment cmnt(masm_, "[ Literal");
141 if (expr->location().is_temporary()) { 148 if (expr->location().is_temporary()) {
142 __ mov(ip, Operand(expr->handle())); 149 __ mov(ip, Operand(expr->handle()));
143 __ push(ip); 150 __ push(ip);
144 } else { 151 } else {
(...skipping 15 matching lines...) Expand all
160 __ ldr(ip, MemOperand(sp)); 167 __ ldr(ip, MemOperand(sp));
161 } else { 168 } else {
162 ASSERT(expr->location().is_nowhere()); 169 ASSERT(expr->location().is_nowhere());
163 __ pop(ip); 170 __ pop(ip);
164 } 171 }
165 __ str(ip, MemOperand(fp, SlotOffset(var->slot()))); 172 __ str(ip, MemOperand(fp, SlotOffset(var->slot())));
166 } 173 }
167 174
168 175
169 } } // namespace v8::internal 176 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/fast-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698