OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3963 // Is it a fixed array? | 3963 // Is it a fixed array? |
3964 __ bind(&try_array); | 3964 __ bind(&try_array); |
3965 __ LoadP(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset)); | 3965 __ LoadP(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset)); |
3966 __ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex); | 3966 __ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex); |
3967 __ bne(¬_array); | 3967 __ bne(¬_array); |
3968 HandleArrayCases(masm, feedback, receiver_map, scratch1, r10, true, &miss); | 3968 HandleArrayCases(masm, feedback, receiver_map, scratch1, r10, true, &miss); |
3969 | 3969 |
3970 __ bind(¬_array); | 3970 __ bind(¬_array); |
3971 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); | 3971 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); |
3972 __ bne(&miss); | 3972 __ bne(&miss); |
3973 Code::Flags code_flags = Code::RemoveTypeAndHolderFromFlags( | 3973 Code::Flags code_flags = |
3974 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 3974 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); |
3975 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::LOAD_IC, code_flags, | 3975 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::LOAD_IC, code_flags, |
3976 receiver, name, feedback, | 3976 receiver, name, feedback, |
3977 receiver_map, scratch1, r10); | 3977 receiver_map, scratch1, r10); |
3978 | 3978 |
3979 __ bind(&miss); | 3979 __ bind(&miss); |
3980 LoadIC::GenerateMiss(masm); | 3980 LoadIC::GenerateMiss(masm); |
3981 | 3981 |
3982 __ bind(&load_smi_map); | 3982 __ bind(&load_smi_map); |
3983 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3983 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
3984 __ b(&compare_map); | 3984 __ b(&compare_map); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4108 __ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex); | 4108 __ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex); |
4109 __ bne(¬_array); | 4109 __ bne(¬_array); |
4110 | 4110 |
4111 Register scratch2 = r11; | 4111 Register scratch2 = r11; |
4112 HandleArrayCases(masm, feedback, receiver_map, scratch1, scratch2, true, | 4112 HandleArrayCases(masm, feedback, receiver_map, scratch1, scratch2, true, |
4113 &miss); | 4113 &miss); |
4114 | 4114 |
4115 __ bind(¬_array); | 4115 __ bind(¬_array); |
4116 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); | 4116 __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); |
4117 __ bne(&miss); | 4117 __ bne(&miss); |
4118 Code::Flags code_flags = Code::RemoveTypeAndHolderFromFlags( | 4118 Code::Flags code_flags = |
4119 Code::ComputeHandlerFlags(Code::STORE_IC)); | 4119 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); |
4120 masm->isolate()->stub_cache()->GenerateProbe( | 4120 masm->isolate()->stub_cache()->GenerateProbe( |
4121 masm, Code::STORE_IC, code_flags, receiver, key, feedback, receiver_map, | 4121 masm, Code::STORE_IC, code_flags, receiver, key, feedback, receiver_map, |
4122 scratch1, scratch2); | 4122 scratch1, scratch2); |
4123 | 4123 |
4124 __ bind(&miss); | 4124 __ bind(&miss); |
4125 StoreIC::GenerateMiss(masm); | 4125 StoreIC::GenerateMiss(masm); |
4126 | 4126 |
4127 __ bind(&load_smi_map); | 4127 __ bind(&load_smi_map); |
4128 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 4128 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
4129 __ b(&compare_map); | 4129 __ b(&compare_map); |
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5787 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5787 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5788 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5788 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5789 } | 5789 } |
5790 | 5790 |
5791 | 5791 |
5792 #undef __ | 5792 #undef __ |
5793 } // namespace internal | 5793 } // namespace internal |
5794 } // namespace v8 | 5794 } // namespace v8 |
5795 | 5795 |
5796 #endif // V8_TARGET_ARCH_PPC | 5796 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |