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 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3733 generator.GenerateSlow(masm_, call_helper); | 3733 generator.GenerateSlow(masm_, call_helper); |
3734 | 3734 |
3735 __ bind(&done); | 3735 __ bind(&done); |
3736 context()->Plug(result); | 3736 context()->Plug(result); |
3737 } | 3737 } |
3738 | 3738 |
3739 | 3739 |
3740 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { | 3740 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
3741 ZoneList<Expression*>* args = expr->arguments(); | 3741 ZoneList<Expression*>* args = expr->arguments(); |
3742 ASSERT_EQ(2, args->length()); | 3742 ASSERT_EQ(2, args->length()); |
3743 VisitForStackValue(args->at(0)); | 3743 if (FLAG_new_string_add) { |
3744 VisitForStackValue(args->at(1)); | 3744 VisitForStackValue(args->at(0)); |
| 3745 VisitForAccumulatorValue(args->at(1)); |
3745 | 3746 |
3746 StringAddStub stub(STRING_ADD_CHECK_BOTH); | 3747 __ pop(a1); |
3747 __ CallStub(&stub); | 3748 NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED); |
| 3749 __ CallStub(&stub); |
| 3750 } else { |
| 3751 VisitForStackValue(args->at(0)); |
| 3752 VisitForStackValue(args->at(1)); |
| 3753 |
| 3754 StringAddStub stub(STRING_ADD_CHECK_BOTH); |
| 3755 __ CallStub(&stub); |
| 3756 } |
3748 context()->Plug(v0); | 3757 context()->Plug(v0); |
3749 } | 3758 } |
3750 | 3759 |
3751 | 3760 |
3752 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { | 3761 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
3753 ZoneList<Expression*>* args = expr->arguments(); | 3762 ZoneList<Expression*>* args = expr->arguments(); |
3754 ASSERT_EQ(2, args->length()); | 3763 ASSERT_EQ(2, args->length()); |
3755 | 3764 |
3756 VisitForStackValue(args->at(0)); | 3765 VisitForStackValue(args->at(0)); |
3757 VisitForStackValue(args->at(1)); | 3766 VisitForStackValue(args->at(1)); |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5016 Assembler::target_address_at(pc_immediate_load_address)) == | 5025 Assembler::target_address_at(pc_immediate_load_address)) == |
5017 reinterpret_cast<uint32_t>( | 5026 reinterpret_cast<uint32_t>( |
5018 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5027 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5019 return OSR_AFTER_STACK_CHECK; | 5028 return OSR_AFTER_STACK_CHECK; |
5020 } | 5029 } |
5021 | 5030 |
5022 | 5031 |
5023 } } // namespace v8::internal | 5032 } } // namespace v8::internal |
5024 | 5033 |
5025 #endif // V8_TARGET_ARCH_MIPS | 5034 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |