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

Side by Side Diff: src/hydrogen.cc

Issue 990963003: [turbofan] Unify Math.floor / Math.ceil optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 12028 matching lines...) Expand 10 before | Expand all | Expand 10 after
12039 DCHECK_EQ(2, call->arguments()->length()); 12039 DCHECK_EQ(2, call->arguments()->length());
12040 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12040 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12041 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 12041 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12042 HValue* right = Pop(); 12042 HValue* right = Pop();
12043 HValue* left = Pop(); 12043 HValue* left = Pop();
12044 HInstruction* result = NewUncasted<HPower>(left, right); 12044 HInstruction* result = NewUncasted<HPower>(left, right);
12045 return ast_context()->ReturnInstruction(result, call->id()); 12045 return ast_context()->ReturnInstruction(result, call->id());
12046 } 12046 }
12047 12047
12048 12048
12049 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) {
12050 DCHECK(call->arguments()->length() == 1);
12051 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12052 HValue* value = Pop();
12053 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor);
12054 return ast_context()->ReturnInstruction(result, call->id());
12055 }
12056
12057
12049 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { 12058 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) {
12050 DCHECK(call->arguments()->length() == 1); 12059 DCHECK(call->arguments()->length() == 1);
12051 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12060 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12052 HValue* value = Pop(); 12061 HValue* value = Pop();
12053 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); 12062 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog);
12054 return ast_context()->ReturnInstruction(result, call->id()); 12063 return ast_context()->ReturnInstruction(result, call->id());
12055 } 12064 }
12056 12065
12057 12066
12058 void HOptimizedGraphBuilder::GenerateMathSqrtRT(CallRuntime* call) { 12067 void HOptimizedGraphBuilder::GenerateMathSqrtRT(CallRuntime* call) {
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
13427 if (ShouldProduceTraceOutput()) { 13436 if (ShouldProduceTraceOutput()) {
13428 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13437 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13429 } 13438 }
13430 13439
13431 #ifdef DEBUG 13440 #ifdef DEBUG
13432 graph_->Verify(false); // No full verify. 13441 graph_->Verify(false); // No full verify.
13433 #endif 13442 #endif
13434 } 13443 }
13435 13444
13436 } } // namespace v8::internal 13445 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698