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

Unified Diff: src/hydrogen.cc

Issue 5767002: Merge math function ids and custom call generator ids. (Closed)
Patch Set: arm and x64 fixes. Created 10 years 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/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 153bd9aae9cb02a5121a45ce991363a50f109f94..3193ab54543f040f8b9cd5c4c1df2dc029f60ddb 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4074,7 +4074,8 @@ void HBasicBlock::AddLeaveInlined(HValue* return_value, HBasicBlock* target) {
bool HGraphBuilder::TryMathFunctionInline(Call* expr) {
// Try to inline calls like Math.* as operations in the calling function.
- MathFunctionId id = expr->target()->shared()->math_function_id();
+ if (!expr->target()->shared()->IsBuiltinMathFunction()) return false;
+ BuiltinFunctionId id = expr->target()->shared()->builtin_function_id();
int argument_count = expr->arguments()->length() + 1; // Plus receiver.
switch (id) {
case kMathRound:
@@ -4136,7 +4137,7 @@ bool HGraphBuilder::TryMathFunctionInline(Call* expr) {
}
break;
default:
- // Either not a special math function or not yet supported for inlining.
+ // Not yet supported for inlining.
break;
}
return false;
« no previous file with comments | « src/bootstrapper.cc ('k') | src/hydrogen-instructions.h » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698