| 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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 | 1022 |
| 1023 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { | 1023 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { |
| 1024 Abort("Unimplemented: %s", "DoApplyArguments"); | 1024 Abort("Unimplemented: %s", "DoApplyArguments"); |
| 1025 return NULL; | 1025 return NULL; |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 | 1028 |
| 1029 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { | 1029 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
| 1030 Abort("Unimplemented: %s", "DoPushArgument"); | 1030 ++argument_count_; |
| 1031 return NULL; | 1031 LOperand* argument = UseOrConstant(instr->argument()); |
| 1032 return new LPushArgument(argument); |
| 1032 } | 1033 } |
| 1033 | 1034 |
| 1034 | 1035 |
| 1035 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { | 1036 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { |
| 1036 return DefineAsRegister(new LGlobalObject); | 1037 return DefineAsRegister(new LGlobalObject); |
| 1037 } | 1038 } |
| 1038 | 1039 |
| 1039 | 1040 |
| 1040 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { | 1041 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { |
| 1041 Abort("Unimplemented: %s", "DoGlobalReceiver"); | 1042 Abort("Unimplemented: %s", "DoGlobalReceiver"); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 } | 1075 } |
| 1075 | 1076 |
| 1076 | 1077 |
| 1077 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { | 1078 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { |
| 1078 Abort("Unimplemented: %s", "DoCallKnownGlobal"); | 1079 Abort("Unimplemented: %s", "DoCallKnownGlobal"); |
| 1079 return NULL; | 1080 return NULL; |
| 1080 } | 1081 } |
| 1081 | 1082 |
| 1082 | 1083 |
| 1083 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { | 1084 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { |
| 1084 Abort("Unimplemented: %s", "DoCallNew"); | 1085 LOperand* constructor = UseFixed(instr->constructor(), rdi); |
| 1085 return NULL; | 1086 argument_count_ -= instr->argument_count(); |
| 1087 LCallNew* result = new LCallNew(constructor); |
| 1088 return MarkAsCall(DefineFixed(result, rax), instr); |
| 1086 } | 1089 } |
| 1087 | 1090 |
| 1088 | 1091 |
| 1089 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1092 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
| 1090 Abort("Unimplemented: %s", "DoCallFunction"); | 1093 Abort("Unimplemented: %s", "DoCallFunction"); |
| 1091 return NULL; | 1094 return NULL; |
| 1092 } | 1095 } |
| 1093 | 1096 |
| 1094 | 1097 |
| 1095 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1098 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 ASSERT(to.IsDouble()); | 1374 ASSERT(to.IsDouble()); |
| 1372 return DefineAsRegister(new LInteger32ToDouble(Use(instr->value()))); | 1375 return DefineAsRegister(new LInteger32ToDouble(Use(instr->value()))); |
| 1373 } | 1376 } |
| 1374 } | 1377 } |
| 1375 UNREACHABLE(); | 1378 UNREACHABLE(); |
| 1376 return NULL; | 1379 return NULL; |
| 1377 } | 1380 } |
| 1378 | 1381 |
| 1379 | 1382 |
| 1380 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { | 1383 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { |
| 1381 Abort("Unimplemented: %s", "DoCheckNonSmi"); | 1384 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1382 return NULL; | 1385 return AssignEnvironment(new LCheckSmi(value, zero)); |
| 1383 } | 1386 } |
| 1384 | 1387 |
| 1385 | 1388 |
| 1386 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 1389 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
| 1387 Abort("Unimplemented: %s", "DoCheckInstanceType"); | 1390 Abort("Unimplemented: %s", "DoCheckInstanceType"); |
| 1388 return NULL; | 1391 return NULL; |
| 1389 } | 1392 } |
| 1390 | 1393 |
| 1391 | 1394 |
| 1392 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 1395 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
| 1393 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); | 1396 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); |
| 1394 return NULL; | 1397 return NULL; |
| 1395 } | 1398 } |
| 1396 | 1399 |
| 1397 | 1400 |
| 1398 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 1401 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
| 1399 Abort("Unimplemented: %s", "DoCheckSmi"); | 1402 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1400 return NULL; | 1403 return AssignEnvironment(new LCheckSmi(value, not_zero)); |
| 1401 } | 1404 } |
| 1402 | 1405 |
| 1403 | 1406 |
| 1404 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1407 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
| 1405 Abort("Unimplemented: %s", "DoCheckFunction"); | 1408 Abort("Unimplemented: %s", "DoCheckFunction"); |
| 1406 return NULL; | 1409 return NULL; |
| 1407 } | 1410 } |
| 1408 | 1411 |
| 1409 | 1412 |
| 1410 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { | 1413 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { |
| 1411 Abort("Unimplemented: %s", "DoCheckMap"); | 1414 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1412 return NULL; | 1415 LCheckMap* result = new LCheckMap(value); |
| 1416 return AssignEnvironment(result); |
| 1413 } | 1417 } |
| 1414 | 1418 |
| 1415 | 1419 |
| 1416 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1420 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 1417 return new LReturn(UseFixed(instr->value(), rax)); | 1421 return new LReturn(UseFixed(instr->value(), rax)); |
| 1418 } | 1422 } |
| 1419 | 1423 |
| 1420 | 1424 |
| 1421 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1425 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 1422 Representation r = instr->representation(); | 1426 Representation r = instr->representation(); |
| 1423 if (r.IsInteger32()) { | 1427 if (r.IsInteger32()) { |
| 1424 int32_t value = instr->Integer32Value(); | 1428 int32_t value = instr->Integer32Value(); |
| 1425 return DefineAsRegister(new LConstantI(value)); | 1429 return DefineAsRegister(new LConstantI(value)); |
| 1426 } else if (r.IsDouble()) { | 1430 } else if (r.IsDouble()) { |
| 1427 double value = instr->DoubleValue(); | 1431 double value = instr->DoubleValue(); |
| 1428 LOperand* temp = TempRegister(); | 1432 LOperand* temp = TempRegister(); |
| 1429 return DefineAsRegister(new LConstantD(value, temp)); | 1433 return DefineAsRegister(new LConstantD(value, temp)); |
| 1430 } else if (r.IsTagged()) { | 1434 } else if (r.IsTagged()) { |
| 1431 return DefineAsRegister(new LConstantT(instr->handle())); | 1435 return DefineAsRegister(new LConstantT(instr->handle())); |
| 1432 } else { | 1436 } else { |
| 1433 UNREACHABLE(); | 1437 UNREACHABLE(); |
| 1434 return NULL; | 1438 return NULL; |
| 1435 } | 1439 } |
| 1436 } | 1440 } |
| 1437 | 1441 |
| 1438 | 1442 |
| 1439 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { | 1443 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
| 1440 Abort("Unimplemented: %s", "DoLoadGlobal"); | 1444 LLoadGlobal* result = new LLoadGlobal; |
| 1441 return NULL; | 1445 return instr->check_hole_value() |
| 1446 ? AssignEnvironment(DefineAsRegister(result)) |
| 1447 : DefineAsRegister(result); |
| 1442 } | 1448 } |
| 1443 | 1449 |
| 1444 | 1450 |
| 1445 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { | 1451 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
| 1446 Abort("Unimplemented: %s", "DoStoreGlobal"); | 1452 Abort("Unimplemented: %s", "DoStoreGlobal"); |
| 1447 return NULL; | 1453 return NULL; |
| 1448 } | 1454 } |
| 1449 | 1455 |
| 1450 | 1456 |
| 1451 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1457 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 | 1655 |
| 1650 | 1656 |
| 1651 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1657 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1652 Abort("Unimplemented: %s", "DoLeaveInlined"); | 1658 Abort("Unimplemented: %s", "DoLeaveInlined"); |
| 1653 return NULL; | 1659 return NULL; |
| 1654 } | 1660 } |
| 1655 | 1661 |
| 1656 } } // namespace v8::internal | 1662 } } // namespace v8::internal |
| 1657 | 1663 |
| 1658 #endif // V8_TARGET_ARCH_X64 | 1664 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |