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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1296 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); | 1296 ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); |
1297 | 1297 |
1298 // Check that the receiver isn't a smi. | 1298 // Check that the receiver isn't a smi. |
1299 __ JumpIfSmi(receiver, miss); | 1299 __ JumpIfSmi(receiver, miss); |
1300 | 1300 |
1301 // So far the most popular follow ups for interceptor loads are FIELD | 1301 // So far the most popular follow ups for interceptor loads are FIELD |
1302 // and CALLBACKS, so inline only them, other cases may be added | 1302 // and CALLBACKS, so inline only them, other cases may be added |
1303 // later. | 1303 // later. |
1304 bool compile_followup_inline = false; | 1304 bool compile_followup_inline = false; |
1305 if (lookup->IsFound() && lookup->IsCacheable()) { | 1305 if (lookup->IsFound() && lookup->IsCacheable()) { |
1306 if (lookup->type() == FIELD) { | 1306 if (lookup->IsField()) { |
1307 compile_followup_inline = true; | 1307 compile_followup_inline = true; |
1308 } else if (lookup->type() == CALLBACKS && | 1308 } else if (lookup->type() == CALLBACKS && |
1309 lookup->GetCallbackObject()->IsAccessorInfo()) { | 1309 lookup->GetCallbackObject()->IsAccessorInfo()) { |
1310 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject()); | 1310 AccessorInfo* callback = AccessorInfo::cast(lookup->GetCallbackObject()); |
1311 compile_followup_inline = callback->getter() != NULL && | 1311 compile_followup_inline = callback->getter() != NULL && |
1312 callback->IsCompatibleReceiver(*object); | 1312 callback->IsCompatibleReceiver(*object); |
1313 } | 1313 } |
1314 } | 1314 } |
1315 | 1315 |
1316 if (compile_followup_inline) { | 1316 if (compile_followup_inline) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 holder_reg = CheckPrototypes(interceptor_holder, | 1370 holder_reg = CheckPrototypes(interceptor_holder, |
1371 holder_reg, | 1371 holder_reg, |
1372 Handle<JSObject>(lookup->holder()), | 1372 Handle<JSObject>(lookup->holder()), |
1373 scratch1, | 1373 scratch1, |
1374 scratch2, | 1374 scratch2, |
1375 scratch3, | 1375 scratch3, |
1376 name, | 1376 name, |
1377 miss); | 1377 miss); |
1378 } | 1378 } |
1379 | 1379 |
1380 if (lookup->type() == FIELD) { | 1380 if (lookup->IsField()) { |
1381 // We found FIELD property in prototype chain of interceptor's holder. | 1381 // We found FIELD property in prototype chain of interceptor's holder. |
1382 // Retrieve a field from field's holder. | 1382 // Retrieve a field from field's holder. |
1383 GenerateFastPropertyLoad(masm(), r0, holder_reg, | 1383 GenerateFastPropertyLoad(masm(), r0, holder_reg, |
1384 Handle<JSObject>(lookup->holder()), | 1384 Handle<JSObject>(lookup->holder()), |
1385 lookup->GetFieldIndex()); | 1385 lookup->GetFieldIndex()); |
1386 __ Ret(); | 1386 __ Ret(); |
1387 } else { | 1387 } else { |
1388 // We found CALLBACKS property in prototype chain of interceptor's | 1388 // We found CALLBACKS property in prototype chain of interceptor's |
1389 // holder. | 1389 // holder. |
1390 ASSERT(lookup->type() == CALLBACKS); | 1390 ASSERT(lookup->type() == CALLBACKS); |
(...skipping 3284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4675 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4675 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
4676 } | 4676 } |
4677 } | 4677 } |
4678 | 4678 |
4679 | 4679 |
4680 #undef __ | 4680 #undef __ |
4681 | 4681 |
4682 } } // namespace v8::internal | 4682 } } // namespace v8::internal |
4683 | 4683 |
4684 #endif // V8_TARGET_ARCH_ARM | 4684 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |