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 12212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12223 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12223 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12224 HValue* value = Pop(); | 12224 HValue* value = Pop(); |
12225 HHasInstanceTypeAndBranch* result = | 12225 HHasInstanceTypeAndBranch* result = |
12226 New<HHasInstanceTypeAndBranch>(value, | 12226 New<HHasInstanceTypeAndBranch>(value, |
12227 FIRST_JS_RECEIVER_TYPE, | 12227 FIRST_JS_RECEIVER_TYPE, |
12228 LAST_JS_RECEIVER_TYPE); | 12228 LAST_JS_RECEIVER_TYPE); |
12229 return ast_context()->ReturnControl(result, call->id()); | 12229 return ast_context()->ReturnControl(result, call->id()); |
12230 } | 12230 } |
12231 | 12231 |
12232 | 12232 |
12233 void HOptimizedGraphBuilder::GenerateIsFunction(CallRuntime* call) { | |
12234 DCHECK(call->arguments()->length() == 1); | |
12235 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | |
12236 HValue* value = Pop(); | |
12237 HHasInstanceTypeAndBranch* result = New<HHasInstanceTypeAndBranch>( | |
12238 value, FIRST_FUNCTION_TYPE, LAST_FUNCTION_TYPE); | |
12239 return ast_context()->ReturnControl(result, call->id()); | |
12240 } | |
12241 | |
12242 | |
12243 void HOptimizedGraphBuilder::GenerateIsMinusZero(CallRuntime* call) { | 12233 void HOptimizedGraphBuilder::GenerateIsMinusZero(CallRuntime* call) { |
12244 DCHECK(call->arguments()->length() == 1); | 12234 DCHECK(call->arguments()->length() == 1); |
12245 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12235 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12246 HValue* value = Pop(); | 12236 HValue* value = Pop(); |
12247 HCompareMinusZeroAndBranch* result = New<HCompareMinusZeroAndBranch>(value); | 12237 HCompareMinusZeroAndBranch* result = New<HCompareMinusZeroAndBranch>(value); |
12248 return ast_context()->ReturnControl(result, call->id()); | 12238 return ast_context()->ReturnControl(result, call->id()); |
12249 } | 12239 } |
12250 | 12240 |
12251 | 12241 |
12252 void HOptimizedGraphBuilder::GenerateHasCachedArrayIndex(CallRuntime* call) { | 12242 void HOptimizedGraphBuilder::GenerateHasCachedArrayIndex(CallRuntime* call) { |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13665 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13655 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13666 } | 13656 } |
13667 | 13657 |
13668 #ifdef DEBUG | 13658 #ifdef DEBUG |
13669 graph_->Verify(false); // No full verify. | 13659 graph_->Verify(false); // No full verify. |
13670 #endif | 13660 #endif |
13671 } | 13661 } |
13672 | 13662 |
13673 } // namespace internal | 13663 } // namespace internal |
13674 } // namespace v8 | 13664 } // namespace v8 |
OLD | NEW |