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 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3664 | 3664 |
3665 __ bind(&done); | 3665 __ bind(&done); |
3666 context()->Plug(result); | 3666 context()->Plug(result); |
3667 } | 3667 } |
3668 | 3668 |
3669 | 3669 |
3670 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { | 3670 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { |
3671 ZoneList<Expression*>* args = expr->arguments(); | 3671 ZoneList<Expression*>* args = expr->arguments(); |
3672 ASSERT_EQ(2, args->length()); | 3672 ASSERT_EQ(2, args->length()); |
3673 | 3673 |
3674 VisitForStackValue(args->at(0)); | 3674 if (FLAG_new_string_add) { |
3675 VisitForStackValue(args->at(1)); | 3675 VisitForStackValue(args->at(0)); |
| 3676 VisitForAccumulatorValue(args->at(1)); |
3676 | 3677 |
3677 StringAddStub stub(STRING_ADD_CHECK_BOTH); | 3678 __ pop(edx); |
3678 __ CallStub(&stub); | 3679 NewStringAddStub stub(STRING_ADD_CHECK_BOTH, NOT_TENURED); |
| 3680 __ CallStub(&stub); |
| 3681 } else { |
| 3682 VisitForStackValue(args->at(0)); |
| 3683 VisitForStackValue(args->at(1)); |
| 3684 |
| 3685 StringAddStub stub(STRING_ADD_CHECK_BOTH); |
| 3686 __ CallStub(&stub); |
| 3687 } |
3679 context()->Plug(eax); | 3688 context()->Plug(eax); |
3680 } | 3689 } |
3681 | 3690 |
3682 | 3691 |
3683 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { | 3692 void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
3684 ZoneList<Expression*>* args = expr->arguments(); | 3693 ZoneList<Expression*>* args = expr->arguments(); |
3685 ASSERT_EQ(2, args->length()); | 3694 ASSERT_EQ(2, args->length()); |
3686 | 3695 |
3687 VisitForStackValue(args->at(0)); | 3696 VisitForStackValue(args->at(0)); |
3688 VisitForStackValue(args->at(1)); | 3697 VisitForStackValue(args->at(1)); |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4969 | 4978 |
4970 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4979 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4971 Assembler::target_address_at(call_target_address)); | 4980 Assembler::target_address_at(call_target_address)); |
4972 return OSR_AFTER_STACK_CHECK; | 4981 return OSR_AFTER_STACK_CHECK; |
4973 } | 4982 } |
4974 | 4983 |
4975 | 4984 |
4976 } } // namespace v8::internal | 4985 } } // namespace v8::internal |
4977 | 4986 |
4978 #endif // V8_TARGET_ARCH_IA32 | 4987 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |