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/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
(...skipping 12024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12035 void HOptimizedGraphBuilder::GenerateIsRegExp(CallRuntime* call) { | 12035 void HOptimizedGraphBuilder::GenerateIsRegExp(CallRuntime* call) { |
12036 DCHECK(call->arguments()->length() == 1); | 12036 DCHECK(call->arguments()->length() == 1); |
12037 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12037 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12038 HValue* value = Pop(); | 12038 HValue* value = Pop(); |
12039 HHasInstanceTypeAndBranch* result = | 12039 HHasInstanceTypeAndBranch* result = |
12040 New<HHasInstanceTypeAndBranch>(value, JS_REGEXP_TYPE); | 12040 New<HHasInstanceTypeAndBranch>(value, JS_REGEXP_TYPE); |
12041 return ast_context()->ReturnControl(result, call->id()); | 12041 return ast_context()->ReturnControl(result, call->id()); |
12042 } | 12042 } |
12043 | 12043 |
12044 | 12044 |
12045 void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) { | |
12046 DCHECK(call->arguments()->length() == 1); | |
12047 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | |
12048 HValue* value = Pop(); | |
12049 HIsObjectAndBranch* result = New<HIsObjectAndBranch>(value); | |
12050 return ast_context()->ReturnControl(result, call->id()); | |
12051 } | |
12052 | |
12053 | |
12054 void HOptimizedGraphBuilder::GenerateToObject(CallRuntime* call) { | 12045 void HOptimizedGraphBuilder::GenerateToObject(CallRuntime* call) { |
12055 DCHECK_EQ(1, call->arguments()->length()); | 12046 DCHECK_EQ(1, call->arguments()->length()); |
12056 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12047 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12057 HValue* value = Pop(); | 12048 HValue* value = Pop(); |
12058 HValue* result = BuildToObject(value); | 12049 HValue* result = BuildToObject(value); |
12059 return ast_context()->ReturnValue(result); | 12050 return ast_context()->ReturnValue(result); |
12060 } | 12051 } |
12061 | 12052 |
12062 | 12053 |
12063 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) { | 12054 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) { |
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13458 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13449 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13459 } | 13450 } |
13460 | 13451 |
13461 #ifdef DEBUG | 13452 #ifdef DEBUG |
13462 graph_->Verify(false); // No full verify. | 13453 graph_->Verify(false); // No full verify. |
13463 #endif | 13454 #endif |
13464 } | 13455 } |
13465 | 13456 |
13466 } // namespace internal | 13457 } // namespace internal |
13467 } // namespace v8 | 13458 } // namespace v8 |
OLD | NEW |