| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 | 2970 |
| 2971 // Handle store cache miss. | 2971 // Handle store cache miss. |
| 2972 __ Bind(&miss); | 2972 __ Bind(&miss); |
| 2973 TailCallBuiltin(masm(), MissBuiltin(kind())); | 2973 TailCallBuiltin(masm(), MissBuiltin(kind())); |
| 2974 | 2974 |
| 2975 // Return the generated code. | 2975 // Return the generated code. |
| 2976 return GetCode(kind(), Code::INTERCEPTOR, name); | 2976 return GetCode(kind(), Code::INTERCEPTOR, name); |
| 2977 } | 2977 } |
| 2978 | 2978 |
| 2979 | 2979 |
| 2980 Handle<Code> StoreStubCompiler::CompileStoreGlobal( | |
| 2981 Handle<GlobalObject> object, | |
| 2982 Handle<PropertyCell> cell, | |
| 2983 Handle<Name> name) { | |
| 2984 Label miss; | |
| 2985 | |
| 2986 ASM_LOCATION("StoreStubCompiler::CompileStoreGlobal"); | |
| 2987 | |
| 2988 // Check that the map of the global has not changed. | |
| 2989 __ Ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); | |
| 2990 __ Cmp(scratch1(), Operand(Handle<Map>(object->map()))); | |
| 2991 __ B(ne, &miss); | |
| 2992 | |
| 2993 // Check that the value in the cell is not the hole. If it is, this | |
| 2994 // cell could have been deleted and reintroducing the global needs | |
| 2995 // to update the property details in the property dictionary of the | |
| 2996 // global object. We bail out to the runtime system to do that. | |
| 2997 __ Mov(scratch1(), Operand(cell)); | |
| 2998 __ Ldr(scratch2(), FieldMemOperand(scratch1(), | |
| 2999 Cell::kValueOffset)); | |
| 3000 __ JumpIfRoot(scratch2(), Heap::kTheHoleValueRootIndex, &miss); | |
| 3001 | |
| 3002 // Store the value in the cell. | |
| 3003 __ Str(value(), FieldMemOperand(scratch1(), | |
| 3004 Cell::kValueOffset)); | |
| 3005 // Cells are always rescanned, so no write barrier here. | |
| 3006 | |
| 3007 Counters* counters = isolate()->counters(); | |
| 3008 __ IncrementCounter(counters->named_store_global_inline(), 1, | |
| 3009 scratch1(), scratch2()); | |
| 3010 __ Ret(); | |
| 3011 | |
| 3012 // Handle store cache miss. | |
| 3013 __ Bind(&miss); | |
| 3014 __ IncrementCounter(counters->named_store_global_inline_miss(), 1, | |
| 3015 scratch1(), scratch2()); | |
| 3016 TailCallBuiltin(masm(), MissBuiltin(kind())); | |
| 3017 | |
| 3018 // Return the generated code. | |
| 3019 return GetICCode(kind(), Code::NORMAL, name); | |
| 3020 } | |
| 3021 | |
| 3022 | |
| 3023 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( | 2980 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( |
| 3024 Handle<JSObject> object, | 2981 Handle<JSObject> object, |
| 3025 Handle<JSObject> last, | 2982 Handle<JSObject> last, |
| 3026 Handle<Name> name, | 2983 Handle<Name> name, |
| 3027 Handle<GlobalObject> global) { | 2984 Handle<GlobalObject> global) { |
| 3028 Label success; | 2985 Label success; |
| 3029 NonexistentHandlerFrontend(object, last, name, &success, global); | 2986 NonexistentHandlerFrontend(object, last, name, &success, global); |
| 3030 | 2987 |
| 3031 __ Bind(&success); | 2988 __ Bind(&success); |
| 3032 // Return undefined if maps of the full prototype chain are still the | 2989 // Return undefined if maps of the full prototype chain are still the |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3282 | 3239 |
| 3283 // Miss case, call the runtime. | 3240 // Miss case, call the runtime. |
| 3284 __ Bind(&miss_force_generic); | 3241 __ Bind(&miss_force_generic); |
| 3285 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3242 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3286 } | 3243 } |
| 3287 | 3244 |
| 3288 | 3245 |
| 3289 } } // namespace v8::internal | 3246 } } // namespace v8::internal |
| 3290 | 3247 |
| 3291 #endif // V8_TARGET_ARCH_A64 | 3248 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |