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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1852553003: [builtins] Migrate Math.clz32 to a TurboFan builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/crankshaft/hydrogen.h ('k') | src/js/math.js » ('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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 12673 matching lines...) Expand 10 before | Expand all | Expand 10 after
12684 DCHECK_EQ(2, call->arguments()->length()); 12684 DCHECK_EQ(2, call->arguments()->length());
12685 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12685 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12686 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 12686 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12687 HValue* right = Pop(); 12687 HValue* right = Pop();
12688 HValue* left = Pop(); 12688 HValue* left = Pop();
12689 HInstruction* result = NewUncasted<HPower>(left, right); 12689 HInstruction* result = NewUncasted<HPower>(left, right);
12690 return ast_context()->ReturnInstruction(result, call->id()); 12690 return ast_context()->ReturnInstruction(result, call->id());
12691 } 12691 }
12692 12692
12693 12693
12694 void HOptimizedGraphBuilder::GenerateMathClz32(CallRuntime* call) {
12695 DCHECK(call->arguments()->length() == 1);
12696 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12697 HValue* value = Pop();
12698 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathClz32);
12699 return ast_context()->ReturnInstruction(result, call->id());
12700 }
12701
12702
12703 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { 12694 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) {
12704 DCHECK(call->arguments()->length() == 1); 12695 DCHECK(call->arguments()->length() == 1);
12705 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12696 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12706 HValue* value = Pop(); 12697 HValue* value = Pop();
12707 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); 12698 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog);
12708 return ast_context()->ReturnInstruction(result, call->id()); 12699 return ast_context()->ReturnInstruction(result, call->id());
12709 } 12700 }
12710 12701
12711 12702
12712 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) { 12703 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) {
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
13562 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13553 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13563 } 13554 }
13564 13555
13565 #ifdef DEBUG 13556 #ifdef DEBUG
13566 graph_->Verify(false); // No full verify. 13557 graph_->Verify(false); // No full verify.
13567 #endif 13558 #endif
13568 } 13559 }
13569 13560
13570 } // namespace internal 13561 } // namespace internal
13571 } // namespace v8 13562 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/js/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698