| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 11443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11454 | 11454 |
| 11455 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( | 11455 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar( |
| 11456 CallRuntime* call) { | 11456 CallRuntime* call) { |
| 11457 ASSERT(call->arguments()->length() == 3); | 11457 ASSERT(call->arguments()->length() == 3); |
| 11458 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11458 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11459 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 11459 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| 11460 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 11460 CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); |
| 11461 HValue* value = Pop(); | 11461 HValue* value = Pop(); |
| 11462 HValue* index = Pop(); | 11462 HValue* index = Pop(); |
| 11463 HValue* string = Pop(); | 11463 HValue* string = Pop(); |
| 11464 HValue* context = environment()->LookupContext(); | |
| 11465 HInstruction* char_code = BuildStringCharCodeAt(context, string, index); | |
| 11466 AddInstruction(char_code); | |
| 11467 HSeqStringSetChar* result = new(zone()) HSeqStringSetChar( | 11464 HSeqStringSetChar* result = new(zone()) HSeqStringSetChar( |
| 11468 String::TWO_BYTE_ENCODING, string, index, value); | 11465 String::TWO_BYTE_ENCODING, string, index, value); |
| 11469 return ast_context()->ReturnInstruction(result, call->id()); | 11466 return ast_context()->ReturnInstruction(result, call->id()); |
| 11470 } | 11467 } |
| 11471 | 11468 |
| 11472 | 11469 |
| 11473 void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) { | 11470 void HOptimizedGraphBuilder::GenerateSetValueOf(CallRuntime* call) { |
| 11474 ASSERT(call->arguments()->length() == 2); | 11471 ASSERT(call->arguments()->length() == 2); |
| 11475 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11472 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
| 11476 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 11473 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12473 } | 12470 } |
| 12474 } | 12471 } |
| 12475 | 12472 |
| 12476 #ifdef DEBUG | 12473 #ifdef DEBUG |
| 12477 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 12474 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 12478 if (allocator_ != NULL) allocator_->Verify(); | 12475 if (allocator_ != NULL) allocator_->Verify(); |
| 12479 #endif | 12476 #endif |
| 12480 } | 12477 } |
| 12481 | 12478 |
| 12482 } } // namespace v8::internal | 12479 } } // namespace v8::internal |
| OLD | NEW |