OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 __ IncrementCounter(&Counters::keyed_load_generic_slow, 1); | 275 __ IncrementCounter(&Counters::keyed_load_generic_slow, 1); |
276 KeyedLoadIC::Generate(masm, ExternalReference(Runtime::kKeyedGetProperty)); | 276 KeyedLoadIC::Generate(masm, ExternalReference(Runtime::kKeyedGetProperty)); |
277 // Check if the key is a symbol that is not an array index. | 277 // Check if the key is a symbol that is not an array index. |
278 __ bind(&check_string); | 278 __ bind(&check_string); |
279 __ mov(ebx, FieldOperand(eax, String::kLengthOffset)); | 279 __ mov(ebx, FieldOperand(eax, String::kLengthOffset)); |
280 __ test(ebx, Immediate(String::kIsArrayIndexMask)); | 280 __ test(ebx, Immediate(String::kIsArrayIndexMask)); |
281 __ j(not_zero, &index_string, not_taken); | 281 __ j(not_zero, &index_string, not_taken); |
282 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); | 282 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); |
283 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); | 283 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); |
284 __ test(ebx, Immediate(kIsSymbolMask)); | 284 __ test(ebx, Immediate(kIsSymbolMask)); |
285 __ j(not_zero, &slow, not_taken); | 285 __ j(zero, &slow, not_taken); |
286 // Probe the dictionary leaving result in ecx. | 286 // Probe the dictionary leaving result in ecx. |
287 GenerateDictionaryLoad(masm, &slow, ebx, ecx, edx, eax); | 287 GenerateDictionaryLoad(masm, &slow, ebx, ecx, edx, eax); |
288 GenerateCheckNonObjectOrLoaded(masm, &slow, ecx, edx); | 288 GenerateCheckNonObjectOrLoaded(masm, &slow, ecx, edx); |
289 __ mov(eax, Operand(ecx)); | 289 __ mov(eax, Operand(ecx)); |
290 __ IncrementCounter(&Counters::keyed_load_generic_symbol, 1); | 290 __ IncrementCounter(&Counters::keyed_load_generic_symbol, 1); |
291 __ ret(0); | 291 __ ret(0); |
292 // Array index string: If short enough use cache in length/hash field (ebx). | 292 // Array index string: If short enough use cache in length/hash field (ebx). |
293 // We assert that there are enough bits in an int32_t after the hash shift | 293 // We assert that there are enough bits in an int32_t after the hash shift |
294 // bits have been subtracted to allow space for the length and the cached | 294 // bits have been subtracted to allow space for the length and the cached |
295 // array index. | 295 // array index. |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 | 979 |
980 // Do tail-call to runtime routine. | 980 // Do tail-call to runtime routine. |
981 __ TailCallRuntime( | 981 __ TailCallRuntime( |
982 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); | 982 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3); |
983 } | 983 } |
984 | 984 |
985 #undef __ | 985 #undef __ |
986 | 986 |
987 | 987 |
988 } } // namespace v8::internal | 988 } } // namespace v8::internal |
OLD | NEW |