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

Side by Side Diff: src/fast-codegen.h

Issue 496009: Added pre- and postfix count operations to top-level compiler.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/compiler.cc ('k') | 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 private: 206 private:
207 // TODO(lrn): Check that this value is correct when implementing 207 // TODO(lrn): Check that this value is correct when implementing
208 // for-in. 208 // for-in.
209 static const int kForInStackElementCount = 5; 209 static const int kForInStackElementCount = 5;
210 DISALLOW_COPY_AND_ASSIGN(ForIn); 210 DISALLOW_COPY_AND_ASSIGN(ForIn);
211 }; 211 };
212 212
213 213
214 int SlotOffset(Slot* slot); 214 int SlotOffset(Slot* slot);
215 void Move(Expression::Context destination, Register source); 215 void Move(Expression::Context destination, Register source);
216 void MoveTOS(Expression::Context destination);
216 void Move(Expression::Context destination, Slot* source, Register scratch); 217 void Move(Expression::Context destination, Slot* source, Register scratch);
217 void Move(Expression::Context destination, Literal* source); 218 void Move(Expression::Context destination, Literal* source);
218 void Move(Slot* dst, Register source, Register scratch1, Register scratch2); 219 void Move(Slot* dst, Register source, Register scratch1, Register scratch2);
219 void Move(Register dst, Slot* source); 220 void Move(Register dst, Slot* source);
220 221
221 // Templated to allow for Operand on intel and MemOperand on ARM. 222 // Templated to allow for Operand on intel and MemOperand on ARM.
222 template <typename MemoryLocation> 223 template <typename MemoryLocation>
223 MemoryLocation CreateSlotOperand(Slot* slot, Register scratch); 224 MemoryLocation CreateSlotOperand(Slot* slot, Register scratch);
224 225
225 // Drop the TOS, and store source to destination. 226 // Drop the TOS, and store source to destination.
(...skipping 14 matching lines...) Expand all
240 241
241 // Platform-specific code sequences for calls 242 // Platform-specific code sequences for calls
242 void EmitCallWithStub(Call* expr); 243 void EmitCallWithStub(Call* expr);
243 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode); 244 void EmitCallWithIC(Call* expr, Handle<Object> name, RelocInfo::Mode mode);
244 245
245 // Platform-specific code for loading variables. 246 // Platform-specific code for loading variables.
246 void EmitVariableLoad(Variable* expr, Expression::Context context); 247 void EmitVariableLoad(Variable* expr, Expression::Context context);
247 248
248 // Platform-specific support for compiling assignments. 249 // Platform-specific support for compiling assignments.
249 250
250 // Load a value from a named property and push the result on the stack. 251 // Load a value from a named property.
251 // The receiver is left on the stack by the IC. 252 // The receiver is left on the stack by the IC.
252 void EmitNamedPropertyLoad(Property* expr, Expression::Context context); 253 void EmitNamedPropertyLoad(Property* expr, Expression::Context context);
253 254
254 // Load a value from a named property and push the result on the stack. 255 // Load a value from a keyed property.
255 // The receiver and the key is left on the stack by the IC. 256 // The receiver and the key is left on the stack by the IC.
256 void EmitKeyedPropertyLoad(Expression::Context context); 257 void EmitKeyedPropertyLoad(Property* expr, Expression::Context context);
257 258
258 // Apply the compound assignment operator. Expects both operands on top 259 // Apply the compound assignment operator. Expects both operands on top
259 // of the stack. 260 // of the stack.
260 void EmitCompoundAssignmentOp(Token::Value op, Expression::Context context); 261 void EmitCompoundAssignmentOp(Token::Value op, Expression::Context context);
261 262
262 // Complete a variable assignment. The right-hand-side value is expected 263 // Complete a variable assignment. The right-hand-side value is expected
263 // on top of the stack. 264 // on top of the stack.
264 void EmitVariableAssignment(Assignment* expr); 265 void EmitVariableAssignment(Variable* var, Expression::Context context);
265 266
266 // Complete a named property assignment. The receiver and right-hand-side 267 // Complete a named property assignment. The receiver and right-hand-side
267 // value are expected on top of the stack. 268 // value are expected on top of the stack.
268 void EmitNamedPropertyAssignment(Assignment* expr); 269 void EmitNamedPropertyAssignment(Assignment* expr);
269 270
270 // Complete a keyed property assignment. The reciever, key, and 271 // Complete a keyed property assignment. The reciever, key, and
271 // right-hand-side value are expected on top of the stack. 272 // right-hand-side value are expected on top of the stack.
272 void EmitKeyedPropertyAssignment(Assignment* expr); 273 void EmitKeyedPropertyAssignment(Assignment* expr);
273 274
274 void SetFunctionPosition(FunctionLiteral* fun); 275 void SetFunctionPosition(FunctionLiteral* fun);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 321
321 friend class NestedStatement; 322 friend class NestedStatement;
322 323
323 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); 324 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator);
324 }; 325 };
325 326
326 327
327 } } // namespace v8::internal 328 } } // namespace v8::internal
328 329
329 #endif // V8_FAST_CODEGEN_H_ 330 #endif // V8_FAST_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/fast-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698