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