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

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

Issue 3203005: Start using the overwrite mode from the full codegens to generate... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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/ast.cc ('k') | src/full-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 private: 230 private:
231 static const int kForInStackElementCount = 5; 231 static const int kForInStackElementCount = 5;
232 DISALLOW_COPY_AND_ASSIGN(ForIn); 232 DISALLOW_COPY_AND_ASSIGN(ForIn);
233 }; 233 };
234 234
235 enum Location { 235 enum Location {
236 kAccumulator, 236 kAccumulator,
237 kStack 237 kStack
238 }; 238 };
239 239
240 // Compute the frame pointer relative offset for a given local or
241 // parameter slot.
240 int SlotOffset(Slot* slot); 242 int SlotOffset(Slot* slot);
241 243
244 // Determine whether or not to inline the smi case for the given
245 // operation.
246 bool ShouldInlineSmiCase(Token::Value op);
247
242 // Emit code to convert a pure value (in a register, slot, as a literal, 248 // Emit code to convert a pure value (in a register, slot, as a literal,
243 // or on top of the stack) into the result expected according to an 249 // or on top of the stack) into the result expected according to an
244 // expression context. 250 // expression context.
245 void Apply(Expression::Context context, Register reg); 251 void Apply(Expression::Context context, Register reg);
246 252
247 // Slot cannot have type Slot::LOOKUP. 253 // Slot cannot have type Slot::LOOKUP.
248 void Apply(Expression::Context context, Slot* slot); 254 void Apply(Expression::Context context, Slot* slot);
249 255
250 void Apply(Expression::Context context, Literal* lit); 256 void Apply(Expression::Context context, Literal* lit);
251 void ApplyTOS(Expression::Context context); 257 void ApplyTOS(Expression::Context context);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // Load a value from a named property. 382 // Load a value from a named property.
377 // The receiver is left on the stack by the IC. 383 // The receiver is left on the stack by the IC.
378 void EmitNamedPropertyLoad(Property* expr); 384 void EmitNamedPropertyLoad(Property* expr);
379 385
380 // Load a value from a keyed property. 386 // Load a value from a keyed property.
381 // The receiver and the key is left on the stack by the IC. 387 // The receiver and the key is left on the stack by the IC.
382 void EmitKeyedPropertyLoad(Property* expr); 388 void EmitKeyedPropertyLoad(Property* expr);
383 389
384 // Apply the compound assignment operator. Expects the left operand on top 390 // Apply the compound assignment operator. Expects the left operand on top
385 // of the stack and the right one in the accumulator. 391 // of the stack and the right one in the accumulator.
386 void EmitBinaryOp(Token::Value op, Expression::Context context); 392 void EmitBinaryOp(Token::Value op,
393 Expression::Context context,
394 OverwriteMode mode);
387 395
388 // Assign to the given expression as if via '='. The right-hand-side value 396 // Assign to the given expression as if via '='. The right-hand-side value
389 // is expected in the accumulator. 397 // is expected in the accumulator.
390 void EmitAssignment(Expression* expr); 398 void EmitAssignment(Expression* expr);
391 399
392 // Complete a variable assignment. The right-hand-side value is expected 400 // Complete a variable assignment. The right-hand-side value is expected
393 // in the accumulator. 401 // in the accumulator.
394 void EmitVariableAssignment(Variable* var, 402 void EmitVariableAssignment(Variable* var,
395 Token::Value op, 403 Token::Value op,
396 Expression::Context context); 404 Expression::Context context);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 479
472 friend class NestedStatement; 480 friend class NestedStatement;
473 481
474 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 482 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
475 }; 483 };
476 484
477 485
478 } } // namespace v8::internal 486 } } // namespace v8::internal
479 487
480 #endif // V8_FULL_CODEGEN_H_ 488 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698