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 12296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12307 HValue* value = Pop(); | 12307 HValue* value = Pop(); |
12308 HIfContinuation continuation; | 12308 HIfContinuation continuation; |
12309 IfBuilder if_proxy(this); | 12309 IfBuilder if_proxy(this); |
12310 | 12310 |
12311 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value); | 12311 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value); |
12312 if_proxy.And(); | 12312 if_proxy.And(); |
12313 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap()); | 12313 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap()); |
12314 HValue* instance_type = | 12314 HValue* instance_type = |
12315 Add<HLoadNamedField>(map, nullptr, HObjectAccess::ForMapInstanceType()); | 12315 Add<HLoadNamedField>(map, nullptr, HObjectAccess::ForMapInstanceType()); |
12316 if_proxy.If<HCompareNumericAndBranch>( | 12316 if_proxy.If<HCompareNumericAndBranch>( |
12317 instance_type, Add<HConstant>(FIRST_JS_PROXY_TYPE), Token::GTE); | 12317 instance_type, Add<HConstant>(JS_PROXY_TYPE), Token::EQ); |
12318 if_proxy.And(); | |
12319 if_proxy.If<HCompareNumericAndBranch>( | |
12320 instance_type, Add<HConstant>(LAST_JS_PROXY_TYPE), Token::LTE); | |
12321 | 12318 |
12322 if_proxy.CaptureContinuation(&continuation); | 12319 if_proxy.CaptureContinuation(&continuation); |
12323 return ast_context()->ReturnContinuation(&continuation, call->id()); | 12320 return ast_context()->ReturnContinuation(&continuation, call->id()); |
12324 } | 12321 } |
12325 | 12322 |
12326 | 12323 |
12327 void HOptimizedGraphBuilder::GenerateHasFastPackedElements(CallRuntime* call) { | 12324 void HOptimizedGraphBuilder::GenerateHasFastPackedElements(CallRuntime* call) { |
12328 DCHECK(call->arguments()->length() == 1); | 12325 DCHECK(call->arguments()->length() == 1); |
12329 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12326 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12330 HValue* object = Pop(); | 12327 HValue* object = Pop(); |
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13610 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13607 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13611 } | 13608 } |
13612 | 13609 |
13613 #ifdef DEBUG | 13610 #ifdef DEBUG |
13614 graph_->Verify(false); // No full verify. | 13611 graph_->Verify(false); // No full verify. |
13615 #endif | 13612 #endif |
13616 } | 13613 } |
13617 | 13614 |
13618 } // namespace internal | 13615 } // namespace internal |
13619 } // namespace v8 | 13616 } // namespace v8 |
OLD | NEW |