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 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2872 } | 2872 } |
2873 } else { | 2873 } else { |
2874 // Slot is in the current function context. Move it into the | 2874 // Slot is in the current function context. Move it into the |
2875 // destination register in case we store into it (the write barrier | 2875 // destination register in case we store into it (the write barrier |
2876 // cannot be allowed to destroy the context in esi). | 2876 // cannot be allowed to destroy the context in esi). |
2877 mov(dst, cp); | 2877 mov(dst, cp); |
2878 } | 2878 } |
2879 } | 2879 } |
2880 | 2880 |
2881 | 2881 |
| 2882 void MacroAssembler::LoadGlobalInitialConstructedArrayMap( |
| 2883 Register function_in, Register scratch, Register map_out) { |
| 2884 ASSERT(!function_in.is(map_out)); |
| 2885 Label done; |
| 2886 ldr(map_out, FieldMemOperand(function_in, |
| 2887 JSFunction::kPrototypeOrInitialMapOffset)); |
| 2888 if (!FLAG_smi_only_arrays) { |
| 2889 // Load the global or builtins object from the current context. |
| 2890 ldr(scratch, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| 2891 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset)); |
| 2892 |
| 2893 // Check that the function's map is same as the cached map. |
| 2894 ldr(ip, MemOperand( |
| 2895 scratch, Context::SlotOffset(Context::SMI_JS_ARRAY_MAP_INDEX))); |
| 2896 cmp(map_out, ip); |
| 2897 b(ne, &done); |
| 2898 |
| 2899 // Use the cached transitioned map. |
| 2900 ldr(map_out, |
| 2901 MemOperand(scratch, |
| 2902 Context::SlotOffset(Context::OBJECT_JS_ARRAY_MAP_INDEX))); |
| 2903 } |
| 2904 bind(&done); |
| 2905 } |
| 2906 |
| 2907 |
2882 void MacroAssembler::LoadGlobalFunction(int index, Register function) { | 2908 void MacroAssembler::LoadGlobalFunction(int index, Register function) { |
2883 // Load the global or builtins object from the current context. | 2909 // Load the global or builtins object from the current context. |
2884 ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); | 2910 ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
2885 // Load the global context from the global or builtins object. | 2911 // Load the global context from the global or builtins object. |
2886 ldr(function, FieldMemOperand(function, | 2912 ldr(function, FieldMemOperand(function, |
2887 GlobalObject::kGlobalContextOffset)); | 2913 GlobalObject::kGlobalContextOffset)); |
2888 // Load the function from the global context. | 2914 // Load the function from the global context. |
2889 ldr(function, MemOperand(function, Context::SlotOffset(index))); | 2915 ldr(function, MemOperand(function, Context::SlotOffset(index))); |
2890 } | 2916 } |
2891 | 2917 |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3678 void CodePatcher::EmitCondition(Condition cond) { | 3704 void CodePatcher::EmitCondition(Condition cond) { |
3679 Instr instr = Assembler::instr_at(masm_.pc_); | 3705 Instr instr = Assembler::instr_at(masm_.pc_); |
3680 instr = (instr & ~kCondMask) | cond; | 3706 instr = (instr & ~kCondMask) | cond; |
3681 masm_.emit(instr); | 3707 masm_.emit(instr); |
3682 } | 3708 } |
3683 | 3709 |
3684 | 3710 |
3685 } } // namespace v8::internal | 3711 } } // namespace v8::internal |
3686 | 3712 |
3687 #endif // V8_TARGET_ARCH_ARM | 3713 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |