| 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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 | 1079 |
| 1080 LInstruction* LChunkBuilder::DoCallConstantFunction( | 1080 LInstruction* LChunkBuilder::DoCallConstantFunction( |
| 1081 HCallConstantFunction* instr) { | 1081 HCallConstantFunction* instr) { |
| 1082 return MarkAsCall(DefineFixed(new(zone()) LCallConstantFunction, x0), instr); | 1082 return MarkAsCall(DefineFixed(new(zone()) LCallConstantFunction, x0), instr); |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 | 1085 |
| 1086 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { | 1086 LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { |
| 1087 LOperand* function = UseFixed(instr->function(), x1); | 1087 LOperand* function = UseFixed(instr->function(), x1); |
| 1088 LInstruction* result = DefineFixed(new(zone()) LCallFunction(function), x0); | 1088 LInstruction* result = DefineFixed(new(zone()) LCallFunction(function), x0); |
| 1089 // TODO(all): Uncomment the following line during the rebase. | 1089 if (instr->IsTailCall()) return result; |
| 1090 // if (instr->IsTailCall()) return result; | |
| 1091 return MarkAsCall(result, instr); | 1090 return MarkAsCall(result, instr); |
| 1092 } | 1091 } |
| 1093 | 1092 |
| 1094 | 1093 |
| 1095 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { | 1094 LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) { |
| 1096 return MarkAsCall(DefineFixed(new(zone()) LCallGlobal, x0), instr); | 1095 return MarkAsCall(DefineFixed(new(zone()) LCallGlobal, x0), instr); |
| 1097 } | 1096 } |
| 1098 | 1097 |
| 1099 | 1098 |
| 1100 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { | 1099 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1615 return MarkAsCall(DefineFixed(result, x0), instr, CANNOT_DEOPTIMIZE_EAGERLY); | 1614 return MarkAsCall(DefineFixed(result, x0), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
| 1616 } | 1615 } |
| 1617 | 1616 |
| 1618 | 1617 |
| 1619 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( | 1618 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch( |
| 1620 HIsConstructCallAndBranch* instr) { | 1619 HIsConstructCallAndBranch* instr) { |
| 1621 return new(zone()) LIsConstructCallAndBranch(TempRegister(), TempRegister()); | 1620 return new(zone()) LIsConstructCallAndBranch(TempRegister(), TempRegister()); |
| 1622 } | 1621 } |
| 1623 | 1622 |
| 1624 | 1623 |
| 1624 LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( |
| 1625 HCompareMinusZeroAndBranch* instr) { |
| 1626 Abort(kUnimplemented); |
| 1627 return NULL; |
| 1628 } |
| 1629 |
| 1630 |
| 1625 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | 1631 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
| 1626 ASSERT(instr->value()->representation().IsTagged()); | 1632 ASSERT(instr->value()->representation().IsTagged()); |
| 1627 LOperand* value = UseRegisterAtStart(instr->value()); | 1633 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1628 LOperand* temp1 = TempRegister(); | 1634 LOperand* temp1 = TempRegister(); |
| 1629 LOperand* temp2 = TempRegister(); | 1635 LOperand* temp2 = TempRegister(); |
| 1630 return new(zone()) LIsObjectAndBranch(value, temp1, temp2); | 1636 return new(zone()) LIsObjectAndBranch(value, temp1, temp2); |
| 1631 } | 1637 } |
| 1632 | 1638 |
| 1633 | 1639 |
| 1634 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { | 1640 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1949 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 1955 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 1950 LParameter* result = new(zone()) LParameter; | 1956 LParameter* result = new(zone()) LParameter; |
| 1951 if (instr->kind() == HParameter::STACK_PARAMETER) { | 1957 if (instr->kind() == HParameter::STACK_PARAMETER) { |
| 1952 int spill_index = chunk_->GetParameterStackSlot(instr->index()); | 1958 int spill_index = chunk_->GetParameterStackSlot(instr->index()); |
| 1953 return DefineAsSpilled(result, spill_index); | 1959 return DefineAsSpilled(result, spill_index); |
| 1954 } else { | 1960 } else { |
| 1955 ASSERT(info()->IsStub()); | 1961 ASSERT(info()->IsStub()); |
| 1956 CodeStubInterfaceDescriptor* descriptor = | 1962 CodeStubInterfaceDescriptor* descriptor = |
| 1957 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); | 1963 info()->code_stub()->GetInterfaceDescriptor(info()->isolate()); |
| 1958 int index = static_cast<int>(instr->index()); | 1964 int index = static_cast<int>(instr->index()); |
| 1959 Register reg = DESCRIPTOR_GET_PARAMETER_REGISTER(descriptor, index); | 1965 Register reg = descriptor->GetParameterRegister(index); |
| 1960 return DefineFixed(result, reg); | 1966 return DefineFixed(result, reg); |
| 1961 } | 1967 } |
| 1962 } | 1968 } |
| 1963 | 1969 |
| 1964 | 1970 |
| 1965 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1971 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
| 1966 ASSERT(instr->representation().IsDouble()); | 1972 ASSERT(instr->representation().IsDouble()); |
| 1967 // We call a C function for double power. It can't trigger a GC. | 1973 // We call a C function for double power. It can't trigger a GC. |
| 1968 // We need to use fixed result register for the call. | 1974 // We need to use fixed result register for the call. |
| 1969 Representation exponent_type = instr->right()->representation(); | 1975 Representation exponent_type = instr->right()->representation(); |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { | 2574 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) { |
| 2569 LOperand* receiver = UseRegister(instr->receiver()); | 2575 LOperand* receiver = UseRegister(instr->receiver()); |
| 2570 LOperand* function = UseRegisterAtStart(instr->function()); | 2576 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2571 LOperand* temp = TempRegister(); | 2577 LOperand* temp = TempRegister(); |
| 2572 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); | 2578 LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp); |
| 2573 return AssignEnvironment(DefineAsRegister(result)); | 2579 return AssignEnvironment(DefineAsRegister(result)); |
| 2574 } | 2580 } |
| 2575 | 2581 |
| 2576 | 2582 |
| 2577 } } // namespace v8::internal | 2583 } } // namespace v8::internal |
| OLD | NEW |