| 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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 } | 1036 } |
| 1037 | 1037 |
| 1038 | 1038 |
| 1039 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { | 1039 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { |
| 1040 Abort("Unimplemented: %s", "DoApplyArguments"); | 1040 Abort("Unimplemented: %s", "DoApplyArguments"); |
| 1041 return NULL; | 1041 return NULL; |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 | 1044 |
| 1045 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { | 1045 LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) { |
| 1046 Abort("Unimplemented: %s", "DoPushArgument"); | 1046 ++argument_count_; |
| 1047 return NULL; | 1047 LOperand* argument = UseOrConstant(instr->argument()); |
| 1048 return new LPushArgument(argument); |
| 1048 } | 1049 } |
| 1049 | 1050 |
| 1050 | 1051 |
| 1051 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { | 1052 LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) { |
| 1052 return DefineAsRegister(new LGlobalObject); | 1053 return DefineAsRegister(new LGlobalObject); |
| 1053 } | 1054 } |
| 1054 | 1055 |
| 1055 | 1056 |
| 1056 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { | 1057 LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) { |
| 1057 Abort("Unimplemented: %s", "DoGlobalReceiver"); | 1058 Abort("Unimplemented: %s", "DoGlobalReceiver"); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 } | 1091 } |
| 1091 | 1092 |
| 1092 | 1093 |
| 1093 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { | 1094 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { |
| 1094 Abort("Unimplemented: %s", "DoCallKnownGlobal"); | 1095 Abort("Unimplemented: %s", "DoCallKnownGlobal"); |
| 1095 return NULL; | 1096 return NULL; |
| 1096 } | 1097 } |
| 1097 | 1098 |
| 1098 | 1099 |
| 1099 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { | 1100 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { |
| 1100 Abort("Unimplemented: %s", "DoCallNew"); | 1101 LOperand* constructor = UseFixed(instr->constructor(), rdi); |
| 1101 return NULL; | 1102 argument_count_ -= instr->argument_count(); |
| 1103 LCallNew* result = new LCallNew(constructor); |
| 1104 return MarkAsCall(DefineFixed(result, rax), instr); |
| 1102 } | 1105 } |
| 1103 | 1106 |
| 1104 | 1107 |
| 1105 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1108 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
| 1106 Abort("Unimplemented: %s", "DoCallFunction"); | 1109 Abort("Unimplemented: %s", "DoCallFunction"); |
| 1107 return NULL; | 1110 return NULL; |
| 1108 } | 1111 } |
| 1109 | 1112 |
| 1110 | 1113 |
| 1111 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { | 1114 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 ASSERT(to.IsDouble()); | 1390 ASSERT(to.IsDouble()); |
| 1388 return DefineAsRegister(new LInteger32ToDouble(Use(instr->value()))); | 1391 return DefineAsRegister(new LInteger32ToDouble(Use(instr->value()))); |
| 1389 } | 1392 } |
| 1390 } | 1393 } |
| 1391 UNREACHABLE(); | 1394 UNREACHABLE(); |
| 1392 return NULL; | 1395 return NULL; |
| 1393 } | 1396 } |
| 1394 | 1397 |
| 1395 | 1398 |
| 1396 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { | 1399 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { |
| 1397 Abort("Unimplemented: %s", "DoCheckNonSmi"); | 1400 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1398 return NULL; | 1401 return AssignEnvironment(new LCheckSmi(value, zero)); |
| 1399 } | 1402 } |
| 1400 | 1403 |
| 1401 | 1404 |
| 1402 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 1405 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
| 1403 Abort("Unimplemented: %s", "DoCheckInstanceType"); | 1406 Abort("Unimplemented: %s", "DoCheckInstanceType"); |
| 1404 return NULL; | 1407 return NULL; |
| 1405 } | 1408 } |
| 1406 | 1409 |
| 1407 | 1410 |
| 1408 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 1411 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
| 1409 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); | 1412 Abort("Unimplemented: %s", "DoCheckPrototypeMaps"); |
| 1410 return NULL; | 1413 return NULL; |
| 1411 } | 1414 } |
| 1412 | 1415 |
| 1413 | 1416 |
| 1414 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 1417 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
| 1415 Abort("Unimplemented: %s", "DoCheckSmi"); | 1418 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1416 return NULL; | 1419 return AssignEnvironment(new LCheckSmi(value, not_zero)); |
| 1417 } | 1420 } |
| 1418 | 1421 |
| 1419 | 1422 |
| 1420 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1423 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
| 1421 Abort("Unimplemented: %s", "DoCheckFunction"); | 1424 Abort("Unimplemented: %s", "DoCheckFunction"); |
| 1422 return NULL; | 1425 return NULL; |
| 1423 } | 1426 } |
| 1424 | 1427 |
| 1425 | 1428 |
| 1426 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { | 1429 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { |
| 1427 Abort("Unimplemented: %s", "DoCheckMap"); | 1430 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1428 return NULL; | 1431 LCheckMap* result = new LCheckMap(value); |
| 1432 return AssignEnvironment(result); |
| 1429 } | 1433 } |
| 1430 | 1434 |
| 1431 | 1435 |
| 1432 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1436 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 1433 return new LReturn(UseFixed(instr->value(), rax)); | 1437 return new LReturn(UseFixed(instr->value(), rax)); |
| 1434 } | 1438 } |
| 1435 | 1439 |
| 1436 | 1440 |
| 1437 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1441 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 1438 Representation r = instr->representation(); | 1442 Representation r = instr->representation(); |
| 1439 if (r.IsInteger32()) { | 1443 if (r.IsInteger32()) { |
| 1440 int32_t value = instr->Integer32Value(); | 1444 int32_t value = instr->Integer32Value(); |
| 1441 return DefineAsRegister(new LConstantI(value)); | 1445 return DefineAsRegister(new LConstantI(value)); |
| 1442 } else if (r.IsDouble()) { | 1446 } else if (r.IsDouble()) { |
| 1443 double value = instr->DoubleValue(); | 1447 double value = instr->DoubleValue(); |
| 1444 LOperand* temp = TempRegister(); | 1448 LOperand* temp = TempRegister(); |
| 1445 return DefineAsRegister(new LConstantD(value, temp)); | 1449 return DefineAsRegister(new LConstantD(value, temp)); |
| 1446 } else if (r.IsTagged()) { | 1450 } else if (r.IsTagged()) { |
| 1447 return DefineAsRegister(new LConstantT(instr->handle())); | 1451 return DefineAsRegister(new LConstantT(instr->handle())); |
| 1448 } else { | 1452 } else { |
| 1449 UNREACHABLE(); | 1453 UNREACHABLE(); |
| 1450 return NULL; | 1454 return NULL; |
| 1451 } | 1455 } |
| 1452 } | 1456 } |
| 1453 | 1457 |
| 1454 | 1458 |
| 1455 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { | 1459 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
| 1456 Abort("Unimplemented: %s", "DoLoadGlobal"); | 1460 LLoadGlobal* result = new LLoadGlobal; |
| 1457 return NULL; | 1461 return instr->check_hole_value() |
| 1462 ? AssignEnvironment(DefineAsRegister(result)) |
| 1463 : DefineAsRegister(result); |
| 1458 } | 1464 } |
| 1459 | 1465 |
| 1460 | 1466 |
| 1461 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { | 1467 LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
| 1462 Abort("Unimplemented: %s", "DoStoreGlobal"); | 1468 Abort("Unimplemented: %s", "DoStoreGlobal"); |
| 1463 return NULL; | 1469 return NULL; |
| 1464 } | 1470 } |
| 1465 | 1471 |
| 1466 | 1472 |
| 1467 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1473 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 | 1672 |
| 1667 | 1673 |
| 1668 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1674 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1669 Abort("Unimplemented: %s", "DoLeaveInlined"); | 1675 Abort("Unimplemented: %s", "DoLeaveInlined"); |
| 1670 return NULL; | 1676 return NULL; |
| 1671 } | 1677 } |
| 1672 | 1678 |
| 1673 } } // namespace v8::internal | 1679 } } // namespace v8::internal |
| 1674 | 1680 |
| 1675 #endif // V8_TARGET_ARCH_X64 | 1681 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |