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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1949 | 1949 |
1950 | 1950 |
1951 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 1951 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
1952 LOperand* value = UseRegisterAtStart(instr->value()); | 1952 LOperand* value = UseRegisterAtStart(instr->value()); |
1953 LInstruction* result = new(zone()) LCheckInstanceType(value); | 1953 LInstruction* result = new(zone()) LCheckInstanceType(value); |
1954 return AssignEnvironment(result); | 1954 return AssignEnvironment(result); |
1955 } | 1955 } |
1956 | 1956 |
1957 | 1957 |
1958 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 1958 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
1959 LUnallocated* temp1 = TempRegister(); | 1959 LUnallocated* temp1 = NULL; |
1960 LOperand* temp2 = TempRegister(); | 1960 LOperand* temp2 = NULL; |
| 1961 if (!instr->CanOmitPrototypeChecks()) { |
| 1962 temp1 = TempRegister(); |
| 1963 temp2 = TempRegister(); |
| 1964 } |
1961 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2); | 1965 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2); |
| 1966 if (instr->CanOmitPrototypeChecks()) return result; |
1962 return AssignEnvironment(result); | 1967 return AssignEnvironment(result); |
1963 } | 1968 } |
1964 | 1969 |
1965 | 1970 |
1966 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1971 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
1967 LOperand* value = UseRegisterAtStart(instr->value()); | 1972 LOperand* value = UseRegisterAtStart(instr->value()); |
1968 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 1973 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
1969 } | 1974 } |
1970 | 1975 |
1971 | 1976 |
1972 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 1977 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
1973 LOperand* value = UseRegisterAtStart(instr->value()); | 1978 LOperand* value = NULL; |
| 1979 if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value()); |
1974 LInstruction* result = new(zone()) LCheckMaps(value); | 1980 LInstruction* result = new(zone()) LCheckMaps(value); |
| 1981 if (instr->CanOmitMapChecks()) return result; |
1975 return AssignEnvironment(result); | 1982 return AssignEnvironment(result); |
1976 } | 1983 } |
1977 | 1984 |
1978 | 1985 |
1979 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { | 1986 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
1980 HValue* value = instr->value(); | 1987 HValue* value = instr->value(); |
1981 Representation input_rep = value->representation(); | 1988 Representation input_rep = value->representation(); |
1982 LOperand* reg = UseRegister(value); | 1989 LOperand* reg = UseRegister(value); |
1983 if (input_rep.IsDouble()) { | 1990 if (input_rep.IsDouble()) { |
1984 // Revisit this decision, here and 8 lines below. | 1991 // Revisit this decision, here and 8 lines below. |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 | 2570 |
2564 | 2571 |
2565 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2572 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2566 LOperand* object = UseRegister(instr->object()); | 2573 LOperand* object = UseRegister(instr->object()); |
2567 LOperand* index = UseRegister(instr->index()); | 2574 LOperand* index = UseRegister(instr->index()); |
2568 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2575 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2569 } | 2576 } |
2570 | 2577 |
2571 | 2578 |
2572 } } // namespace v8::internal | 2579 } } // namespace v8::internal |
OLD | NEW |