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 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3039 | 3039 |
3040 | 3040 |
3041 Handle<Code> LoadStubCompiler::CompileLoadGlobal( | 3041 Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
3042 Handle<JSObject> object, | 3042 Handle<JSObject> object, |
3043 Handle<GlobalObject> global, | 3043 Handle<GlobalObject> global, |
3044 Handle<PropertyCell> cell, | 3044 Handle<PropertyCell> cell, |
3045 Handle<Name> name, | 3045 Handle<Name> name, |
3046 bool is_dont_delete) { | 3046 bool is_dont_delete) { |
3047 Label success, miss; | 3047 Label success, miss; |
3048 | 3048 |
3049 __ CheckMap( | 3049 HandlerFrontendHeader(object, receiver(), global, name, &miss); |
3050 receiver(), scratch1(), Handle<Map>(object->map()), &miss, DO_SMI_CHECK); | |
3051 HandlerFrontendHeader( | |
3052 object, receiver(), Handle<JSObject>::cast(global), name, &miss); | |
3053 | 3050 |
3054 // Get the value from the cell. | 3051 // Get the value from the cell. |
3055 __ mov(r3, Operand(cell)); | 3052 __ mov(r3, Operand(cell)); |
3056 __ ldr(r4, FieldMemOperand(r3, Cell::kValueOffset)); | 3053 __ ldr(r4, FieldMemOperand(r3, Cell::kValueOffset)); |
3057 | 3054 |
3058 // Check for deleted property if property can actually be deleted. | 3055 // Check for deleted property if property can actually be deleted. |
3059 if (!is_dont_delete) { | 3056 if (!is_dont_delete) { |
3060 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 3057 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
3061 __ cmp(r4, ip); | 3058 __ cmp(r4, ip); |
3062 __ b(eq, &miss); | 3059 __ b(eq, &miss); |
3063 } | 3060 } |
3064 | 3061 |
3065 HandlerFrontendFooter(name, &success, &miss); | 3062 HandlerFrontendFooter(name, &success, &miss); |
3066 __ bind(&success); | 3063 __ bind(&success); |
3067 | 3064 |
3068 Counters* counters = isolate()->counters(); | 3065 Counters* counters = isolate()->counters(); |
3069 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); | 3066 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); |
3070 __ mov(r0, r4); | 3067 __ mov(r0, r4); |
3071 __ Ret(); | 3068 __ Ret(); |
3072 | 3069 |
3073 // Return the generated code. | 3070 // Return the generated code. |
3074 return GetICCode(kind(), Code::NORMAL, name); | 3071 return GetCode(kind(), Code::NORMAL, name); |
3075 } | 3072 } |
3076 | 3073 |
3077 | 3074 |
3078 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( | 3075 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( |
3079 MapHandleList* receiver_maps, | 3076 MapHandleList* receiver_maps, |
3080 CodeHandleList* handlers, | 3077 CodeHandleList* handlers, |
3081 Handle<Name> name, | 3078 Handle<Name> name, |
3082 Code::StubType type, | 3079 Code::StubType type, |
3083 IcCheckType check) { | 3080 IcCheckType check) { |
3084 Label miss; | 3081 Label miss; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3189 // ----------------------------------- | 3186 // ----------------------------------- |
3190 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3187 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
3191 } | 3188 } |
3192 | 3189 |
3193 | 3190 |
3194 #undef __ | 3191 #undef __ |
3195 | 3192 |
3196 } } // namespace v8::internal | 3193 } } // namespace v8::internal |
3197 | 3194 |
3198 #endif // V8_TARGET_ARCH_ARM | 3195 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |