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

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

Issue 1828253002: [builtins] Provide Math.floor as TurboFan builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Address feedback. 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/i18n.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 12707 matching lines...) Expand 10 before | Expand all | Expand 10 after
12718 12718
12719 void HOptimizedGraphBuilder::GenerateMathClz32(CallRuntime* call) { 12719 void HOptimizedGraphBuilder::GenerateMathClz32(CallRuntime* call) {
12720 DCHECK(call->arguments()->length() == 1); 12720 DCHECK(call->arguments()->length() == 1);
12721 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12721 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12722 HValue* value = Pop(); 12722 HValue* value = Pop();
12723 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathClz32); 12723 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathClz32);
12724 return ast_context()->ReturnInstruction(result, call->id()); 12724 return ast_context()->ReturnInstruction(result, call->id());
12725 } 12725 }
12726 12726
12727 12727
12728 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) {
12729 DCHECK(call->arguments()->length() == 1);
12730 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12731 HValue* value = Pop();
12732 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor);
12733 return ast_context()->ReturnInstruction(result, call->id());
12734 }
12735
12736
12737 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { 12728 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) {
12738 DCHECK(call->arguments()->length() == 1); 12729 DCHECK(call->arguments()->length() == 1);
12739 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12730 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12740 HValue* value = Pop(); 12731 HValue* value = Pop();
12741 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); 12732 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog);
12742 return ast_context()->ReturnInstruction(result, call->id()); 12733 return ast_context()->ReturnInstruction(result, call->id());
12743 } 12734 }
12744 12735
12745 12736
12746 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) { 12737 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) {
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
13596 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13587 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13597 } 13588 }
13598 13589
13599 #ifdef DEBUG 13590 #ifdef DEBUG
13600 graph_->Verify(false); // No full verify. 13591 graph_->Verify(false); // No full verify.
13601 #endif 13592 #endif
13602 } 13593 }
13603 13594
13604 } // namespace internal 13595 } // namespace internal
13605 } // namespace v8 13596 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/js/i18n.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698