Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 216643002: Reland "Clean up runtime functions for Maths." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/runtime.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
3821 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { 3801 void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) {
3822 ZoneList<Expression*>* args = expr->arguments(); 3802 ZoneList<Expression*>* args = expr->arguments();
3823 ASSERT(args->length() >= 2); 3803 ASSERT(args->length() >= 2);
3824 3804
3825 int arg_count = args->length() - 2; // 2 ~ receiver and function. 3805 int arg_count = args->length() - 2; // 2 ~ receiver and function.
3826 for (int i = 0; i < arg_count + 1; i++) { 3806 for (int i = 0; i < arg_count + 1; i++) {
3827 VisitForStackValue(args->at(i)); 3807 VisitForStackValue(args->at(i));
3828 } 3808 }
3829 VisitForAccumulatorValue(args->last()); // Function. 3809 VisitForAccumulatorValue(args->last()); // Function.
3830 3810
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
4977 Assembler::target_address_at(pc_immediate_load_address)) == 4957 Assembler::target_address_at(pc_immediate_load_address)) ==
4978 reinterpret_cast<uint32_t>( 4958 reinterpret_cast<uint32_t>(
4979 isolate->builtins()->OsrAfterStackCheck()->entry())); 4959 isolate->builtins()->OsrAfterStackCheck()->entry()));
4980 return OSR_AFTER_STACK_CHECK; 4960 return OSR_AFTER_STACK_CHECK;
4981 } 4961 }
4982 4962
4983 4963
4984 } } // namespace v8::internal 4964 } } // namespace v8::internal
4985 4965
4986 #endif // V8_TARGET_ARCH_MIPS 4966 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698