| 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 12082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12093 | 12093 |
| 12094 void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) { | 12094 void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) { |
| 12095 DCHECK(call->arguments()->length() == 1); | 12095 DCHECK(call->arguments()->length() == 1); |
| 12096 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12096 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12097 HValue* value = Pop(); | 12097 HValue* value = Pop(); |
| 12098 HIsObjectAndBranch* result = New<HIsObjectAndBranch>(value); | 12098 HIsObjectAndBranch* result = New<HIsObjectAndBranch>(value); |
| 12099 return ast_context()->ReturnControl(result, call->id()); | 12099 return ast_context()->ReturnControl(result, call->id()); |
| 12100 } | 12100 } |
| 12101 | 12101 |
| 12102 | 12102 |
| 12103 void HOptimizedGraphBuilder::GenerateToObject(CallRuntime* call) { |
| 12104 DCHECK_EQ(1, call->arguments()->length()); |
| 12105 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12106 HValue* value = Pop(); |
| 12107 HValue* result = BuildToObject(value); |
| 12108 return ast_context()->ReturnValue(result); |
| 12109 } |
| 12110 |
| 12111 |
| 12103 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) { | 12112 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) { |
| 12104 DCHECK(call->arguments()->length() == 1); | 12113 DCHECK(call->arguments()->length() == 1); |
| 12105 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12114 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12106 HValue* value = Pop(); | 12115 HValue* value = Pop(); |
| 12107 HIfContinuation continuation; | 12116 HIfContinuation continuation; |
| 12108 IfBuilder if_proxy(this); | 12117 IfBuilder if_proxy(this); |
| 12109 | 12118 |
| 12110 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value); | 12119 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value); |
| 12111 if_proxy.And(); | 12120 if_proxy.And(); |
| 12112 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap()); | 12121 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap()); |
| (...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13498 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13507 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13499 } | 13508 } |
| 13500 | 13509 |
| 13501 #ifdef DEBUG | 13510 #ifdef DEBUG |
| 13502 graph_->Verify(false); // No full verify. | 13511 graph_->Verify(false); // No full verify. |
| 13503 #endif | 13512 #endif |
| 13504 } | 13513 } |
| 13505 | 13514 |
| 13506 } // namespace internal | 13515 } // namespace internal |
| 13507 } // namespace v8 | 13516 } // namespace v8 |
| OLD | NEW |