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 3618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3629 generator.GenerateSlow(masm_, call_helper); | 3629 generator.GenerateSlow(masm_, call_helper); |
3630 | 3630 |
3631 __ bind(&done); | 3631 __ bind(&done); |
3632 context()->Plug(result); | 3632 context()->Plug(result); |
3633 } | 3633 } |
3634 | 3634 |
3635 | 3635 |
3636 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { | 3636 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
3637 ZoneList<Expression*>* args = expr->arguments(); | 3637 ZoneList<Expression*>* args = expr->arguments(); |
3638 ASSERT_EQ(2, args->length()); | 3638 ASSERT_EQ(2, args->length()); |
| 3639 VisitForStackValue(args->at(0)); |
| 3640 VisitForAccumulatorValue(args->at(1)); |
3639 | 3641 |
3640 if (FLAG_new_string_add) { | 3642 __ pop(edx); |
3641 VisitForStackValue(args->at(0)); | 3643 StringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED); |
3642 VisitForAccumulatorValue(args->at(1)); | 3644 __ CallStub(&stub); |
3643 | |
3644 __ pop(edx); | |
3645 NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED); | |
3646 __ CallStub(&stub); | |
3647 } else { | |
3648 VisitForStackValue(args->at(0)); | |
3649 VisitForStackValue(args->at(1)); | |
3650 | |
3651 StringAddStub stub(STRING_ADD_CHECK_BOTH); | |
3652 __ CallStub(&stub); | |
3653 } | |
3654 context()->Plug(eax); | 3645 context()->Plug(eax); |
3655 } | 3646 } |
3656 | 3647 |
3657 | 3648 |
3658 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { | 3649 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
3659 ZoneList<Expression*>* args = expr->arguments(); | 3650 ZoneList<Expression*>* args = expr->arguments(); |
3660 ASSERT_EQ(2, args->length()); | 3651 ASSERT_EQ(2, args->length()); |
3661 | 3652 |
3662 VisitForStackValue(args->at(0)); | 3653 VisitForStackValue(args->at(0)); |
3663 VisitForStackValue(args->at(1)); | 3654 VisitForStackValue(args->at(1)); |
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4901 | 4892 |
4902 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4893 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4903 Assembler::target_address_at(call_target_address)); | 4894 Assembler::target_address_at(call_target_address)); |
4904 return OSR_AFTER_STACK_CHECK; | 4895 return OSR_AFTER_STACK_CHECK; |
4905 } | 4896 } |
4906 | 4897 |
4907 | 4898 |
4908 } } // namespace v8::internal | 4899 } } // namespace v8::internal |
4909 | 4900 |
4910 #endif // V8_TARGET_ARCH_IA32 | 4901 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |