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 12734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12745 | 12745 |
12746 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { | 12746 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { |
12747 DCHECK(call->arguments()->length() == 1); | 12747 DCHECK(call->arguments()->length() == 1); |
12748 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12748 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12749 HValue* value = Pop(); | 12749 HValue* value = Pop(); |
12750 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); | 12750 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); |
12751 return ast_context()->ReturnInstruction(result, call->id()); | 12751 return ast_context()->ReturnInstruction(result, call->id()); |
12752 } | 12752 } |
12753 | 12753 |
12754 | 12754 |
12755 void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) { | |
12756 DCHECK(call->arguments()->length() == 1); | |
12757 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | |
12758 HValue* value = Pop(); | |
12759 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathSqrt); | |
12760 return ast_context()->ReturnInstruction(result, call->id()); | |
12761 } | |
12762 | |
12763 | |
12764 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) { | 12755 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) { |
12765 DCHECK(call->arguments()->length() == 2); | 12756 DCHECK(call->arguments()->length() == 2); |
12766 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12757 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12767 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 12758 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
12768 HValue* index = Pop(); | 12759 HValue* index = Pop(); |
12769 HValue* object = Pop(); | 12760 HValue* object = Pop(); |
12770 HInstruction* result = New<HLoadKeyed>( | 12761 HInstruction* result = New<HLoadKeyed>( |
12771 object, index, nullptr, nullptr, FAST_HOLEY_ELEMENTS, ALLOW_RETURN_HOLE); | 12762 object, index, nullptr, nullptr, FAST_HOLEY_ELEMENTS, ALLOW_RETURN_HOLE); |
12772 return ast_context()->ReturnInstruction(result, call->id()); | 12763 return ast_context()->ReturnInstruction(result, call->id()); |
12773 } | 12764 } |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13607 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13598 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13608 } | 13599 } |
13609 | 13600 |
13610 #ifdef DEBUG | 13601 #ifdef DEBUG |
13611 graph_->Verify(false); // No full verify. | 13602 graph_->Verify(false); // No full verify. |
13612 #endif | 13603 #endif |
13613 } | 13604 } |
13614 | 13605 |
13615 } // namespace internal | 13606 } // namespace internal |
13616 } // namespace v8 | 13607 } // namespace v8 |
OLD | NEW |