| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 404 |
| 405 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 405 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
| 406 Handle<Name> name) { | 406 Handle<Name> name) { |
| 407 if (!label->is_unused()) { | 407 if (!label->is_unused()) { |
| 408 __ bind(label); | 408 __ bind(label); |
| 409 __ mov(this->name(), Operand(name)); | 409 __ mov(this->name(), Operand(name)); |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 | 412 |
| 413 | 413 |
| 414 void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup( | |
| 415 Register holder_reg, Handle<Name> name, Label* miss) { | |
| 416 if (holder()->IsJSGlobalObject()) { | |
| 417 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(holder()), | |
| 418 name, scratch1(), miss); | |
| 419 } else if (!holder()->HasFastProperties()) { | |
| 420 GenerateDictionaryNegativeLookup(masm(), miss, holder_reg, name, scratch1(), | |
| 421 scratch2()); | |
| 422 } | |
| 423 } | |
| 424 | |
| 425 | |
| 426 // Generate StoreTransition code, value is passed in r0 register. | 414 // Generate StoreTransition code, value is passed in r0 register. |
| 427 // When leaving generated code after success, the receiver_reg and name_reg | 415 // When leaving generated code after success, the receiver_reg and name_reg |
| 428 // may be clobbered. Upon branch to miss_label, the receiver and name | 416 // may be clobbered. Upon branch to miss_label, the receiver and name |
| 429 // registers have their original values. | 417 // registers have their original values. |
| 430 void NamedStoreHandlerCompiler::GenerateStoreTransition( | 418 void NamedStoreHandlerCompiler::GenerateStoreTransition( |
| 431 Handle<Map> transition, Handle<Name> name, Register receiver_reg, | 419 Handle<Map> transition, Handle<Name> name, Register receiver_reg, |
| 432 Register storage_reg, Register value_reg, Register scratch1, | 420 Register storage_reg, Register value_reg, Register scratch1, |
| 433 Register scratch2, Register scratch3, Label* miss_label, Label* slow) { | 421 Register scratch2, Register scratch3, Label* miss_label, Label* slow) { |
| 434 // r0 : value | 422 // r0 : value |
| 435 Label exit; | 423 Label exit; |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 // Do tail-call to the runtime system. | 1108 // Do tail-call to the runtime system. |
| 1121 ExternalReference store_ic_property = ExternalReference( | 1109 ExternalReference store_ic_property = ExternalReference( |
| 1122 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); | 1110 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); |
| 1123 __ TailCallExternalReference(store_ic_property, 3, 1); | 1111 __ TailCallExternalReference(store_ic_property, 3, 1); |
| 1124 | 1112 |
| 1125 // Return the generated code. | 1113 // Return the generated code. |
| 1126 return GetCode(kind(), Code::FAST, name); | 1114 return GetCode(kind(), Code::FAST, name); |
| 1127 } | 1115 } |
| 1128 | 1116 |
| 1129 | 1117 |
| 1130 Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent( | |
| 1131 Handle<Name> name) { | |
| 1132 NonexistentFrontend(name); | |
| 1133 | |
| 1134 // Return undefined if maps of the full prototype chain are still the | |
| 1135 // same and no global property with this name contains a value. | |
| 1136 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | |
| 1137 __ Ret(); | |
| 1138 | |
| 1139 // Return the generated code. | |
| 1140 return GetCode(kind(), Code::FAST, name); | |
| 1141 } | |
| 1142 | |
| 1143 | |
| 1144 Register* PropertyAccessCompiler::load_calling_convention() { | 1118 Register* PropertyAccessCompiler::load_calling_convention() { |
| 1145 // receiver, name, scratch1, scratch2, scratch3, scratch4. | 1119 // receiver, name, scratch1, scratch2, scratch3, scratch4. |
| 1146 Register receiver = LoadIC::ReceiverRegister(); | 1120 Register receiver = LoadIC::ReceiverRegister(); |
| 1147 Register name = LoadIC::NameRegister(); | 1121 Register name = LoadIC::NameRegister(); |
| 1148 static Register registers[] = { receiver, name, r3, r0, r4, r5 }; | 1122 static Register registers[] = { receiver, name, r3, r0, r4, r5 }; |
| 1149 return registers; | 1123 return registers; |
| 1150 } | 1124 } |
| 1151 | 1125 |
| 1152 | 1126 |
| 1153 Register* PropertyAccessCompiler::store_calling_convention() { | 1127 Register* PropertyAccessCompiler::store_calling_convention() { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 | 1327 |
| 1354 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1328 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1355 } | 1329 } |
| 1356 | 1330 |
| 1357 | 1331 |
| 1358 #undef __ | 1332 #undef __ |
| 1359 | 1333 |
| 1360 } } // namespace v8::internal | 1334 } } // namespace v8::internal |
| 1361 | 1335 |
| 1362 #endif // V8_TARGET_ARCH_ARM | 1336 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |