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

Unified Diff: src/full-codegen.cc

Issue 3116042: Prepare for optionally inlining smi cases in the code generated... (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
===================================================================
--- src/full-codegen.cc (revision 5341)
+++ src/full-codegen.cc (working copy)
@@ -318,9 +318,15 @@
bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) {
- if (Debugger::IsDebuggerActive()) return false;
- if (op == Token::DIV ||op == Token::MOD) return false;
- return loop_depth_ > 0;
+ // TODO(kasperl): Once the compare stub allows leaving out the
+ // inlined smi case, we should get rid of this check.
+ if (Token::IsCompareOp(op)) return true;
+ // TODO(kasperl): Once the unary bit not stub allows leaving out
+ // the inlined smi case, we should get rid of this check.
+ if (op == Token::BIT_NOT) return true;
+ // Inline smi case inside loops, but not division and modulo which
+ // are too complicated and take up too much space.
+ return (op != Token::DIV) && (op != Token::MOD) && (loop_depth_ > 0);
}
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698