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 3741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3752 ASSERT_EQ(2, args->length()); | 3752 ASSERT_EQ(2, args->length()); |
3753 VisitForStackValue(args->at(0)); | 3753 VisitForStackValue(args->at(0)); |
3754 VisitForStackValue(args->at(1)); | 3754 VisitForStackValue(args->at(1)); |
3755 | 3755 |
3756 StringCompareStub stub; | 3756 StringCompareStub stub; |
3757 __ CallStub(&stub); | 3757 __ CallStub(&stub); |
3758 context()->Plug(r0); | 3758 context()->Plug(r0); |
3759 } | 3759 } |
3760 | 3760 |
3761 | 3761 |
3762 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { | |
3763 // Load the argument on the stack and call the runtime function. | |
3764 ZoneList<Expression*>* args = expr->arguments(); | |
3765 ASSERT(args->length() == 1); | |
3766 VisitForStackValue(args->at(0)); | |
3767 __ CallRuntime(Runtime::kMath_log, 1); | |
3768 context()->Plug(r0); | |
3769 } | |
3770 | |
3771 | |
3772 void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) { | |
3773 // Load the argument on the stack and call the runtime function. | |
3774 ZoneList<Expression*>* args = expr->arguments(); | |
3775 ASSERT(args->length() == 1); | |
3776 VisitForStackValue(args->at(0)); | |
3777 __ CallRuntime(Runtime::kMath_sqrt, 1); | |
3778 context()->Plug(r0); | |
3779 } | |
3780 | |
3781 | |
3782 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { | 3762 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { |
3783 ZoneList<Expression*>* args = expr->arguments(); | 3763 ZoneList<Expression*>* args = expr->arguments(); |
3784 ASSERT(args->length() >= 2); | 3764 ASSERT(args->length() >= 2); |
3785 | 3765 |
3786 int arg_count = args->length() - 2; // 2 ~ receiver and function. | 3766 int arg_count = args->length() - 2; // 2 ~ receiver and function. |
3787 for (int i = 0; i < arg_count + 1; i++) { | 3767 for (int i = 0; i < arg_count + 1; i++) { |
3788 VisitForStackValue(args->at(i)); | 3768 VisitForStackValue(args->at(i)); |
3789 } | 3769 } |
3790 VisitForAccumulatorValue(args->last()); // Function. | 3770 VisitForAccumulatorValue(args->last()); // Function. |
3791 | 3771 |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4943 | 4923 |
4944 ASSERT(interrupt_address == | 4924 ASSERT(interrupt_address == |
4945 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4925 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4946 return OSR_AFTER_STACK_CHECK; | 4926 return OSR_AFTER_STACK_CHECK; |
4947 } | 4927 } |
4948 | 4928 |
4949 | 4929 |
4950 } } // namespace v8::internal | 4930 } } // namespace v8::internal |
4951 | 4931 |
4952 #endif // V8_TARGET_ARCH_ARM | 4932 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |