Chromium Code Reviews

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

Issue 6347067: Fix potential overwriting of debug jumps of following code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-x64
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
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 1061 matching lines...)
1072 } 1072 }
1073 1073
1074 1074
1075 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { 1075 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
1076 Abort("Unimplemented: %s", "DoCallKeyed"); 1076 Abort("Unimplemented: %s", "DoCallKeyed");
1077 return NULL; 1077 return NULL;
1078 } 1078 }
1079 1079
1080 1080
1081 LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) { 1081 LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
1082 Abort("Unimplemented: %s", "DoCallNamed"); 1082 argument_count_ -= instr->argument_count();
1083 return NULL; 1083 return MarkAsCall(DefineFixed(new LCallNamed, rax), instr);
1084 } 1084 }
1085 1085
1086 1086
1087 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { 1087 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
1088 Abort("Unimplemented: %s", "DoCallGlobal"); 1088 Abort("Unimplemented: %s", "DoCallGlobal");
1089 return NULL; 1089 return NULL;
1090 } 1090 }
1091 1091
1092 1092
1093 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) { 1093 LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) {
1094 Abort("Unimplemented: %s", "DoCallKnownGlobal"); 1094 argument_count_ -= instr->argument_count();
1095 return NULL; 1095 return MarkAsCall(DefineFixed(new LCallKnownGlobal, rax), instr);
1096 } 1096 }
1097 1097
1098 1098
1099 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { 1099 LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
1100 LOperand* constructor = UseFixed(instr->constructor(), rdi); 1100 LOperand* constructor = UseFixed(instr->constructor(), rdi);
1101 argument_count_ -= instr->argument_count(); 1101 argument_count_ -= instr->argument_count();
1102 LCallNew* result = new LCallNew(constructor); 1102 LCallNew* result = new LCallNew(constructor);
1103 return MarkAsCall(DefineFixed(result, rax), instr); 1103 return MarkAsCall(DefineFixed(result, rax), instr);
1104 } 1104 }
1105 1105
(...skipping 192 matching lines...)
1298 } 1298 }
1299 1299
1300 1300
1301 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) { 1301 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) {
1302 Abort("Unimplemented: %s", "DoClassOfTest"); 1302 Abort("Unimplemented: %s", "DoClassOfTest");
1303 return NULL; 1303 return NULL;
1304 } 1304 }
1305 1305
1306 1306
1307 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { 1307 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1308 Abort("Unimplemented: %s", "DoJSArrayLength"); 1308 LOperand* array = UseRegisterAtStart(instr->value());
1309 return NULL; 1309 return DefineAsRegister(new LJSArrayLength(array));
1310 } 1310 }
1311 1311
1312 1312
1313 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1313 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1314 Abort("Unimplemented: %s", "DoFixedArrayLength"); 1314 Abort("Unimplemented: %s", "DoFixedArrayLength");
1315 return NULL; 1315 return NULL;
1316 } 1316 }
1317 1317
1318 1318
1319 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1319 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
(...skipping 75 matching lines...)
1395 } 1395 }
1396 1396
1397 1397
1398 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) { 1398 LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) {
1399 LOperand* value = UseRegisterAtStart(instr->value()); 1399 LOperand* value = UseRegisterAtStart(instr->value());
1400 return AssignEnvironment(new LCheckSmi(value, zero)); 1400 return AssignEnvironment(new LCheckSmi(value, zero));
1401 } 1401 }
1402 1402
1403 1403
1404 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { 1404 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
1405 Abort("Unimplemented: %s", "DoCheckInstanceType"); 1405 LOperand* value = UseRegisterAtStart(instr->value());
1406 return NULL; 1406 LCheckInstanceType* result = new LCheckInstanceType(value);
1407 return AssignEnvironment(result);
1407 } 1408 }
1408 1409
1409 1410
1410 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { 1411 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
1411 LOperand* temp = TempRegister(); 1412 LOperand* temp = TempRegister();
1412 LCheckPrototypeMaps* result = new LCheckPrototypeMaps(temp); 1413 LCheckPrototypeMaps* result = new LCheckPrototypeMaps(temp);
1413 return AssignEnvironment(result); 1414 return AssignEnvironment(result);
1414 } 1415 }
1415 1416
1416 1417
(...skipping 41 matching lines...)
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 return new LStoreGlobal(UseRegisterAtStart(instr->value()));} 1469 LStoreGlobal* result = new LStoreGlobal(UseRegister(instr->value()),
1470 TempRegister());
1471 return instr->check_hole_value() ? AssignEnvironment(result) : result;
1472 }
1469 1473
1470 1474
1471 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { 1475 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
1472 Abort("Unimplemented: %s", "DoLoadContextSlot"); 1476 Abort("Unimplemented: %s", "DoLoadContextSlot");
1473 return NULL; 1477 return NULL;
1474 } 1478 }
1475 1479
1476 1480
1477 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { 1481 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
1478 ASSERT(instr->representation().IsTagged()); 1482 ASSERT(instr->representation().IsTagged());
(...skipping 213 matching lines...)
1692 1696
1693 1697
1694 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1698 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1695 Abort("Unimplemented: %s", "DoLeaveInlined"); 1699 Abort("Unimplemented: %s", "DoLeaveInlined");
1696 return NULL; 1700 return NULL;
1697 } 1701 }
1698 1702
1699 } } // namespace v8::internal 1703 } } // namespace v8::internal
1700 1704
1701 #endif // V8_TARGET_ARCH_X64 1705 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine