Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1078 case CodeStub::SubString: { | 1078 case CodeStub::SubString: { |
| 1079 SubStringStub stub; | 1079 SubStringStub stub; |
| 1080 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1080 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1081 break; | 1081 break; |
| 1082 } | 1082 } |
| 1083 case CodeStub::StringCompare: { | 1083 case CodeStub::StringCompare: { |
| 1084 StringCompareStub stub; | 1084 StringCompareStub stub; |
| 1085 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1085 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1086 break; | 1086 break; |
| 1087 } | 1087 } |
| 1088 case CodeStub::TranscendentalCache: { | |
| 1089 __ ldr(r0, MemOperand(sp, 0)); | |
| 1090 TranscendentalCacheStub stub(instr->transcendental_type(), | |
| 1091 TranscendentalCacheStub::TAGGED); | |
| 1092 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 1093 break; | |
| 1094 } | |
| 1095 default: | 1088 default: |
| 1096 UNREACHABLE(); | 1089 UNREACHABLE(); |
| 1097 } | 1090 } |
| 1098 } | 1091 } |
| 1099 | 1092 |
| 1100 | 1093 |
| 1101 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1094 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
| 1102 GenerateOsrPrologue(); | 1095 GenerateOsrPrologue(); |
| 1103 } | 1096 } |
| 1104 | 1097 |
| (...skipping 2829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3934 Register temp1 = ToRegister(instr->temp1()); | 3927 Register temp1 = ToRegister(instr->temp1()); |
| 3935 Register temp2 = ToRegister(instr->temp2()); | 3928 Register temp2 = ToRegister(instr->temp2()); |
| 3936 | 3929 |
| 3937 MathExpGenerator::EmitMathExp( | 3930 MathExpGenerator::EmitMathExp( |
| 3938 masm(), input, result, double_scratch1, double_scratch2, | 3931 masm(), input, result, double_scratch1, double_scratch2, |
| 3939 temp1, temp2, scratch0()); | 3932 temp1, temp2, scratch0()); |
| 3940 } | 3933 } |
| 3941 | 3934 |
| 3942 | 3935 |
| 3943 void LCodeGen::DoMathLog(LMathLog* instr) { | 3936 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3944 ASSERT(ToDoubleRegister(instr->result()).is(d2)); | 3937 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3945 // Set the context register to a GC-safe fake value. Clobbering it is | 3938 __ SetCallCDoubleArguments(ToDoubleRegister(instr->value())); |
| 3946 // OK because this instruction is marked as a call. | 3939 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
|
Yang
2013/12/13 15:54:39
I just took a look at ExternalReference::math_log_
Sven Panne
2013/12/16 08:20:23
Good point. Of course the compiler won't "inline",
| |
| 3947 __ mov(cp, Operand::Zero()); | 3940 0, 1); |
| 3948 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3941 __ GetCFunctionDoubleResult(ToDoubleRegister(instr->result())); |
| 3949 TranscendentalCacheStub::UNTAGGED); | |
| 3950 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 3951 } | 3942 } |
| 3952 | 3943 |
| 3953 | 3944 |
| 3954 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3945 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
| 3955 ASSERT(ToRegister(instr->context()).is(cp)); | 3946 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3956 ASSERT(ToRegister(instr->function()).is(r1)); | 3947 ASSERT(ToRegister(instr->function()).is(r1)); |
| 3957 ASSERT(instr->HasPointerMap()); | 3948 ASSERT(instr->HasPointerMap()); |
| 3958 | 3949 |
| 3959 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3950 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
| 3960 if (known_function.is_null()) { | 3951 if (known_function.is_null()) { |
| (...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5824 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5815 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5825 __ ldr(result, FieldMemOperand(scratch, | 5816 __ ldr(result, FieldMemOperand(scratch, |
| 5826 FixedArray::kHeaderSize - kPointerSize)); | 5817 FixedArray::kHeaderSize - kPointerSize)); |
| 5827 __ bind(&done); | 5818 __ bind(&done); |
| 5828 } | 5819 } |
| 5829 | 5820 |
| 5830 | 5821 |
| 5831 #undef __ | 5822 #undef __ |
| 5832 | 5823 |
| 5833 } } // namespace v8::internal | 5824 } } // namespace v8::internal |
| OLD | NEW |