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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10915200: Optimistically inline Math.sqrt as unboxed sqrtsd instruction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index a3b0c89415a90b0f5445411852af86e59c03304e..66c90a56c81ba7acf4c835ac45bc98d6aab1fffe 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -1059,6 +1059,11 @@ RawAbstractType* UnboxedDoubleBinaryOpInstr::CompileType() const {
}
+RawAbstractType* MathSqrtInstr::CompileType() const {
+ return Type::Double();
+}
+
+
RawAbstractType* UnboxDoubleInstr::CompileType() const {
return Type::null();
}
@@ -1468,18 +1473,12 @@ LocationSummary* StaticCallInstr::MakeLocationSummary() const {
void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- Label done;
- if (recognized() == MethodRecognizer::kMathSqrt) {
- compiler->GenerateInlinedMathSqrt(&done);
- // Falls through to static call when operand type is not double or smi.
- }
compiler->GenerateStaticCall(deopt_id(),
token_pos(),
function(),
ArgumentCount(),
argument_names(),
locs());
- __ Bind(&done);
}

Powered by Google App Engine
This is Rietveld 408576698