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

Unified Diff: src/codegen-ia32.h

Issue 42006: Optimize binary operations in which one or both operands is a constant smi. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 1620)
+++ src/codegen-ia32.h (working copy)
@@ -436,6 +436,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 Result *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 Results *left and *right.
+ void LikelySmiBinaryOperation(Token::Value op,
+ Result* left,
+ Result* right,
+ OverwriteMode overwrite_mode);
+
void Comparison(Condition cc,
bool strict,
ControlDestination* destination);
@@ -449,13 +471,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();
@@ -562,7 +577,6 @@
#endif
bool is_eval_; // Tells whether code is generated for eval.
-
Handle<Script> script_;
List<DeferredCode*> deferred_;
« 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