| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 // Check that the map of the global has not changed. | 968 // Check that the map of the global has not changed. |
| 969 __ mov(ebx, (Operand(esp, kPointerSize))); | 969 __ mov(ebx, (Operand(esp, kPointerSize))); |
| 970 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), | 970 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
| 971 Immediate(Handle<Map>(object->map()))); | 971 Immediate(Handle<Map>(object->map()))); |
| 972 __ j(not_equal, &miss, not_taken); | 972 __ j(not_equal, &miss, not_taken); |
| 973 | 973 |
| 974 // Store the value in the cell. | 974 // Store the value in the cell. |
| 975 __ mov(ecx, Immediate(Handle<JSGlobalPropertyCell>(cell))); | 975 __ mov(ecx, Immediate(Handle<JSGlobalPropertyCell>(cell))); |
| 976 __ mov(FieldOperand(ecx, JSGlobalPropertyCell::kValueOffset), eax); | 976 __ mov(FieldOperand(ecx, JSGlobalPropertyCell::kValueOffset), eax); |
| 977 | 977 |
| 978 // RecordWrite clobbers the value register. Pass the value being stored in | |
| 979 // edx. | |
| 980 __ mov(edx, eax); | |
| 981 __ RecordWrite(ecx, JSGlobalPropertyCell::kValueOffset, edx, ebx); | |
| 982 | |
| 983 // Return the value (register eax). | 978 // Return the value (register eax). |
| 984 __ ret(0); | 979 __ ret(0); |
| 985 | 980 |
| 986 // Handle store cache miss. | 981 // Handle store cache miss. |
| 987 __ bind(&miss); | 982 __ bind(&miss); |
| 988 __ DecrementCounter(&Counters::named_store_global_inline, 1); | 983 __ DecrementCounter(&Counters::named_store_global_inline, 1); |
| 989 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1); | 984 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1); |
| 990 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 985 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
| 991 __ jmp(ic, RelocInfo::CODE_TARGET); | 986 __ jmp(ic, RelocInfo::CODE_TARGET); |
| 992 | 987 |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 1381 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 1387 | 1382 |
| 1388 // Return the generated code. | 1383 // Return the generated code. |
| 1389 return GetCode(CALLBACKS, name); | 1384 return GetCode(CALLBACKS, name); |
| 1390 } | 1385 } |
| 1391 | 1386 |
| 1392 | 1387 |
| 1393 #undef __ | 1388 #undef __ |
| 1394 | 1389 |
| 1395 } } // namespace v8::internal | 1390 } } // namespace v8::internal |
| OLD | NEW |