| 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 3086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3097 | 3097 |
| 3098 __ JumpIfSmi(r0, if_false); | 3098 __ JumpIfSmi(r0, if_false); |
| 3099 __ CompareObjectType(r0, r1, r2, JS_FUNCTION_TYPE); | 3099 __ CompareObjectType(r0, r1, r2, JS_FUNCTION_TYPE); |
| 3100 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3100 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3101 Split(eq, if_true, if_false, fall_through); | 3101 Split(eq, if_true, if_false, fall_through); |
| 3102 | 3102 |
| 3103 context()->Plug(if_true, if_false); | 3103 context()->Plug(if_true, if_false); |
| 3104 } | 3104 } |
| 3105 | 3105 |
| 3106 | 3106 |
| 3107 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { |
| 3108 ZoneList<Expression*>* args = expr->arguments(); |
| 3109 ASSERT(args->length() == 1); |
| 3110 |
| 3111 VisitForAccumulatorValue(args->at(0)); |
| 3112 |
| 3113 Label materialize_true, materialize_false; |
| 3114 Label* if_true = NULL; |
| 3115 Label* if_false = NULL; |
| 3116 Label* fall_through = NULL; |
| 3117 context()->PrepareTest(&materialize_true, &materialize_false, |
| 3118 &if_true, &if_false, &fall_through); |
| 3119 |
| 3120 __ CheckMap(r0, r1, Heap::kHeapNumberMapRootIndex, if_false, DO_SMI_CHECK); |
| 3121 __ ldr(r2, FieldMemOperand(r0, HeapNumber::kExponentOffset)); |
| 3122 __ ldr(r1, FieldMemOperand(r0, HeapNumber::kMantissaOffset)); |
| 3123 __ cmp(r2, Operand(0x80000000)); |
| 3124 __ cmp(r1, Operand(0x00000000), eq); |
| 3125 |
| 3126 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3127 Split(eq, if_true, if_false, fall_through); |
| 3128 |
| 3129 context()->Plug(if_true, if_false); |
| 3130 } |
| 3131 |
| 3132 |
| 3107 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { | 3133 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { |
| 3108 ZoneList<Expression*>* args = expr->arguments(); | 3134 ZoneList<Expression*>* args = expr->arguments(); |
| 3109 ASSERT(args->length() == 1); | 3135 ASSERT(args->length() == 1); |
| 3110 | 3136 |
| 3111 VisitForAccumulatorValue(args->at(0)); | 3137 VisitForAccumulatorValue(args->at(0)); |
| 3112 | 3138 |
| 3113 Label materialize_true, materialize_false; | 3139 Label materialize_true, materialize_false; |
| 3114 Label* if_true = NULL; | 3140 Label* if_true = NULL; |
| 3115 Label* if_false = NULL; | 3141 Label* if_false = NULL; |
| 3116 Label* fall_through = NULL; | 3142 Label* fall_through = NULL; |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3729 ASSERT_EQ(2, args->length()); | 3755 ASSERT_EQ(2, args->length()); |
| 3730 VisitForStackValue(args->at(0)); | 3756 VisitForStackValue(args->at(0)); |
| 3731 VisitForStackValue(args->at(1)); | 3757 VisitForStackValue(args->at(1)); |
| 3732 | 3758 |
| 3733 StringCompareStub stub; | 3759 StringCompareStub stub; |
| 3734 __ CallStub(&stub); | 3760 __ CallStub(&stub); |
| 3735 context()->Plug(r0); | 3761 context()->Plug(r0); |
| 3736 } | 3762 } |
| 3737 | 3763 |
| 3738 | 3764 |
| 3739 void FullCodeGenerator::EmitMathSin(CallRuntime* expr) { | |
| 3740 // Load the argument on the stack and call the stub. | |
| 3741 TranscendentalCacheStub stub(TranscendentalCache::SIN, | |
| 3742 TranscendentalCacheStub::TAGGED); | |
| 3743 ZoneList<Expression*>* args = expr->arguments(); | |
| 3744 ASSERT(args->length() == 1); | |
| 3745 VisitForStackValue(args->at(0)); | |
| 3746 __ CallStub(&stub); | |
| 3747 context()->Plug(r0); | |
| 3748 } | |
| 3749 | |
| 3750 | |
| 3751 void FullCodeGenerator::EmitMathCos(CallRuntime* expr) { | |
| 3752 // Load the argument on the stack and call the stub. | |
| 3753 TranscendentalCacheStub stub(TranscendentalCache::COS, | |
| 3754 TranscendentalCacheStub::TAGGED); | |
| 3755 ZoneList<Expression*>* args = expr->arguments(); | |
| 3756 ASSERT(args->length() == 1); | |
| 3757 VisitForStackValue(args->at(0)); | |
| 3758 __ CallStub(&stub); | |
| 3759 context()->Plug(r0); | |
| 3760 } | |
| 3761 | |
| 3762 | |
| 3763 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) { | |
| 3764 // Load the argument on the stack and call the stub. | |
| 3765 TranscendentalCacheStub stub(TranscendentalCache::TAN, | |
| 3766 TranscendentalCacheStub::TAGGED); | |
| 3767 ZoneList<Expression*>* args = expr->arguments(); | |
| 3768 ASSERT(args->length() == 1); | |
| 3769 VisitForStackValue(args->at(0)); | |
| 3770 __ CallStub(&stub); | |
| 3771 context()->Plug(r0); | |
| 3772 } | |
| 3773 | |
| 3774 | |
| 3775 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { | 3765 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { |
| 3776 // Load the argument on the stack and call the stub. | 3766 // Load the argument on the stack and call the stub. |
| 3777 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3767 TranscendentalCacheStub stub(TranscendentalCache::LOG, |
| 3778 TranscendentalCacheStub::TAGGED); | 3768 TranscendentalCacheStub::TAGGED); |
| 3779 ZoneList<Expression*>* args = expr->arguments(); | 3769 ZoneList<Expression*>* args = expr->arguments(); |
| 3780 ASSERT(args->length() == 1); | 3770 ASSERT(args->length() == 1); |
| 3781 VisitForStackValue(args->at(0)); | 3771 VisitForStackValue(args->at(0)); |
| 3782 __ CallStub(&stub); | 3772 __ CallStub(&stub); |
| 3783 context()->Plug(r0); | 3773 context()->Plug(r0); |
| 3784 } | 3774 } |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4988 ASSERT(Memory::uint32_at(interrupt_address_pointer) == | 4978 ASSERT(Memory::uint32_at(interrupt_address_pointer) == |
| 4989 reinterpret_cast<uint32_t>( | 4979 reinterpret_cast<uint32_t>( |
| 4990 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4980 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4991 return OSR_AFTER_STACK_CHECK; | 4981 return OSR_AFTER_STACK_CHECK; |
| 4992 } | 4982 } |
| 4993 | 4983 |
| 4994 | 4984 |
| 4995 } } // namespace v8::internal | 4985 } } // namespace v8::internal |
| 4996 | 4986 |
| 4997 #endif // V8_TARGET_ARCH_ARM | 4987 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |