OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1947 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, temp); | 1947 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, temp); |
1948 return AssignEnvironment(DefineFixed(result, eax)); | 1948 return AssignEnvironment(DefineFixed(result, eax)); |
1949 } | 1949 } |
1950 } | 1950 } |
1951 | 1951 |
1952 | 1952 |
1953 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1953 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
1954 LOperand* context = info()->IsStub() | 1954 LOperand* context = info()->IsStub() |
1955 ? UseFixed(instr->context(), esi) | 1955 ? UseFixed(instr->context(), esi) |
1956 : NULL; | 1956 : NULL; |
1957 return new(zone()) LReturn(UseFixed(instr->value(), eax), context); | 1957 LOperand* parameter_count = instr->has_constant_parameter_count() |
1958 ? NULL | |
1959 : UseRegister(instr->parameter_count()); | |
mvstanton
2013/03/07 13:30:13
Hi Danno, is UseRegister the best predicate?
danno
2013/03/07 15:11:14
As commented elsewhere, UseRegisterOrConstant, but
mvstanton
2013/03/07 16:48:49
Done.
| |
1960 return new(zone()) LReturn(UseFixed(instr->value(), eax), context, | |
1961 parameter_count); | |
1958 } | 1962 } |
1959 | 1963 |
1960 | 1964 |
1961 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1965 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
1962 Representation r = instr->representation(); | 1966 Representation r = instr->representation(); |
1963 if (r.IsInteger32()) { | 1967 if (r.IsInteger32()) { |
1964 return DefineAsRegister(new(zone()) LConstantI); | 1968 return DefineAsRegister(new(zone()) LConstantI); |
1965 } else if (r.IsDouble()) { | 1969 } else if (r.IsDouble()) { |
1966 double value = instr->DoubleValue(); | 1970 double value = instr->DoubleValue(); |
1967 LOperand* temp = (BitCast<uint64_t, double>(value) != 0) | 1971 LOperand* temp = (BitCast<uint64_t, double>(value) != 0) |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2594 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2598 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2595 LOperand* object = UseRegister(instr->object()); | 2599 LOperand* object = UseRegister(instr->object()); |
2596 LOperand* index = UseTempRegister(instr->index()); | 2600 LOperand* index = UseTempRegister(instr->index()); |
2597 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2601 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2598 } | 2602 } |
2599 | 2603 |
2600 | 2604 |
2601 } } // namespace v8::internal | 2605 } } // namespace v8::internal |
2602 | 2606 |
2603 #endif // V8_TARGET_ARCH_IA32 | 2607 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |