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 7894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7905 | 7905 |
7906 done.Bind(&answer); | 7906 done.Bind(&answer); |
7907 frame()->Push(&answer); | 7907 frame()->Push(&answer); |
7908 } | 7908 } |
7909 } | 7909 } |
7910 | 7910 |
7911 | 7911 |
7912 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { | 7912 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { |
7913 ASSERT_EQ(args->length(), 1); | 7913 ASSERT_EQ(args->length(), 1); |
7914 Load(args->at(0)); | 7914 Load(args->at(0)); |
7915 TranscendentalCacheStub stub(TranscendentalCache::SIN); | 7915 TranscendentalCacheStub stub(TranscendentalCache::SIN, |
| 7916 TranscendentalCacheStub::TAGGED); |
7916 Result result = frame_->CallStub(&stub, 1); | 7917 Result result = frame_->CallStub(&stub, 1); |
7917 frame_->Push(&result); | 7918 frame_->Push(&result); |
7918 } | 7919 } |
7919 | 7920 |
7920 | 7921 |
7921 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { | 7922 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { |
7922 ASSERT_EQ(args->length(), 1); | 7923 ASSERT_EQ(args->length(), 1); |
7923 Load(args->at(0)); | 7924 Load(args->at(0)); |
7924 TranscendentalCacheStub stub(TranscendentalCache::COS); | 7925 TranscendentalCacheStub stub(TranscendentalCache::COS, |
| 7926 TranscendentalCacheStub::TAGGED); |
7925 Result result = frame_->CallStub(&stub, 1); | 7927 Result result = frame_->CallStub(&stub, 1); |
7926 frame_->Push(&result); | 7928 frame_->Push(&result); |
7927 } | 7929 } |
7928 | 7930 |
7929 | 7931 |
7930 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { | 7932 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { |
7931 ASSERT_EQ(args->length(), 1); | 7933 ASSERT_EQ(args->length(), 1); |
7932 Load(args->at(0)); | 7934 Load(args->at(0)); |
7933 TranscendentalCacheStub stub(TranscendentalCache::LOG); | 7935 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
| 7936 TranscendentalCacheStub::TAGGED); |
7934 Result result = frame_->CallStub(&stub, 1); | 7937 Result result = frame_->CallStub(&stub, 1); |
7935 frame_->Push(&result); | 7938 frame_->Push(&result); |
7936 } | 7939 } |
7937 | 7940 |
7938 | 7941 |
7939 // Generates the Math.sqrt method. Please note - this function assumes that | 7942 // Generates the Math.sqrt method. Please note - this function assumes that |
7940 // the callsite has executed ToNumber on the argument. | 7943 // the callsite has executed ToNumber on the argument. |
7941 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { | 7944 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { |
7942 ASSERT_EQ(args->length(), 1); | 7945 ASSERT_EQ(args->length(), 1); |
7943 Load(args->at(0)); | 7946 Load(args->at(0)); |
(...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10224 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); | 10227 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); |
10225 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); | 10228 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); |
10226 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); | 10229 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); |
10227 } | 10230 } |
10228 | 10231 |
10229 #undef __ | 10232 #undef __ |
10230 | 10233 |
10231 } } // namespace v8::internal | 10234 } } // namespace v8::internal |
10232 | 10235 |
10233 #endif // V8_TARGET_ARCH_IA32 | 10236 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |