| 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 3780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3791 | 3791 |
| 3792 VisitForStackValue(args->at(0)); | 3792 VisitForStackValue(args->at(0)); |
| 3793 VisitForStackValue(args->at(1)); | 3793 VisitForStackValue(args->at(1)); |
| 3794 | 3794 |
| 3795 StringCompareStub stub; | 3795 StringCompareStub stub; |
| 3796 __ CallStub(&stub); | 3796 __ CallStub(&stub); |
| 3797 context()->Plug(v0); | 3797 context()->Plug(v0); |
| 3798 } | 3798 } |
| 3799 | 3799 |
| 3800 | 3800 |
| 3801 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
| 3802 // Load the argument on the stack and call the runtime function. |
| 3803 ZoneList<Expression*>* args = expr->arguments(); |
| 3804 ASSERT(args->length() == 1); |
| 3805 VisitForStackValue(args->at(0)); |
| 3806 __ CallRuntime(Runtime::kMath_log, 1); |
| 3807 context()->Plug(v0); |
| 3808 } |
| 3809 |
| 3810 |
| 3811 void FullCodeGenerator::EmitMathSqrt(CallRuntime* expr) { |
| 3812 // Load the argument on the stack and call the runtime function. |
| 3813 ZoneList<Expression*>* args = expr->arguments(); |
| 3814 ASSERT(args->length() == 1); |
| 3815 VisitForStackValue(args->at(0)); |
| 3816 __ CallRuntime(Runtime::kMath_sqrt, 1); |
| 3817 context()->Plug(v0); |
| 3818 } |
| 3819 |
| 3820 |
| 3801 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { | 3821 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { |
| 3802 ZoneList<Expression*>* args = expr->arguments(); | 3822 ZoneList<Expression*>* args = expr->arguments(); |
| 3803 ASSERT(args->length() >= 2); | 3823 ASSERT(args->length() >= 2); |
| 3804 | 3824 |
| 3805 int arg_count = args->length() - 2; // 2 ~ receiver and function. | 3825 int arg_count = args->length() - 2; // 2 ~ receiver and function. |
| 3806 for (int i = 0; i < arg_count + 1; i++) { | 3826 for (int i = 0; i < arg_count + 1; i++) { |
| 3807 VisitForStackValue(args->at(i)); | 3827 VisitForStackValue(args->at(i)); |
| 3808 } | 3828 } |
| 3809 VisitForAccumulatorValue(args->last()); // Function. | 3829 VisitForAccumulatorValue(args->last()); // Function. |
| 3810 | 3830 |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4957 Assembler::target_address_at(pc_immediate_load_address)) == | 4977 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4958 reinterpret_cast<uint32_t>( | 4978 reinterpret_cast<uint32_t>( |
| 4959 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4979 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4960 return OSR_AFTER_STACK_CHECK; | 4980 return OSR_AFTER_STACK_CHECK; |
| 4961 } | 4981 } |
| 4962 | 4982 |
| 4963 | 4983 |
| 4964 } } // namespace v8::internal | 4984 } } // namespace v8::internal |
| 4965 | 4985 |
| 4966 #endif // V8_TARGET_ARCH_MIPS | 4986 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |