| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 // stack arguments, and any real arguments object use causes a bailout. | 969 // stack arguments, and any real arguments object use causes a bailout. |
| 970 // So this value is never used. | 970 // So this value is never used. |
| 971 return NULL; | 971 return NULL; |
| 972 } | 972 } |
| 973 | 973 |
| 974 | 974 |
| 975 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { | 975 LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) { |
| 976 if (instr->representation().IsSmiOrInteger32()) { | 976 if (instr->representation().IsSmiOrInteger32()) { |
| 977 ASSERT(instr->left()->representation().Equals(instr->representation())); | 977 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 978 ASSERT(instr->right()->representation().Equals(instr->representation())); | 978 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 979 ASSERT(instr->CheckFlag(HValue::kTruncatingToInt32)); |
| 979 | 980 |
| 980 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 981 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 981 LOperand* right = | 982 LOperand* right = |
| 982 UseRegisterOrConstantAtStart(instr->BetterRightOperand()); | 983 UseRegisterOrConstantAtStart(instr->BetterRightOperand()); |
| 983 return instr->representation().IsSmi() ? | 984 return instr->representation().IsSmi() ? |
| 984 DefineAsRegister(new(zone()) LBitS(left, right)) : | 985 DefineAsRegister(new(zone()) LBitS(left, right)) : |
| 985 DefineAsRegister(new(zone()) LBitI(left, right)); | 986 DefineAsRegister(new(zone()) LBitI(left, right)); |
| 986 } else { | 987 } else { |
| 987 return DoArithmeticT(instr->op(), instr); | 988 return DoArithmeticT(instr->op(), instr); |
| 988 } | 989 } |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 // it will be loaded multiple times. Unfortunatly crankshaft already | 1341 // it will be loaded multiple times. Unfortunatly crankshaft already |
| 1341 // duplicates constant loads, but we should modify the code below once this | 1342 // duplicates constant loads, but we should modify the code below once this |
| 1342 // issue has been addressed in crankshaft. | 1343 // issue has been addressed in crankshaft. |
| 1343 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); | 1344 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
| 1344 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); | 1345 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
| 1345 return new(zone()) LCompareNumericAndBranch(left, right); | 1346 return new(zone()) LCompareNumericAndBranch(left, right); |
| 1346 } | 1347 } |
| 1347 } | 1348 } |
| 1348 | 1349 |
| 1349 | 1350 |
| 1351 // TODO(all): This will disappear when Math.random is rewritten in JavaScript. |
| 1350 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { | 1352 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) { |
| 1351 ASSERT(instr->representation().IsDouble()); | 1353 ASSERT(instr->representation().IsDouble()); |
| 1352 ASSERT(instr->global_object()->representation().IsTagged()); | 1354 ASSERT(instr->global_object()->representation().IsTagged()); |
| 1353 LOperand* global_object = UseFixed(instr->global_object(), x0); | 1355 LOperand* global_object = UseFixed(instr->global_object(), x0); |
| 1354 LRandom* result = new(zone()) LRandom(global_object); | 1356 LRandom* result = new(zone()) LRandom(global_object); |
| 1355 return MarkAsCall(DefineFixedDouble(result, d7), instr); | 1357 return MarkAsCall(DefineFixedDouble(result, d7), instr); |
| 1356 } | 1358 } |
| 1357 | 1359 |
| 1358 | 1360 |
| 1359 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1361 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2538 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
| 2537 LOperand* receiver = UseRegister(instr->receiver()); | 2539 LOperand* receiver = UseRegister(instr->receiver()); |
| 2538 LOperand* function = UseRegisterAtStart(instr->function()); | 2540 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2539 LOperand* temp = TempRegister(); | 2541 LOperand* temp = TempRegister(); |
| 2540 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); | 2542 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); |
| 2541 return AssignEnvironment(DefineAsRegister(result)); | 2543 return AssignEnvironment(DefineAsRegister(result)); |
| 2542 } | 2544 } |
| 2543 | 2545 |
| 2544 | 2546 |
| 2545 } } // namespace v8::internal | 2547 } } // namespace v8::internal |
| OLD | NEW |