| 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 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 | 2338 |
| 2339 return new(zone()) LTypeofIsAndBranch( | 2339 return new(zone()) LTypeofIsAndBranch( |
| 2340 UseRegister(instr->value()), temp1, temp2); | 2340 UseRegister(instr->value()), temp1, temp2); |
| 2341 } | 2341 } |
| 2342 | 2342 |
| 2343 | 2343 |
| 2344 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 2344 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
| 2345 switch (instr->op()) { | 2345 switch (instr->op()) { |
| 2346 case kMathAbs: { | 2346 case kMathAbs: { |
| 2347 Representation r = instr->representation(); | 2347 Representation r = instr->representation(); |
| 2348 if (r.IsTagged()) { | 2348 if (r.IsTagged() || r.IsSmi()) { |
| 2349 // The tagged case might need to allocate a HeapNumber for the result, | 2349 // The tagged case might need to allocate a HeapNumber for the result, |
| 2350 // so it is handled by a separate LInstruction. | 2350 // so it is handled by a separate LInstruction. |
| 2351 LOperand* input = UseRegister(instr->value()); | 2351 LOperand* input = UseRegister(instr->value()); |
| 2352 LOperand* temp1 = TempRegister(); | 2352 LOperand* temp1 = TempRegister(); |
| 2353 LOperand* temp2 = TempRegister(); | 2353 LOperand* temp2 = TempRegister(); |
| 2354 LOperand* temp3 = TempRegister(); | 2354 LOperand* temp3 = TempRegister(); |
| 2355 LMathAbsTagged* result = | 2355 LMathAbsTagged* result = |
| 2356 new(zone()) LMathAbsTagged(input, temp1, temp2, temp3); | 2356 new(zone()) LMathAbsTagged(input, temp1, temp2, temp3); |
| 2357 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 2357 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 2358 } else { | 2358 } else { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2504 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2504 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
| 2505 LOperand* receiver = UseRegister(instr->receiver()); | 2505 LOperand* receiver = UseRegister(instr->receiver()); |
| 2506 LOperand* function = UseRegisterAtStart(instr->function()); | 2506 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2507 LOperand* temp = TempRegister(); | 2507 LOperand* temp = TempRegister(); |
| 2508 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); | 2508 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); |
| 2509 return AssignEnvironment(DefineAsRegister(result)); | 2509 return AssignEnvironment(DefineAsRegister(result)); |
| 2510 } | 2510 } |
| 2511 | 2511 |
| 2512 | 2512 |
| 2513 } } // namespace v8::internal | 2513 } } // namespace v8::internal |
| OLD | NEW |