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 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 ldr(function, | 2895 ldr(function, |
2896 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 2896 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
2897 // Load the native context from the global or builtins object. | 2897 // Load the native context from the global or builtins object. |
2898 ldr(function, FieldMemOperand(function, | 2898 ldr(function, FieldMemOperand(function, |
2899 GlobalObject::kNativeContextOffset)); | 2899 GlobalObject::kNativeContextOffset)); |
2900 // Load the function from the native context. | 2900 // Load the function from the native context. |
2901 ldr(function, MemOperand(function, Context::SlotOffset(index))); | 2901 ldr(function, MemOperand(function, Context::SlotOffset(index))); |
2902 } | 2902 } |
2903 | 2903 |
2904 | 2904 |
2905 void MacroAssembler::LoadArrayFunction(Register function) { | |
2906 // Load the global or builtins object from the current context. | |
2907 ldr(function, | |
2908 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | |
2909 // Load the global context from the global or builtins object. | |
2910 ldr(function, | |
2911 FieldMemOperand(function, GlobalObject::kGlobalContextOffset)); | |
2912 // Load the array function from the native context. | |
2913 ldr(function, | |
2914 MemOperand(function, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); | |
2915 } | |
2916 | |
2917 | |
2918 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, | 2905 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, |
2919 Register map, | 2906 Register map, |
2920 Register scratch) { | 2907 Register scratch) { |
2921 // Load the initial map. The global functions all have initial maps. | 2908 // Load the initial map. The global functions all have initial maps. |
2922 ldr(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 2909 ldr(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
2923 if (emit_debug_code()) { | 2910 if (emit_debug_code()) { |
2924 Label ok, fail; | 2911 Label ok, fail; |
2925 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); | 2912 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); |
2926 b(&ok); | 2913 b(&ok); |
2927 bind(&fail); | 2914 bind(&fail); |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4041 void CodePatcher::EmitCondition(Condition cond) { | 4028 void CodePatcher::EmitCondition(Condition cond) { |
4042 Instr instr = Assembler::instr_at(masm_.pc_); | 4029 Instr instr = Assembler::instr_at(masm_.pc_); |
4043 instr = (instr & ~kCondMask) | cond; | 4030 instr = (instr & ~kCondMask) | cond; |
4044 masm_.emit(instr); | 4031 masm_.emit(instr); |
4045 } | 4032 } |
4046 | 4033 |
4047 | 4034 |
4048 } } // namespace v8::internal | 4035 } } // namespace v8::internal |
4049 | 4036 |
4050 #endif // V8_TARGET_ARCH_ARM | 4037 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |