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 7093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7104 | 7104 |
7105 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { | 7105 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { |
7106 ASSERT_EQ(args->length(), 1); | 7106 ASSERT_EQ(args->length(), 1); |
7107 Load(args->at(0)); | 7107 Load(args->at(0)); |
7108 TranscendentalCacheStub stub(TranscendentalCache::COS); | 7108 TranscendentalCacheStub stub(TranscendentalCache::COS); |
7109 Result result = frame_->CallStub(&stub, 1); | 7109 Result result = frame_->CallStub(&stub, 1); |
7110 frame_->Push(&result); | 7110 frame_->Push(&result); |
7111 } | 7111 } |
7112 | 7112 |
7113 | 7113 |
| 7114 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) { |
| 7115 ASSERT_EQ(args->length(), 1); |
| 7116 Load(args->at(0)); |
| 7117 TranscendentalCacheStub stub(TranscendentalCache::LOG); |
| 7118 Result result = frame_->CallStub(&stub, 1); |
| 7119 frame_->Push(&result); |
| 7120 } |
| 7121 |
| 7122 |
7114 // Generates the Math.sqrt method. Please note - this function assumes that | 7123 // Generates the Math.sqrt method. Please note - this function assumes that |
7115 // the callsite has executed ToNumber on the argument. | 7124 // the callsite has executed ToNumber on the argument. |
7116 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { | 7125 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { |
7117 ASSERT(args->length() == 1); | 7126 ASSERT(args->length() == 1); |
7118 Load(args->at(0)); | 7127 Load(args->at(0)); |
7119 | 7128 |
7120 // Leave original value on the frame if we need to call runtime. | 7129 // Leave original value on the frame if we need to call runtime. |
7121 frame()->Dup(); | 7130 frame()->Dup(); |
7122 Result result = frame()->Pop(); | 7131 Result result = frame()->Pop(); |
7123 result.ToRegister(); | 7132 result.ToRegister(); |
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8878 #undef __ | 8887 #undef __ |
8879 | 8888 |
8880 void RecordWriteStub::Generate(MacroAssembler* masm) { | 8889 void RecordWriteStub::Generate(MacroAssembler* masm) { |
8881 masm->RecordWriteHelper(object_, addr_, scratch_); | 8890 masm->RecordWriteHelper(object_, addr_, scratch_); |
8882 masm->ret(0); | 8891 masm->ret(0); |
8883 } | 8892 } |
8884 | 8893 |
8885 } } // namespace v8::internal | 8894 } } // namespace v8::internal |
8886 | 8895 |
8887 #endif // V8_TARGET_ARCH_X64 | 8896 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |