| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 | 1404 |
| 1405 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 1405 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
| 1406 Abort("Unimplemented: %s", "DoCheckInstanceType"); | 1406 Abort("Unimplemented: %s", "DoCheckInstanceType"); |
| 1407 return NULL; | 1407 return NULL; |
| 1408 } | 1408 } |
| 1409 | 1409 |
| 1410 | 1410 |
| 1411 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 1411 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
| 1412 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); | 1412 LOperand* temp = TempRegister(); |
| 1413 return NULL; | 1413 LCheckPrototypeMaps* result = new LCheckPrototypeMaps(temp); |
| 1414 return AssignEnvironment(result); |
| 1414 } | 1415 } |
| 1415 | 1416 |
| 1416 | 1417 |
| 1417 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 1418 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
| 1418 LOperand* value = UseRegisterAtStart(instr->value()); | 1419 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1419 return AssignEnvironment(new LCheckSmi(value, not_zero)); | 1420 return AssignEnvironment(new LCheckSmi(value, not_zero)); |
| 1420 } | 1421 } |
| 1421 | 1422 |
| 1422 | 1423 |
| 1423 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1424 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 | 1459 |
| 1459 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { | 1460 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
| 1460 LLoadGlobal* result = new LLoadGlobal; | 1461 LLoadGlobal* result = new LLoadGlobal; |
| 1461 return instr->check_hole_value() | 1462 return instr->check_hole_value() |
| 1462 ? AssignEnvironment(DefineAsRegister(result)) | 1463 ? AssignEnvironment(DefineAsRegister(result)) |
| 1463 : DefineAsRegister(result); | 1464 : DefineAsRegister(result); |
| 1464 } | 1465 } |
| 1465 | 1466 |
| 1466 | 1467 |
| 1467 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { | 1468 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
| 1468 Abort("Unimplemented: %s", "DoStoreGlobal"); | 1469 return new LStoreGlobal(UseRegisterAtStart(instr->value()));} |
| 1469 return NULL; | |
| 1470 } | |
| 1471 | 1470 |
| 1472 | 1471 |
| 1473 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1472 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 1474 Abort("Unimplemented: %s", "DoLoadContextSlot"); | 1473 Abort("Unimplemented: %s", "DoLoadContextSlot"); |
| 1475 return NULL; | 1474 return NULL; |
| 1476 } | 1475 } |
| 1477 | 1476 |
| 1478 | 1477 |
| 1479 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1478 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 1480 Abort("Unimplemented: %s", "DoLoadNamedField"); | 1479 ASSERT(instr->representation().IsTagged()); |
| 1481 return NULL; | 1480 LOperand* obj = UseRegisterAtStart(instr->object()); |
| 1481 return DefineAsRegister(new LLoadNamedField(obj)); |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 | 1484 |
| 1485 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 1485 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 1486 Abort("Unimplemented: %s", "DoLoadNamedGeneric"); | 1486 Abort("Unimplemented: %s", "DoLoadNamedGeneric"); |
| 1487 return NULL; | 1487 return NULL; |
| 1488 } | 1488 } |
| 1489 | 1489 |
| 1490 | 1490 |
| 1491 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1491 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 | 1523 |
| 1524 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 1524 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 1525 Abort("Unimplemented: %s", "DoStoreKeyedGeneric"); | 1525 Abort("Unimplemented: %s", "DoStoreKeyedGeneric"); |
| 1526 return NULL; | 1526 return NULL; |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 | 1529 |
| 1530 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 1530 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
| 1531 Abort("Unimplemented: %s", "DoStoreNamedField"); | 1531 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| 1532 return NULL; | 1532 |
| 1533 LOperand* obj = needs_write_barrier |
| 1534 ? UseTempRegister(instr->object()) |
| 1535 : UseRegisterAtStart(instr->object()); |
| 1536 |
| 1537 LOperand* val = needs_write_barrier |
| 1538 ? UseTempRegister(instr->value()) |
| 1539 : UseRegister(instr->value()); |
| 1540 |
| 1541 // We only need a scratch register if we have a write barrier or we |
| 1542 // have a store into the properties array (not in-object-property). |
| 1543 LOperand* temp = (!instr->is_in_object() || needs_write_barrier) |
| 1544 ? TempRegister() : NULL; |
| 1545 |
| 1546 return new LStoreNamedField(obj, val, temp); |
| 1533 } | 1547 } |
| 1534 | 1548 |
| 1535 | 1549 |
| 1536 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 1550 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 1537 Abort("Unimplemented: %s", "DoStoreNamedGeneric"); | 1551 Abort("Unimplemented: %s", "DoStoreNamedGeneric"); |
| 1538 return NULL; | 1552 return NULL; |
| 1539 } | 1553 } |
| 1540 | 1554 |
| 1541 | 1555 |
| 1542 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { | 1556 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 return NULL; | 1673 return NULL; |
| 1660 } | 1674 } |
| 1661 | 1675 |
| 1662 | 1676 |
| 1663 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { | 1677 LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) { |
| 1664 return MarkAsCall(new LStackCheck, instr); | 1678 return MarkAsCall(new LStackCheck, instr); |
| 1665 } | 1679 } |
| 1666 | 1680 |
| 1667 | 1681 |
| 1668 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { | 1682 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { |
| 1669 Abort("Unimplemented: %s", "DoEnterInlined"); | 1683 HEnvironment* outer = current_block_->last_environment(); |
| 1684 HConstant* undefined = graph()->GetConstantUndefined(); |
| 1685 HEnvironment* inner = outer->CopyForInlining(instr->closure(), |
| 1686 instr->function(), |
| 1687 false, |
| 1688 undefined); |
| 1689 current_block_->UpdateEnvironment(inner); |
| 1690 chunk_->AddInlinedClosure(instr->closure()); |
| 1670 return NULL; | 1691 return NULL; |
| 1671 } | 1692 } |
| 1672 | 1693 |
| 1673 | 1694 |
| 1674 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1695 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1675 Abort("Unimplemented: %s", "DoLeaveInlined"); | 1696 Abort("Unimplemented: %s", "DoLeaveInlined"); |
| 1676 return NULL; | 1697 return NULL; |
| 1677 } | 1698 } |
| 1678 | 1699 |
| 1679 } } // namespace v8::internal | 1700 } } // namespace v8::internal |
| 1680 | 1701 |
| 1681 #endif // V8_TARGET_ARCH_X64 | 1702 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |