| 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 12722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12733 | 12733 |
| 12734 void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) { | 12734 void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) { |
| 12735 DCHECK(call->arguments()->length() == 1); | 12735 DCHECK(call->arguments()->length() == 1); |
| 12736 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12736 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12737 HValue* value = Pop(); | 12737 HValue* value = Pop(); |
| 12738 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathSqrt); | 12738 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathSqrt); |
| 12739 return ast_context()->ReturnInstruction(result, call->id()); | 12739 return ast_context()->ReturnInstruction(result, call->id()); |
| 12740 } | 12740 } |
| 12741 | 12741 |
| 12742 | 12742 |
| 12743 void HOptimizedGraphBuilder::GenerateHasInPrototypeChain(CallRuntime* call) { | |
| 12744 DCHECK_EQ(2, call->arguments()->length()); | |
| 12745 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | |
| 12746 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | |
| 12747 HValue* prototype = Pop(); | |
| 12748 HValue* object = Pop(); | |
| 12749 HHasInPrototypeChainAndBranch* result = | |
| 12750 New<HHasInPrototypeChainAndBranch>(object, prototype); | |
| 12751 return ast_context()->ReturnControl(result, call->id()); | |
| 12752 } | |
| 12753 | |
| 12754 | |
| 12755 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) { | 12743 void HOptimizedGraphBuilder::GenerateFixedArrayGet(CallRuntime* call) { |
| 12756 DCHECK(call->arguments()->length() == 2); | 12744 DCHECK(call->arguments()->length() == 2); |
| 12757 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12745 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12758 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 12746 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| 12759 HValue* index = Pop(); | 12747 HValue* index = Pop(); |
| 12760 HValue* object = Pop(); | 12748 HValue* object = Pop(); |
| 12761 HInstruction* result = New<HLoadKeyed>( | 12749 HInstruction* result = New<HLoadKeyed>( |
| 12762 object, index, nullptr, nullptr, FAST_HOLEY_ELEMENTS, ALLOW_RETURN_HOLE); | 12750 object, index, nullptr, nullptr, FAST_HOLEY_ELEMENTS, ALLOW_RETURN_HOLE); |
| 12763 return ast_context()->ReturnInstruction(result, call->id()); | 12751 return ast_context()->ReturnInstruction(result, call->id()); |
| 12764 } | 12752 } |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13602 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13590 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13603 } | 13591 } |
| 13604 | 13592 |
| 13605 #ifdef DEBUG | 13593 #ifdef DEBUG |
| 13606 graph_->Verify(false); // No full verify. | 13594 graph_->Verify(false); // No full verify. |
| 13607 #endif | 13595 #endif |
| 13608 } | 13596 } |
| 13609 | 13597 |
| 13610 } // namespace internal | 13598 } // namespace internal |
| 13611 } // namespace v8 | 13599 } // namespace v8 |
| OLD | NEW |