OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |