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

Side by Side Diff: src/hydrogen.cc

Issue 1021183002: [turbofan] Turn Math.clz32 into an inlinable builtin. (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/hydrogen.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 12012 matching lines...) Expand 10 before | Expand all | Expand 10 after
12023 DCHECK_EQ(2, call->arguments()->length()); 12023 DCHECK_EQ(2, call->arguments()->length());
12024 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12024 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12025 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 12025 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12026 HValue* right = Pop(); 12026 HValue* right = Pop();
12027 HValue* left = Pop(); 12027 HValue* left = Pop();
12028 HInstruction* result = NewUncasted<HPower>(left, right); 12028 HInstruction* result = NewUncasted<HPower>(left, right);
12029 return ast_context()->ReturnInstruction(result, call->id()); 12029 return ast_context()->ReturnInstruction(result, call->id());
12030 } 12030 }
12031 12031
12032 12032
12033 void HOptimizedGraphBuilder::GenerateMathClz32(CallRuntime* call) {
12034 DCHECK(call->arguments()->length() == 1);
12035 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12036 HValue* value = Pop();
12037 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathClz32);
12038 return ast_context()->ReturnInstruction(result, call->id());
12039 }
12040
12041
12033 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) { 12042 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) {
12034 DCHECK(call->arguments()->length() == 1); 12043 DCHECK(call->arguments()->length() == 1);
12035 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12044 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12036 HValue* value = Pop(); 12045 HValue* value = Pop();
12037 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor); 12046 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor);
12038 return ast_context()->ReturnInstruction(result, call->id()); 12047 return ast_context()->ReturnInstruction(result, call->id());
12039 } 12048 }
12040 12049
12041 12050
12042 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { 12051 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) {
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
13413 if (ShouldProduceTraceOutput()) { 13422 if (ShouldProduceTraceOutput()) {
13414 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13423 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13415 } 13424 }
13416 13425
13417 #ifdef DEBUG 13426 #ifdef DEBUG
13418 graph_->Verify(false); // No full verify. 13427 graph_->Verify(false); // No full verify.
13419 #endif 13428 #endif
13420 } 13429 }
13421 13430
13422 } } // namespace v8::internal 13431 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698