| 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 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2948 | 2948 |
| 2949 // Return the generated code. | 2949 // Return the generated code. |
| 2950 return GetCode(Code::CALLBACKS, name); | 2950 return GetCode(Code::CALLBACKS, name); |
| 2951 } | 2951 } |
| 2952 | 2952 |
| 2953 | 2953 |
| 2954 #undef __ | 2954 #undef __ |
| 2955 #define __ ACCESS_MASM(masm) | 2955 #define __ ACCESS_MASM(masm) |
| 2956 | 2956 |
| 2957 | 2957 |
| 2958 void LoadStubCompiler::GenerateLoadArrayLength( |
| 2959 MacroAssembler* masm, |
| 2960 Register holder) { |
| 2961 // ----------- S t a t e ------------- |
| 2962 // -- r0 : receiver |
| 2963 // -- r2 : name |
| 2964 // -- lr : return address |
| 2965 // ----------------------------------- |
| 2966 |
| 2967 // Load length directly from the JS array. |
| 2968 __ ldr(r0, FieldMemOperand(holder, JSArray::kLengthOffset)); |
| 2969 __ Ret(); |
| 2970 } |
| 2971 |
| 2972 |
| 2973 #undef __ |
| 2974 #define __ ACCESS_MASM(masm()) |
| 2975 |
| 2976 |
| 2977 Handle<Code> LoadStubCompiler::CompileLoadArrayLength( |
| 2978 Handle<String> name, |
| 2979 Handle<JSObject> receiver, |
| 2980 Handle<JSObject> holder) { |
| 2981 // ----------- S t a t e ------------- |
| 2982 // -- r0 : receiver |
| 2983 // -- r2 : name |
| 2984 // -- lr : return address |
| 2985 // ----------------------------------- |
| 2986 Label miss; |
| 2987 |
| 2988 // Check that the maps haven't changed. |
| 2989 __ JumpIfSmi(r0, &miss); |
| 2990 Register holder_reg = CheckPrototypes( |
| 2991 receiver, r0, holder, r3, r4, r1, name, &miss); |
| 2992 |
| 2993 GenerateLoadArrayLength(masm(), holder_reg); |
| 2994 |
| 2995 __ bind(&miss); |
| 2996 GenerateLoadMiss(masm(), Code::LOAD_IC); |
| 2997 |
| 2998 // Return the generated code. |
| 2999 return GetCode(Code::CALLBACKS, name, |
| 3000 Code::ExtraICStateForeignCallbackArrayLength); |
| 3001 } |
| 3002 |
| 3003 |
| 3004 #undef __ |
| 3005 #define __ ACCESS_MASM(masm) |
| 3006 |
| 3007 |
| 2958 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, | 3008 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, |
| 2959 Handle<JSFunction> getter) { | 3009 Handle<JSFunction> getter) { |
| 2960 // ----------- S t a t e ------------- | 3010 // ----------- S t a t e ------------- |
| 2961 // -- r0 : receiver | 3011 // -- r0 : receiver |
| 2962 // -- r2 : name | 3012 // -- r2 : name |
| 2963 // -- lr : return address | 3013 // -- lr : return address |
| 2964 // ----------------------------------- | 3014 // ----------------------------------- |
| 2965 { | 3015 { |
| 2966 FrameScope scope(masm, StackFrame::INTERNAL); | 3016 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2967 | 3017 |
| (...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4777 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4827 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
| 4778 } | 4828 } |
| 4779 } | 4829 } |
| 4780 | 4830 |
| 4781 | 4831 |
| 4782 #undef __ | 4832 #undef __ |
| 4783 | 4833 |
| 4784 } } // namespace v8::internal | 4834 } } // namespace v8::internal |
| 4785 | 4835 |
| 4786 #endif // V8_TARGET_ARCH_ARM | 4836 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |