| 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 12028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12039 DCHECK_EQ(2, call->arguments()->length()); | 12039 DCHECK_EQ(2, call->arguments()->length()); |
| 12040 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12040 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12041 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 12041 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| 12042 HValue* right = Pop(); | 12042 HValue* right = Pop(); |
| 12043 HValue* left = Pop(); | 12043 HValue* left = Pop(); |
| 12044 HInstruction* result = NewUncasted<HPower>(left, right); | 12044 HInstruction* result = NewUncasted<HPower>(left, right); |
| 12045 return ast_context()->ReturnInstruction(result, call->id()); | 12045 return ast_context()->ReturnInstruction(result, call->id()); |
| 12046 } | 12046 } |
| 12047 | 12047 |
| 12048 | 12048 |
| 12049 void HOptimizedGraphBuilder::GenerateMathFloor(CallRuntime* call) { |
| 12050 DCHECK(call->arguments()->length() == 1); |
| 12051 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12052 HValue* value = Pop(); |
| 12053 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathFloor); |
| 12054 return ast_context()->ReturnInstruction(result, call->id()); |
| 12055 } |
| 12056 |
| 12057 |
| 12049 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { | 12058 void HOptimizedGraphBuilder::GenerateMathLogRT(CallRuntime* call) { |
| 12050 DCHECK(call->arguments()->length() == 1); | 12059 DCHECK(call->arguments()->length() == 1); |
| 12051 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12060 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 12052 HValue* value = Pop(); | 12061 HValue* value = Pop(); |
| 12053 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); | 12062 HInstruction* result = NewUncasted<HUnaryMathOperation>(value, kMathLog); |
| 12054 return ast_context()->ReturnInstruction(result, call->id()); | 12063 return ast_context()->ReturnInstruction(result, call->id()); |
| 12055 } | 12064 } |
| 12056 | 12065 |
| 12057 | 12066 |
| 12058 void HOptimizedGraphBuilder::GenerateMathSqrtRT(CallRuntime* call) { | 12067 void HOptimizedGraphBuilder::GenerateMathSqrtRT(CallRuntime* call) { |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13427 if (ShouldProduceTraceOutput()) { | 13436 if (ShouldProduceTraceOutput()) { |
| 13428 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13437 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13429 } | 13438 } |
| 13430 | 13439 |
| 13431 #ifdef DEBUG | 13440 #ifdef DEBUG |
| 13432 graph_->Verify(false); // No full verify. | 13441 graph_->Verify(false); // No full verify. |
| 13433 #endif | 13442 #endif |
| 13434 } | 13443 } |
| 13435 | 13444 |
| 13436 } } // namespace v8::internal | 13445 } } // namespace v8::internal |
| OLD | NEW |