| 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 11666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11677 instance_type, Add<HConstant>(FIRST_JS_PROXY_TYPE), Token::GTE); | 11677 instance_type, Add<HConstant>(FIRST_JS_PROXY_TYPE), Token::GTE); |
| 11678 if_proxy.And(); | 11678 if_proxy.And(); |
| 11679 if_proxy.If<HCompareNumericAndBranch>( | 11679 if_proxy.If<HCompareNumericAndBranch>( |
| 11680 instance_type, Add<HConstant>(LAST_JS_PROXY_TYPE), Token::LTE); | 11680 instance_type, Add<HConstant>(LAST_JS_PROXY_TYPE), Token::LTE); |
| 11681 | 11681 |
| 11682 if_proxy.CaptureContinuation(&continuation); | 11682 if_proxy.CaptureContinuation(&continuation); |
| 11683 return ast_context()->ReturnContinuation(&continuation, call->id()); | 11683 return ast_context()->ReturnContinuation(&continuation, call->id()); |
| 11684 } | 11684 } |
| 11685 | 11685 |
| 11686 | 11686 |
| 11687 void HOptimizedGraphBuilder::GenerateHasFastPackedElements(CallRuntime* call) { |
| 11688 DCHECK(call->arguments()->length() == 1); |
| 11689 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11690 HValue* object = Pop(); |
| 11691 HIfContinuation continuation; |
| 11692 IfBuilder if_fast_packed(this); |
| 11693 HValue* elements_kind = BuildGetElementsKind(object); |
| 11694 if_fast_packed.If<HCompareNumericAndBranch>( |
| 11695 elements_kind, Add<HConstant>(FAST_SMI_ELEMENTS), Token::EQ); |
| 11696 if_fast_packed.Or(); |
| 11697 if_fast_packed.If<HCompareNumericAndBranch>( |
| 11698 elements_kind, Add<HConstant>(FAST_ELEMENTS), Token::EQ); |
| 11699 if_fast_packed.Or(); |
| 11700 if_fast_packed.If<HCompareNumericAndBranch>( |
| 11701 elements_kind, Add<HConstant>(FAST_DOUBLE_ELEMENTS), Token::EQ); |
| 11702 if_fast_packed.CaptureContinuation(&continuation); |
| 11703 return ast_context()->ReturnContinuation(&continuation, call->id()); |
| 11704 } |
| 11705 |
| 11706 |
| 11687 void HOptimizedGraphBuilder::GenerateIsNonNegativeSmi(CallRuntime* call) { | 11707 void HOptimizedGraphBuilder::GenerateIsNonNegativeSmi(CallRuntime* call) { |
| 11688 return Bailout(kInlinedRuntimeFunctionIsNonNegativeSmi); | 11708 return Bailout(kInlinedRuntimeFunctionIsNonNegativeSmi); |
| 11689 } | 11709 } |
| 11690 | 11710 |
| 11691 | 11711 |
| 11692 void HOptimizedGraphBuilder::GenerateIsUndetectableObject(CallRuntime* call) { | 11712 void HOptimizedGraphBuilder::GenerateIsUndetectableObject(CallRuntime* call) { |
| 11693 DCHECK(call->arguments()->length() == 1); | 11713 DCHECK(call->arguments()->length() == 1); |
| 11694 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11714 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11695 HValue* value = Pop(); | 11715 HValue* value = Pop(); |
| 11696 HIsUndetectableAndBranch* result = New<HIsUndetectableAndBranch>(value); | 11716 HIsUndetectableAndBranch* result = New<HIsUndetectableAndBranch>(value); |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12776 if (ShouldProduceTraceOutput()) { | 12796 if (ShouldProduceTraceOutput()) { |
| 12777 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12797 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12778 } | 12798 } |
| 12779 | 12799 |
| 12780 #ifdef DEBUG | 12800 #ifdef DEBUG |
| 12781 graph_->Verify(false); // No full verify. | 12801 graph_->Verify(false); // No full verify. |
| 12782 #endif | 12802 #endif |
| 12783 } | 12803 } |
| 12784 | 12804 |
| 12785 } } // namespace v8::internal | 12805 } } // namespace v8::internal |
| OLD | NEW |