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 12012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12023 DCHECK_EQ(2, call->arguments()->length()); | 12023 DCHECK_EQ(2, call->arguments()->length()); |
12024 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12024 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12025 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 12025 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
12026 HValue* right = Pop(); | 12026 HValue* right = Pop(); |
12027 HValue* left = Pop(); | 12027 HValue* left = Pop(); |
12028 HInstruction* result = NewUncasted<HPower>(left, right); | 12028 HInstruction* result = NewUncasted<HPower>(left, right); |
12029 return ast_context()->ReturnInstruction(result, call->id()); | 12029 return ast_context()->ReturnInstruction(result, call->id()); |
12030 } | 12030 } |
12031 | 12031 |
12032 | 12032 |
| 12033 void HOptimizedGraphBuilder::GenerateMathClz32(CallRuntime* call) { |
| 12034 DCHECK(call->arguments()->length() == 1); |
| 12035 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12036 HValue* value = Pop(); |
| 12037 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathClz32); |
| 12038 return ast_context()->ReturnInstruction(result, call->id()); |
| 12039 } |
| 12040 |
| 12041 |
12033 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) { | 12042 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) { |
12034 DCHECK(call->arguments()->length() == 1); | 12043 DCHECK(call->arguments()->length() == 1); |
12035 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12044 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
12036 HValue* value = Pop(); | 12045 HValue* value = Pop(); |
12037 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor); | 12046 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor); |
12038 return ast_context()->ReturnInstruction(result, call->id()); | 12047 return ast_context()->ReturnInstruction(result, call->id()); |
12039 } | 12048 } |
12040 | 12049 |
12041 | 12050 |
12042 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { | 12051 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13413 if (ShouldProduceTraceOutput()) { | 13422 if (ShouldProduceTraceOutput()) { |
13414 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13423 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13415 } | 13424 } |
13416 | 13425 |
13417 #ifdef DEBUG | 13426 #ifdef DEBUG |
13418 graph_->Verify(false); // No full verify. | 13427 graph_->Verify(false); // No full verify. |
13419 #endif | 13428 #endif |
13420 } | 13429 } |
13421 | 13430 |
13422 } } // namespace v8::internal | 13431 } } // namespace v8::internal |
OLD | NEW |