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 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2422 __ Jump(ic, RelocInfo::CODE_TARGET); | 2422 __ Jump(ic, RelocInfo::CODE_TARGET); |
2423 | 2423 |
2424 // Return the generated code. | 2424 // Return the generated code. |
2425 return GetCode(transition.is_null() | 2425 return GetCode(transition.is_null() |
2426 ? Code::FIELD | 2426 ? Code::FIELD |
2427 : Code::MAP_TRANSITION, name); | 2427 : Code::MAP_TRANSITION, name); |
2428 } | 2428 } |
2429 | 2429 |
2430 | 2430 |
2431 Handle<Code> StoreStubCompiler::CompileStoreCallback( | 2431 Handle<Code> StoreStubCompiler::CompileStoreCallback( |
2432 Handle<JSObject> object, | 2432 Handle<String> name, |
2433 Handle<AccessorInfo> callback, | 2433 Handle<JSObject> receiver, |
2434 Handle<String> name) { | 2434 Handle<JSObject> holder, |
| 2435 Handle<AccessorInfo> callback) { |
2435 // ----------- S t a t e ------------- | 2436 // ----------- S t a t e ------------- |
2436 // -- rax : value | 2437 // -- rax : value |
2437 // -- rcx : name | 2438 // -- rcx : name |
2438 // -- rdx : receiver | 2439 // -- rdx : receiver |
2439 // -- rsp[0] : return address | 2440 // -- rsp[0] : return address |
2440 // ----------------------------------- | 2441 // ----------------------------------- |
2441 Label miss; | 2442 Label miss; |
| 2443 // Check that the maps haven't changed. |
| 2444 __ JumpIfSmi(rdx, &miss); |
| 2445 CheckPrototypes(receiver, rdx, holder, rbx, r8, rdi, name, &miss); |
2442 | 2446 |
2443 // Check that the map of the object hasn't changed. | 2447 // Stub never generated for non-global objects that require access checks. |
2444 __ CheckMap(rdx, Handle<Map>(object->map()), &miss, | 2448 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); |
2445 DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS); | |
2446 | |
2447 // Perform global security token check if needed. | |
2448 if (object->IsJSGlobalProxy()) { | |
2449 __ CheckAccessGlobalProxy(rdx, rbx, &miss); | |
2450 } | |
2451 | |
2452 // Stub never generated for non-global objects that require access | |
2453 // checks. | |
2454 ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); | |
2455 | 2449 |
2456 __ pop(rbx); // remove the return address | 2450 __ pop(rbx); // remove the return address |
2457 __ push(rdx); // receiver | 2451 __ push(rdx); // receiver |
2458 __ Push(callback); // callback info | 2452 __ Push(callback); // callback info |
2459 __ push(rcx); // name | 2453 __ push(rcx); // name |
2460 __ push(rax); // value | 2454 __ push(rax); // value |
2461 __ push(rbx); // restore return address | 2455 __ push(rbx); // restore return address |
2462 | 2456 |
2463 // Do tail-call to the runtime system. | 2457 // Do tail-call to the runtime system. |
2464 ExternalReference store_callback_property = | 2458 ExternalReference store_callback_property = |
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4077 __ jmp(ic_slow, RelocInfo::CODE_TARGET); | 4071 __ jmp(ic_slow, RelocInfo::CODE_TARGET); |
4078 } | 4072 } |
4079 } | 4073 } |
4080 | 4074 |
4081 | 4075 |
4082 #undef __ | 4076 #undef __ |
4083 | 4077 |
4084 } } // namespace v8::internal | 4078 } } // namespace v8::internal |
4085 | 4079 |
4086 #endif // V8_TARGET_ARCH_X64 | 4080 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |