| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 // Perform map transition for the receiver if necessary. | 230 // Perform map transition for the receiver if necessary. |
| 231 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { | 231 if ((transition != NULL) && (object->map()->unused_property_fields() == 0)) { |
| 232 // The properties must be extended before we can store the value. | 232 // The properties must be extended before we can store the value. |
| 233 // We jump to a runtime call that extends the properties array. | 233 // We jump to a runtime call that extends the properties array. |
| 234 __ pop(scratch); // Return address. | 234 __ pop(scratch); // Return address. |
| 235 __ push(receiver_reg); | 235 __ push(receiver_reg); |
| 236 __ Push(Handle<Map>(transition)); | 236 __ Push(Handle<Map>(transition)); |
| 237 __ push(rax); | 237 __ push(rax); |
| 238 __ push(scratch); | 238 __ push(scratch); |
| 239 __ TailCallRuntime( | 239 __ TailCallExternalReference( |
| 240 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage)), 3, 1); | 240 ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage)), 3, 1); |
| 241 return; | 241 return; |
| 242 } | 242 } |
| 243 | 243 |
| 244 if (transition != NULL) { | 244 if (transition != NULL) { |
| 245 // Update the map of the object; no write barrier updating is | 245 // Update the map of the object; no write barrier updating is |
| 246 // needed because the map is never in new space. | 246 // needed because the map is never in new space. |
| 247 __ Move(FieldOperand(receiver_reg, HeapObject::kMapOffset), | 247 __ Move(FieldOperand(receiver_reg, HeapObject::kMapOffset), |
| 248 Handle<Map>(transition)); | 248 Handle<Map>(transition)); |
| 249 } | 249 } |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 __ pop(scratch2); // save old return address | 519 __ pop(scratch2); // save old return address |
| 520 __ push(holder); | 520 __ push(holder); |
| 521 __ Move(holder, Handle<AccessorInfo>(callback)); | 521 __ Move(holder, Handle<AccessorInfo>(callback)); |
| 522 __ push(holder); | 522 __ push(holder); |
| 523 __ push(FieldOperand(holder, AccessorInfo::kDataOffset)); | 523 __ push(FieldOperand(holder, AccessorInfo::kDataOffset)); |
| 524 __ push(name_); | 524 __ push(name_); |
| 525 __ push(scratch2); // restore old return address | 525 __ push(scratch2); // restore old return address |
| 526 | 526 |
| 527 ExternalReference ref = | 527 ExternalReference ref = |
| 528 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); | 528 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); |
| 529 __ TailCallRuntime(ref, 5, 1); | 529 __ TailCallExternalReference(ref, 5, 1); |
| 530 | 530 |
| 531 __ bind(&cleanup); | 531 __ bind(&cleanup); |
| 532 __ pop(scratch1); | 532 __ pop(scratch1); |
| 533 __ pop(scratch2); | 533 __ pop(scratch2); |
| 534 __ push(scratch1); | 534 __ push(scratch1); |
| 535 } | 535 } |
| 536 } | 536 } |
| 537 | 537 |
| 538 | 538 |
| 539 void CompileRegular(MacroAssembler* masm, | 539 void CompileRegular(MacroAssembler* masm, |
| 540 Register receiver, | 540 Register receiver, |
| 541 Register holder, | 541 Register holder, |
| 542 Register scratch, | 542 Register scratch, |
| 543 JSObject* holder_obj, | 543 JSObject* holder_obj, |
| 544 Label* miss_label) { | 544 Label* miss_label) { |
| 545 __ pop(scratch); // save old return address | 545 __ pop(scratch); // save old return address |
| 546 PushInterceptorArguments(masm, receiver, holder, name_, holder_obj); | 546 PushInterceptorArguments(masm, receiver, holder, name_, holder_obj); |
| 547 __ push(scratch); // restore old return address | 547 __ push(scratch); // restore old return address |
| 548 | 548 |
| 549 ExternalReference ref = ExternalReference( | 549 ExternalReference ref = ExternalReference( |
| 550 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); | 550 IC_Utility(IC::kLoadPropertyWithInterceptorForLoad)); |
| 551 __ TailCallRuntime(ref, 5, 1); | 551 __ TailCallExternalReference(ref, 5, 1); |
| 552 } | 552 } |
| 553 | 553 |
| 554 private: | 554 private: |
| 555 Register name_; | 555 Register name_; |
| 556 }; | 556 }; |
| 557 | 557 |
| 558 | 558 |
| 559 class CallInterceptorCompiler BASE_EMBEDDED { | 559 class CallInterceptorCompiler BASE_EMBEDDED { |
| 560 public: | 560 public: |
| 561 CallInterceptorCompiler(const ParameterCount& arguments, Register name) | 561 CallInterceptorCompiler(const ParameterCount& arguments, Register name) |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 __ pop(rbx); // remove the return address | 1353 __ pop(rbx); // remove the return address |
| 1354 __ push(rdx); // receiver | 1354 __ push(rdx); // receiver |
| 1355 __ Push(Handle<AccessorInfo>(callback)); // callback info | 1355 __ Push(Handle<AccessorInfo>(callback)); // callback info |
| 1356 __ push(rcx); // name | 1356 __ push(rcx); // name |
| 1357 __ push(rax); // value | 1357 __ push(rax); // value |
| 1358 __ push(rbx); // restore return address | 1358 __ push(rbx); // restore return address |
| 1359 | 1359 |
| 1360 // Do tail-call to the runtime system. | 1360 // Do tail-call to the runtime system. |
| 1361 ExternalReference store_callback_property = | 1361 ExternalReference store_callback_property = |
| 1362 ExternalReference(IC_Utility(IC::kStoreCallbackProperty)); | 1362 ExternalReference(IC_Utility(IC::kStoreCallbackProperty)); |
| 1363 __ TailCallRuntime(store_callback_property, 4, 1); | 1363 __ TailCallExternalReference(store_callback_property, 4, 1); |
| 1364 | 1364 |
| 1365 // Handle store cache miss. | 1365 // Handle store cache miss. |
| 1366 __ bind(&miss); | 1366 __ bind(&miss); |
| 1367 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1367 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
| 1368 __ Jump(ic, RelocInfo::CODE_TARGET); | 1368 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 1369 | 1369 |
| 1370 // Return the generated code. | 1370 // Return the generated code. |
| 1371 return GetCode(CALLBACKS, name); | 1371 return GetCode(CALLBACKS, name); |
| 1372 } | 1372 } |
| 1373 | 1373 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 | 1431 |
| 1432 __ pop(rbx); // remove the return address | 1432 __ pop(rbx); // remove the return address |
| 1433 __ push(rdx); // receiver | 1433 __ push(rdx); // receiver |
| 1434 __ push(rcx); // name | 1434 __ push(rcx); // name |
| 1435 __ push(rax); // value | 1435 __ push(rax); // value |
| 1436 __ push(rbx); // restore return address | 1436 __ push(rbx); // restore return address |
| 1437 | 1437 |
| 1438 // Do tail-call to the runtime system. | 1438 // Do tail-call to the runtime system. |
| 1439 ExternalReference store_ic_property = | 1439 ExternalReference store_ic_property = |
| 1440 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); | 1440 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); |
| 1441 __ TailCallRuntime(store_ic_property, 3, 1); | 1441 __ TailCallExternalReference(store_ic_property, 3, 1); |
| 1442 | 1442 |
| 1443 // Handle store cache miss. | 1443 // Handle store cache miss. |
| 1444 __ bind(&miss); | 1444 __ bind(&miss); |
| 1445 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); | 1445 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); |
| 1446 __ Jump(ic, RelocInfo::CODE_TARGET); | 1446 __ Jump(ic, RelocInfo::CODE_TARGET); |
| 1447 | 1447 |
| 1448 // Return the generated code. | 1448 // Return the generated code. |
| 1449 return GetCode(INTERCEPTOR, name); | 1449 return GetCode(INTERCEPTOR, name); |
| 1450 } | 1450 } |
| 1451 | 1451 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 __ push(reg); // holder | 1630 __ push(reg); // holder |
| 1631 __ Move(reg, Handle<AccessorInfo>(callback)); // callback data | 1631 __ Move(reg, Handle<AccessorInfo>(callback)); // callback data |
| 1632 __ push(reg); | 1632 __ push(reg); |
| 1633 __ push(FieldOperand(reg, AccessorInfo::kDataOffset)); | 1633 __ push(FieldOperand(reg, AccessorInfo::kDataOffset)); |
| 1634 __ push(name_reg); // name | 1634 __ push(name_reg); // name |
| 1635 __ push(scratch2); // restore return address | 1635 __ push(scratch2); // restore return address |
| 1636 | 1636 |
| 1637 // Do tail-call to the runtime system. | 1637 // Do tail-call to the runtime system. |
| 1638 ExternalReference load_callback_property = | 1638 ExternalReference load_callback_property = |
| 1639 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); | 1639 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); |
| 1640 __ TailCallRuntime(load_callback_property, 5, 1); | 1640 __ TailCallExternalReference(load_callback_property, 5, 1); |
| 1641 | 1641 |
| 1642 return true; | 1642 return true; |
| 1643 } | 1643 } |
| 1644 | 1644 |
| 1645 | 1645 |
| 1646 Register StubCompiler::CheckPrototypes(JSObject* object, | 1646 Register StubCompiler::CheckPrototypes(JSObject* object, |
| 1647 Register object_reg, | 1647 Register object_reg, |
| 1648 JSObject* holder, | 1648 JSObject* holder, |
| 1649 Register holder_reg, | 1649 Register holder_reg, |
| 1650 Register scratch, | 1650 Register scratch, |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1853 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 1854 | 1854 |
| 1855 // Return the generated code. | 1855 // Return the generated code. |
| 1856 return GetCode(); | 1856 return GetCode(); |
| 1857 } | 1857 } |
| 1858 | 1858 |
| 1859 | 1859 |
| 1860 #undef __ | 1860 #undef __ |
| 1861 | 1861 |
| 1862 } } // namespace v8::internal | 1862 } } // namespace v8::internal |
| OLD | NEW |