Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6308019: X64 Crankshaft: Added yet more operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-x64
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 __ movq(result, Operand(result, 0)); 1404 __ movq(result, Operand(result, 0));
1405 } 1405 }
1406 if (instr->hydrogen()->check_hole_value()) { 1406 if (instr->hydrogen()->check_hole_value()) {
1407 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 1407 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
1408 DeoptimizeIf(equal, instr->environment()); 1408 DeoptimizeIf(equal, instr->environment());
1409 } 1409 }
1410 } 1410 }
1411 1411
1412 1412
1413 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { 1413 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
1414 Abort("Unimplemented: %s", "DoStoreGlobal"); 1414 Register value = ToRegister(instr->InputAt(0));
Mads Ager (chromium) 2011/01/27 14:21:42 This has changed recently. You need to include a c
Lasse Reichstein 2011/01/28 10:50:11 Thanks for the heads-up. Will be added as part of
1415 if (value.is(rax)) {
1416 __ store_rax(instr->hydrogen()->cell().location(),
1417 RelocInfo::GLOBAL_PROPERTY_CELL);
1418 } else {
1419 __ movq(kScratchRegister,
1420 Handle<Object>::cast(instr->hydrogen()->cell()),
1421 RelocInfo::GLOBAL_PROPERTY_CELL);
1422 __ movq(Operand(kScratchRegister, 0), value);
1423 }
1415 } 1424 }
1416 1425
1417 1426
1418 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 1427 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
1419 Abort("Unimplemented: %s", "DoLoadContextSlot"); 1428 Abort("Unimplemented: %s", "DoLoadContextSlot");
1420 } 1429 }
1421 1430
1422 1431
1423 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 1432 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
1424 Abort("Unimplemented: %s", "DoLoadNamedField"); 1433 Register object = ToRegister(instr->InputAt(0));
1434 Register result = ToRegister(instr->result());
1435 if (instr->hydrogen()->is_in_object()) {
1436 __ movq(result, FieldOperand(object, instr->hydrogen()->offset()));
1437 } else {
1438 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset));
1439 __ movq(result, FieldOperand(result, instr->hydrogen()->offset()));
1440 }
1425 } 1441 }
1426 1442
1427 1443
1428 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 1444 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
1429 Abort("Unimplemented: %s", "DoLoadNamedGeneric"); 1445 Abort("Unimplemented: %s", "DoLoadNamedGeneric");
1430 } 1446 }
1431 1447
1432 1448
1433 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 1449 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
1434 Abort("Unimplemented: %s", "DoLoadFunctionPrototype"); 1450 Abort("Unimplemented: %s", "DoLoadFunctionPrototype");
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); 1622 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr);
1607 } 1623 }
1608 1624
1609 1625
1610 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 1626 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
1611 Abort("Unimplemented: %s", "DoCallRuntime"); 1627 Abort("Unimplemented: %s", "DoCallRuntime");
1612 } 1628 }
1613 1629
1614 1630
1615 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 1631 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
1616 Abort("Unimplemented: %s", "DoStoreNamedField"); 1632 Register object = ToRegister(instr->object());
1633 Register value = ToRegister(instr->value());
1634 int offset = instr->offset();
1635
1636 if (!instr->transition().is_null()) {
1637 __ Move(FieldOperand(object, HeapObject::kMapOffset), instr->transition());
1638 }
1639
1640 // Do the store.
1641 if (instr->is_in_object()) {
1642 __ movq(FieldOperand(object, offset), value);
1643 if (instr->needs_write_barrier()) {
1644 Register temp = ToRegister(instr->TempAt(0));
1645 // Update the write barrier for the object for in-object properties.
1646 __ RecordWrite(object, offset, value, temp);
1647 }
1648 } else {
1649 Register temp = ToRegister(instr->TempAt(0));
1650 __ movq(temp, FieldOperand(object, JSObject::kPropertiesOffset));
1651 __ movq(FieldOperand(temp, offset), value);
1652 if (instr->needs_write_barrier()) {
1653 // Update the write barrier for the properties array.
1654 // object is used as a scratch register.
1655 __ RecordWrite(temp, offset, value, object);
1656 }
1657 }
1617 } 1658 }
1618 1659
1619 1660
1620 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 1661 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
1621 Abort("Unimplemented: %s", "DoStoreNamedGeneric"); 1662 Abort("Unimplemented: %s", "DoStoreNamedGeneric");
1622 } 1663 }
1623 1664
1624 1665
1625 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 1666 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
1626 Abort("Unimplemented: %s", "DoBoundsCheck"); 1667 Abort("Unimplemented: %s", "DoBoundsCheck");
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 DeoptimizeIf(not_equal, instr->environment()); 1833 DeoptimizeIf(not_equal, instr->environment());
1793 } 1834 }
1794 1835
1795 1836
1796 void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) { 1837 void LCodeGen::LoadHeapObject(Register result, Handle<HeapObject> object) {
1797 Abort("Unimplemented: %s", "LoadHeapObject"); 1838 Abort("Unimplemented: %s", "LoadHeapObject");
1798 } 1839 }
1799 1840
1800 1841
1801 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 1842 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
1802 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); 1843 Register reg = ToRegister(instr->TempAt(0));
1844
1845 Handle<JSObject> holder = instr->holder();
1846 Handle<JSObject> current_prototype = instr->prototype();
1847
1848 // Load prototype object.
1849 LoadHeapObject(reg, current_prototype);
1850
1851 // Check prototype maps up to the holder.
1852 while (!current_prototype.is_identical_to(holder)) {
1853 __ Cmp(FieldOperand(reg, HeapObject::kMapOffset),
1854 Handle<Map>(current_prototype->map()));
1855 DeoptimizeIf(not_equal, instr->environment());
1856 current_prototype =
1857 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
1858 // Load next prototype object.
1859 LoadHeapObject(reg, current_prototype);
1860 }
1861
1862 // Check the holder map.
1863 __ Cmp(FieldOperand(reg, HeapObject::kMapOffset),
1864 Handle<Map>(current_prototype->map()));
1865 DeoptimizeIf(not_equal, instr->environment());
1803 } 1866 }
1804 1867
1805 1868
1806 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { 1869 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) {
1807 Abort("Unimplemented: %s", "DoArrayLiteral"); 1870 Abort("Unimplemented: %s", "DoArrayLiteral");
1808 } 1871 }
1809 1872
1810 1873
1811 void LCodeGen::DoObjectLiteral(LObjectLiteral* instr) { 1874 void LCodeGen::DoObjectLiteral(LObjectLiteral* instr) {
1812 Abort("Unimplemented: %s", "DoObjectLiteral"); 1875 Abort("Unimplemented: %s", "DoObjectLiteral");
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 2007
1945 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 2008 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
1946 Abort("Unimplemented: %s", "DoOsrEntry"); 2009 Abort("Unimplemented: %s", "DoOsrEntry");
1947 } 2010 }
1948 2011
1949 #undef __ 2012 #undef __
1950 2013
1951 } } // namespace v8::internal 2014 } } // namespace v8::internal
1952 2015
1953 #endif // V8_TARGET_ARCH_X64 2016 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698