OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3124 TranscendentalCacheStub stub(TranscendentalCache::COS, | 3124 TranscendentalCacheStub stub(TranscendentalCache::COS, |
3125 TranscendentalCacheStub::TAGGED); | 3125 TranscendentalCacheStub::TAGGED); |
3126 ZoneList<Expression*>* args = expr->arguments(); | 3126 ZoneList<Expression*>* args = expr->arguments(); |
3127 ASSERT(args->length() == 1); | 3127 ASSERT(args->length() == 1); |
3128 VisitForStackValue(args->at(0)); | 3128 VisitForStackValue(args->at(0)); |
3129 __ CallStub(&stub); | 3129 __ CallStub(&stub); |
3130 context()->Plug(r0); | 3130 context()->Plug(r0); |
3131 } | 3131 } |
3132 | 3132 |
3133 | 3133 |
3134 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) { | |
3135 // Load the argument on the stack and call the stub. | |
3136 TranscendentalCacheStub stub(TranscendentalCache::TAN, | |
3137 TranscendentalCacheStub::TAGGED); | |
3138 ZoneList<Expression*>* args = expr->arguments(); | |
3139 ASSERT(args->length() == 1); | |
3140 VisitForStackValue(args->at(0)); | |
3141 __ CallStub(&stub); | |
3142 context()->Plug(r0); | |
ulan
2011/11/25 13:11:41
In future maybe we could define a platform-specifi
| |
3143 } | |
3144 | |
3145 | |
3134 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { | 3146 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
3135 // Load the argument on the stack and call the stub. | 3147 // Load the argument on the stack and call the stub. |
3136 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3148 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
3137 TranscendentalCacheStub::TAGGED); | 3149 TranscendentalCacheStub::TAGGED); |
3138 ZoneList<Expression*>* args = expr->arguments(); | 3150 ZoneList<Expression*>* args = expr->arguments(); |
3139 ASSERT(args->length() == 1); | 3151 ASSERT(args->length() == 1); |
3140 VisitForStackValue(args->at(0)); | 3152 VisitForStackValue(args->at(0)); |
3141 __ CallStub(&stub); | 3153 __ CallStub(&stub); |
3142 context()->Plug(r0); | 3154 context()->Plug(r0); |
3143 } | 3155 } |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4363 *context_length = 0; | 4375 *context_length = 0; |
4364 return previous_; | 4376 return previous_; |
4365 } | 4377 } |
4366 | 4378 |
4367 | 4379 |
4368 #undef __ | 4380 #undef __ |
4369 | 4381 |
4370 } } // namespace v8::internal | 4382 } } // namespace v8::internal |
4371 | 4383 |
4372 #endif // V8_TARGET_ARCH_ARM | 4384 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |