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

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

Issue 5437002: Add generated code to calculate Math.log and to search Transcendental cache f... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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/ia32/disasm-ia32.cc ('k') | src/math.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2910 void FullCodeGenerator::EmitMathCos(ZoneList<Expression*>* args) { 2910 void FullCodeGenerator::EmitMathCos(ZoneList<Expression*>* args) {
2911 // Load the argument on the stack and call the stub. 2911 // Load the argument on the stack and call the stub.
2912 TranscendentalCacheStub stub(TranscendentalCache::COS); 2912 TranscendentalCacheStub stub(TranscendentalCache::COS);
2913 ASSERT(args->length() == 1); 2913 ASSERT(args->length() == 1);
2914 VisitForStackValue(args->at(0)); 2914 VisitForStackValue(args->at(0));
2915 __ CallStub(&stub); 2915 __ CallStub(&stub);
2916 context()->Plug(eax); 2916 context()->Plug(eax);
2917 } 2917 }
2918 2918
2919 2919
2920 void FullCodeGenerator::EmitMathLog(ZoneList<Expression*>* args) {
2921 // Load the argument on the stack and call the stub.
2922 TranscendentalCacheStub stub(TranscendentalCache::LOG);
2923 ASSERT(args->length() == 1);
2924 VisitForStackValue(args->at(0));
2925 __ CallStub(&stub);
2926 context()->Plug(eax);
2927 }
2928
2929
2920 void FullCodeGenerator::EmitMathSqrt(ZoneList<Expression*>* args) { 2930 void FullCodeGenerator::EmitMathSqrt(ZoneList<Expression*>* args) {
2921 // Load the argument on the stack and call the runtime function. 2931 // Load the argument on the stack and call the runtime function.
2922 ASSERT(args->length() == 1); 2932 ASSERT(args->length() == 1);
2923 VisitForStackValue(args->at(0)); 2933 VisitForStackValue(args->at(0));
2924 __ CallRuntime(Runtime::kMath_sqrt, 1); 2934 __ CallRuntime(Runtime::kMath_sqrt, 1);
2925 context()->Plug(eax); 2935 context()->Plug(eax);
2926 } 2936 }
2927 2937
2928 2938
2929 void FullCodeGenerator::EmitCallFunction(ZoneList<Expression*>* args) { 2939 void FullCodeGenerator::EmitCallFunction(ZoneList<Expression*>* args) {
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
3948 // And return. 3958 // And return.
3949 __ ret(0); 3959 __ ret(0);
3950 } 3960 }
3951 3961
3952 3962
3953 #undef __ 3963 #undef __
3954 3964
3955 } } // namespace v8::internal 3965 } } // namespace v8::internal
3956 3966
3957 #endif // V8_TARGET_ARCH_IA32 3967 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698