OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 9697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9708 | 9708 |
9709 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( | 9709 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( |
9710 CallRuntime* call) { | 9710 CallRuntime* call) { |
9711 ASSERT(call->arguments()->length() == 3); | 9711 ASSERT(call->arguments()->length() == 3); |
9712 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 9712 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
9713 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 9713 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
9714 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 9714 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
9715 HValue* value = Pop(); | 9715 HValue* value = Pop(); |
9716 HValue* index = Pop(); | 9716 HValue* index = Pop(); |
9717 HValue* string = Pop(); | 9717 HValue* string = Pop(); |
9718 HSeqStringSetChar* result = New<HSeqStringSetChar>( | 9718 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, |
9719 String::ONE_BYTE_ENCODING, string, index, value); | 9719 index, value); |
9720 return ast_context()->ReturnInstruction(result, call->id()); | 9720 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
| 9721 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
9721 } | 9722 } |
9722 | 9723 |
9723 | 9724 |
9724 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( | 9725 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( |
9725 CallRuntime* call) { | 9726 CallRuntime* call) { |
9726 ASSERT(call->arguments()->length() == 3); | 9727 ASSERT(call->arguments()->length() == 3); |
9727 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 9728 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
9728 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 9729 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
9729 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 9730 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
9730 HValue* value = Pop(); | 9731 HValue* value = Pop(); |
9731 HValue* index = Pop(); | 9732 HValue* index = Pop(); |
9732 HValue* string = Pop(); | 9733 HValue* string = Pop(); |
9733 HSeqStringSetChar* result = New<HSeqStringSetChar>( | 9734 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string, |
9734 String::TWO_BYTE_ENCODING, string, index, value); | 9735 index, value); |
9735 return ast_context()->ReturnInstruction(result, call->id()); | 9736 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
| 9737 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
9736 } | 9738 } |
9737 | 9739 |
9738 | 9740 |
9739 void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) { | 9741 void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) { |
9740 ASSERT(call->arguments()->length() == 2); | 9742 ASSERT(call->arguments()->length() == 2); |
9741 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 9743 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
9742 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 9744 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
9743 HValue* value = Pop(); | 9745 HValue* value = Pop(); |
9744 HValue* object = Pop(); | 9746 HValue* object = Pop(); |
9745 // Check if object is a not a smi. | 9747 // Check if object is a not a smi. |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10623 if (ShouldProduceTraceOutput()) { | 10625 if (ShouldProduceTraceOutput()) { |
10624 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 10626 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
10625 } | 10627 } |
10626 | 10628 |
10627 #ifdef DEBUG | 10629 #ifdef DEBUG |
10628 graph_->Verify(false); // No full verify. | 10630 graph_->Verify(false); // No full verify. |
10629 #endif | 10631 #endif |
10630 } | 10632 } |
10631 | 10633 |
10632 } } // namespace v8::internal | 10634 } } // namespace v8::internal |
OLD | NEW |