| 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 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3118 | 3118 |
| 3119 | 3119 |
| 3120 Handle<Code> LoadStubCompiler::CompileLoadGlobal( | 3120 Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
| 3121 Handle<JSObject> object, | 3121 Handle<JSObject> object, |
| 3122 Handle<GlobalObject> global, | 3122 Handle<GlobalObject> global, |
| 3123 Handle<PropertyCell> cell, | 3123 Handle<PropertyCell> cell, |
| 3124 Handle<Name> name, | 3124 Handle<Name> name, |
| 3125 bool is_dont_delete) { | 3125 bool is_dont_delete) { |
| 3126 Label success, miss; | 3126 Label success, miss; |
| 3127 | 3127 |
| 3128 __ CheckMap(receiver(), Handle<Map>(object->map()), &miss, DO_SMI_CHECK); | 3128 HandlerFrontendHeader(object, receiver(), global, name, &miss); |
| 3129 HandlerFrontendHeader( | |
| 3130 object, receiver(), Handle<JSObject>::cast(global), name, &miss); | |
| 3131 // Get the value from the cell. | 3129 // Get the value from the cell. |
| 3132 if (Serializer::enabled()) { | 3130 if (Serializer::enabled()) { |
| 3133 __ mov(eax, Immediate(cell)); | 3131 __ mov(eax, Immediate(cell)); |
| 3134 __ mov(eax, FieldOperand(eax, PropertyCell::kValueOffset)); | 3132 __ mov(eax, FieldOperand(eax, PropertyCell::kValueOffset)); |
| 3135 } else { | 3133 } else { |
| 3136 __ mov(eax, Operand::ForCell(cell)); | 3134 __ mov(eax, Operand::ForCell(cell)); |
| 3137 } | 3135 } |
| 3138 | 3136 |
| 3139 // Check for deleted property if property can actually be deleted. | 3137 // Check for deleted property if property can actually be deleted. |
| 3140 if (!is_dont_delete) { | 3138 if (!is_dont_delete) { |
| 3141 __ cmp(eax, factory()->the_hole_value()); | 3139 __ cmp(eax, factory()->the_hole_value()); |
| 3142 __ j(equal, &miss); | 3140 __ j(equal, &miss); |
| 3143 } else if (FLAG_debug_code) { | 3141 } else if (FLAG_debug_code) { |
| 3144 __ cmp(eax, factory()->the_hole_value()); | 3142 __ cmp(eax, factory()->the_hole_value()); |
| 3145 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); | 3143 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); |
| 3146 } | 3144 } |
| 3147 | 3145 |
| 3148 HandlerFrontendFooter(name, &success, &miss); | 3146 HandlerFrontendFooter(name, &success, &miss); |
| 3149 __ bind(&success); | 3147 __ bind(&success); |
| 3150 | 3148 |
| 3151 Counters* counters = isolate()->counters(); | 3149 Counters* counters = isolate()->counters(); |
| 3152 __ IncrementCounter(counters->named_load_global_stub(), 1); | 3150 __ IncrementCounter(counters->named_load_global_stub(), 1); |
| 3153 // The code above already loads the result into the return register. | 3151 // The code above already loads the result into the return register. |
| 3154 __ ret(0); | 3152 __ ret(0); |
| 3155 | 3153 |
| 3156 // Return the generated code. | 3154 // Return the generated code. |
| 3157 return GetICCode(kind(), Code::NORMAL, name); | 3155 return GetCode(kind(), Code::NORMAL, name); |
| 3158 } | 3156 } |
| 3159 | 3157 |
| 3160 | 3158 |
| 3161 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( | 3159 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( |
| 3162 MapHandleList* receiver_maps, | 3160 MapHandleList* receiver_maps, |
| 3163 CodeHandleList* handlers, | 3161 CodeHandleList* handlers, |
| 3164 Handle<Name> name, | 3162 Handle<Name> name, |
| 3165 Code::StubType type, | 3163 Code::StubType type, |
| 3166 IcCheckType check) { | 3164 IcCheckType check) { |
| 3167 Label miss; | 3165 Label miss; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3241 // ----------------------------------- | 3239 // ----------------------------------- |
| 3242 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3240 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3243 } | 3241 } |
| 3244 | 3242 |
| 3245 | 3243 |
| 3246 #undef __ | 3244 #undef __ |
| 3247 | 3245 |
| 3248 } } // namespace v8::internal | 3246 } } // namespace v8::internal |
| 3249 | 3247 |
| 3250 #endif // V8_TARGET_ARCH_IA32 | 3248 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |