| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 11521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11532 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11532 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11533 HValue* date = Pop(); | 11533 HValue* date = Pop(); |
| 11534 HDateField* result = New<HDateField>(date, index); | 11534 HDateField* result = New<HDateField>(date, index); |
| 11535 return ast_context()->ReturnInstruction(result, call->id()); | 11535 return ast_context()->ReturnInstruction(result, call->id()); |
| 11536 } | 11536 } |
| 11537 | 11537 |
| 11538 | 11538 |
| 11539 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( | 11539 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( |
| 11540 CallRuntime* call) { | 11540 CallRuntime* call) { |
| 11541 DCHECK(call->arguments()->length() == 3); | 11541 DCHECK(call->arguments()->length() == 3); |
| 11542 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11542 // We need to follow the evaluation order of full codegen. |
| 11543 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 11543 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| 11544 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 11544 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
| 11545 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11545 HValue* string = Pop(); | 11546 HValue* string = Pop(); |
| 11546 HValue* value = Pop(); | 11547 HValue* value = Pop(); |
| 11547 HValue* index = Pop(); | 11548 HValue* index = Pop(); |
| 11548 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, | 11549 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, |
| 11549 index, value); | 11550 index, value); |
| 11550 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 11551 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
| 11551 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); | 11552 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
| 11552 } | 11553 } |
| 11553 | 11554 |
| 11554 | 11555 |
| 11555 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( | 11556 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( |
| 11556 CallRuntime* call) { | 11557 CallRuntime* call) { |
| 11557 DCHECK(call->arguments()->length() == 3); | 11558 DCHECK(call->arguments()->length() == 3); |
| 11558 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11559 // We need to follow the evaluation order of full codegen. |
| 11559 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 11560 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| 11560 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 11561 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
| 11562 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11561 HValue* string = Pop(); | 11563 HValue* string = Pop(); |
| 11562 HValue* value = Pop(); | 11564 HValue* value = Pop(); |
| 11563 HValue* index = Pop(); | 11565 HValue* index = Pop(); |
| 11564 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string, | 11566 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string, |
| 11565 index, value); | 11567 index, value); |
| 11566 Add<HSimulate>(call->id(), FIXED_SIMULATE); | 11568 Add<HSimulate>(call->id(), FIXED_SIMULATE); |
| 11567 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); | 11569 return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |
| 11568 } | 11570 } |
| 11569 | 11571 |
| 11570 | 11572 |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12491 if (ShouldProduceTraceOutput()) { | 12493 if (ShouldProduceTraceOutput()) { |
| 12492 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12494 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 12493 } | 12495 } |
| 12494 | 12496 |
| 12495 #ifdef DEBUG | 12497 #ifdef DEBUG |
| 12496 graph_->Verify(false); // No full verify. | 12498 graph_->Verify(false); // No full verify. |
| 12497 #endif | 12499 #endif |
| 12498 } | 12500 } |
| 12499 | 12501 |
| 12500 } } // namespace v8::internal | 12502 } } // namespace v8::internal |
| OLD | NEW |