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

Unified Diff: src/codegen-ia32.h

Issue 21538: Add constant folding and optimization for constant smi operands to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.h
===================================================================
--- src/codegen-ia32.h (revision 1375)
+++ src/codegen-ia32.h (working copy)
@@ -478,6 +478,28 @@
StaticType* type,
const OverwriteMode overwrite_mode = NO_OVERWRITE);
+ // If possible, combine two constant smi values using op to produce
+ // a smi result, and push it on the virtual frame, all at compile time.
+ // Returns true if it succeeds. Otherwise it has no effect.
+ bool FoldConstantSmis(Token::Value op, int left, int right);
+
+ // Emit code to perform a binary operation on
+ // a constant smi and a likely smi. Consumes the argument "operand".
+ void ConstantSmiBinaryOperation(Token::Value op,
+ Result* operand,
+ Handle<Object> constant_operand,
+ StaticType* type,
+ bool reversed,
+ OverwriteMode overwrite_mode);
+
+ // Emit code to perform a binary operation on
+ // two likely smis. The code to handle smi arguments is produced inline.
+ // Consumes the arguments left and right.
+ void LikelySmiBinaryOperation(Token::Value op,
+ Result* left,
+ Result* right,
+ OverwriteMode overwrite_mode);
+
void Comparison(Condition cc,
bool strict,
ControlDestination* destination);
@@ -491,13 +513,6 @@
// at most 16 bits of user-controlled data per assembly operation.
void LoadUnsafeSmi(Register target, Handle<Object> value);
- bool IsInlineSmi(Literal* literal);
- void SmiOperation(Token::Value op,
- StaticType* type,
- Handle<Object> value,
- bool reversed,
- OverwriteMode overwrite_mode);
-
void CallWithArguments(ZoneList<Expression*>* arguments, int position);
void CheckStack();
« no previous file with comments | « no previous file | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698