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

Unified Diff: src/fast-codegen.h

Issue 546006: Some cleanup of the toplevel code generator:... (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 side-by-side diff with in-line comments
Download patch
Index: src/fast-codegen.h
===================================================================
--- src/fast-codegen.h (revision 3576)
+++ src/fast-codegen.h (working copy)
@@ -212,10 +212,23 @@
int SlotOffset(Slot* slot);
- void Move(Expression::Context destination, Register source);
- void MoveTOS(Expression::Context destination);
- void Move(Expression::Context destination, Slot* source, Register scratch);
- void Move(Expression::Context destination, Literal* source);
+
+ // Emit code to complete the evaluation of an expression based on its
+ // expression context and given its value is in a register, non-lookup
+ // slot, or a literal.
+ void Apply(Expression::Context context, Register reg);
+ void Apply(Expression::Context context, Slot* slot, Register scratch);
+ void Apply(Expression::Context context, Literal* lit);
+
+ // Emit code to complete the evaluation of an expression based on its
+ // expression context and given its value is on top of the stack.
+ void ApplyTOS(Expression::Context context);
+
+ // Emit code to discard count elements from the top of stack, then
+ // complete the evaluation of an expression based on its expression
+ // context and given its value is in a register.
+ void DropAndApply(int count, Expression::Context context, Register reg);
+
void Move(Slot* dst, Register source, Register scratch1, Register scratch2);
void Move(Register dst, Slot* source);
@@ -224,12 +237,6 @@
// register.
MemOperand EmitSlotSearch(Slot* slot, Register scratch);
- // Drop the TOS, and store source to destination.
- // If destination is TOS, just overwrite TOS with source.
- void DropAndMove(Expression::Context destination,
- Register source,
- int drop_count = 1);
-
// Test the JavaScript value in source as if in a test context, compile
// control flow to a pair of labels.
void TestAndBranch(Register source, Label* true_label, Label* false_label);

Powered by Google App Engine
This is Rietveld 408576698