OLD | NEW |
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 7977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7988 | 7988 |
7989 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { | 7989 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { |
7990 ASSERT_EQ(args->length(), 1); | 7990 ASSERT_EQ(args->length(), 1); |
7991 Load(args->at(0)); | 7991 Load(args->at(0)); |
7992 TranscendentalCacheStub stub(TranscendentalCache::COS); | 7992 TranscendentalCacheStub stub(TranscendentalCache::COS); |
7993 Result result = frame_->CallStub(&stub, 1); | 7993 Result result = frame_->CallStub(&stub, 1); |
7994 frame_->Push(&result); | 7994 frame_->Push(&result); |
7995 } | 7995 } |
7996 | 7996 |
7997 | 7997 |
| 7998 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { |
| 7999 ASSERT_EQ(args->length(), 1); |
| 8000 Load(args->at(0)); |
| 8001 TranscendentalCacheStub stub(TranscendentalCache::LOG); |
| 8002 Result result = frame_->CallStub(&stub, 1); |
| 8003 frame_->Push(&result); |
| 8004 } |
| 8005 |
| 8006 |
7998 // Generates the Math.sqrt method. Please note - this function assumes that | 8007 // Generates the Math.sqrt method. Please note - this function assumes that |
7999 // the callsite has executed ToNumber on the argument. | 8008 // the callsite has executed ToNumber on the argument. |
8000 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { | 8009 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { |
8001 ASSERT_EQ(args->length(), 1); | 8010 ASSERT_EQ(args->length(), 1); |
8002 Load(args->at(0)); | 8011 Load(args->at(0)); |
8003 | 8012 |
8004 if (!CpuFeatures::IsSupported(SSE2)) { | 8013 if (!CpuFeatures::IsSupported(SSE2)) { |
8005 Result result = frame()->CallRuntime(Runtime::kMath_sqrt, 1); | 8014 Result result = frame()->CallRuntime(Runtime::kMath_sqrt, 1); |
8006 frame()->Push(&result); | 8015 frame()->Push(&result); |
8007 } else { | 8016 } else { |
(...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10272 masm.GetCode(&desc); | 10281 masm.GetCode(&desc); |
10273 // Call the function from C++. | 10282 // Call the function from C++. |
10274 return FUNCTION_CAST<MemCopyFunction>(buffer); | 10283 return FUNCTION_CAST<MemCopyFunction>(buffer); |
10275 } | 10284 } |
10276 | 10285 |
10277 #undef __ | 10286 #undef __ |
10278 | 10287 |
10279 } } // namespace v8::internal | 10288 } } // namespace v8::internal |
10280 | 10289 |
10281 #endif // V8_TARGET_ARCH_IA32 | 10290 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |