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 "hydrogen.h" | 5 #include "hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "v8.h" | 9 #include "v8.h" |
10 #include "allocation-site-scopes.h" | 10 #include "allocation-site-scopes.h" |
(...skipping 10776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10787 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10787 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
10788 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 10788 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
10789 HValue* right = Pop(); | 10789 HValue* right = Pop(); |
10790 HValue* left = Pop(); | 10790 HValue* left = Pop(); |
10791 HCompareObjectEqAndBranch* result = | 10791 HCompareObjectEqAndBranch* result = |
10792 New<HCompareObjectEqAndBranch>(left, right); | 10792 New<HCompareObjectEqAndBranch>(left, right); |
10793 return ast_context()->ReturnControl(result, call->id()); | 10793 return ast_context()->ReturnControl(result, call->id()); |
10794 } | 10794 } |
10795 | 10795 |
10796 | 10796 |
10797 void HOptimizedGraphBuilder::GenerateLog(CallRuntime* call) { | |
10798 // %_Log is ignored in optimized code. | |
10799 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); | |
10800 } | |
10801 | |
10802 | |
10803 // Fast support for StringAdd. | 10797 // Fast support for StringAdd. |
10804 void HOptimizedGraphBuilder::GenerateStringAdd(CallRuntime* call) { | 10798 void HOptimizedGraphBuilder::GenerateStringAdd(CallRuntime* call) { |
10805 ASSERT_EQ(2, call->arguments()->length()); | 10799 ASSERT_EQ(2, call->arguments()->length()); |
10806 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 10800 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
10807 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 10801 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
10808 HValue* right = Pop(); | 10802 HValue* right = Pop(); |
10809 HValue* left = Pop(); | 10803 HValue* left = Pop(); |
10810 HInstruction* result = NewUncasted<HStringAdd>(left, right); | 10804 HInstruction* result = NewUncasted<HStringAdd>(left, right); |
10811 return ast_context()->ReturnInstruction(result, call->id()); | 10805 return ast_context()->ReturnInstruction(result, call->id()); |
10812 } | 10806 } |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11643 if (ShouldProduceTraceOutput()) { | 11637 if (ShouldProduceTraceOutput()) { |
11644 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11638 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11645 } | 11639 } |
11646 | 11640 |
11647 #ifdef DEBUG | 11641 #ifdef DEBUG |
11648 graph_->Verify(false); // No full verify. | 11642 graph_->Verify(false); // No full verify. |
11649 #endif | 11643 #endif |
11650 } | 11644 } |
11651 | 11645 |
11652 } } // namespace v8::internal | 11646 } } // namespace v8::internal |
OLD | NEW |