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 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 | 1942 |
1943 | 1943 |
1944 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 1944 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
1945 LOperand* value = UseRegisterAtStart(instr->value()); | 1945 LOperand* value = UseRegisterAtStart(instr->value()); |
1946 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value); | 1946 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value); |
1947 return AssignEnvironment(result); | 1947 return AssignEnvironment(result); |
1948 } | 1948 } |
1949 | 1949 |
1950 | 1950 |
1951 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 1951 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
1952 LUnallocated* temp = TempRegister(); | 1952 LUnallocated* temp = NULL; |
| 1953 if (!instr->CanOmitPrototypeChecks()) temp = TempRegister(); |
1953 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp); | 1954 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp); |
| 1955 if (instr->CanOmitPrototypeChecks()) return result; |
1954 return AssignEnvironment(result); | 1956 return AssignEnvironment(result); |
1955 } | 1957 } |
1956 | 1958 |
1957 | 1959 |
1958 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1960 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
1959 LOperand* value = UseRegisterAtStart(instr->value()); | 1961 LOperand* value = UseRegisterAtStart(instr->value()); |
1960 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 1962 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
1961 } | 1963 } |
1962 | 1964 |
1963 | 1965 |
1964 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 1966 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
1965 LOperand* value = UseRegisterAtStart(instr->value()); | 1967 LOperand* value = NULL; |
| 1968 if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value()); |
1966 LCheckMaps* result = new(zone()) LCheckMaps(value); | 1969 LCheckMaps* result = new(zone()) LCheckMaps(value); |
| 1970 if (instr->CanOmitMapChecks()) return result; |
1967 return AssignEnvironment(result); | 1971 return AssignEnvironment(result); |
1968 } | 1972 } |
1969 | 1973 |
1970 | 1974 |
1971 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { | 1975 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
1972 HValue* value = instr->value(); | 1976 HValue* value = instr->value(); |
1973 Representation input_rep = value->representation(); | 1977 Representation input_rep = value->representation(); |
1974 LOperand* reg = UseRegister(value); | 1978 LOperand* reg = UseRegister(value); |
1975 if (input_rep.IsDouble()) { | 1979 if (input_rep.IsDouble()) { |
1976 return DefineAsRegister(new(zone()) LClampDToUint8(reg)); | 1980 return DefineAsRegister(new(zone()) LClampDToUint8(reg)); |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2585 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2582 LOperand* object = UseRegister(instr->object()); | 2586 LOperand* object = UseRegister(instr->object()); |
2583 LOperand* index = UseTempRegister(instr->index()); | 2587 LOperand* index = UseTempRegister(instr->index()); |
2584 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2588 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2585 } | 2589 } |
2586 | 2590 |
2587 | 2591 |
2588 } } // namespace v8::internal | 2592 } } // namespace v8::internal |
2589 | 2593 |
2590 #endif // V8_TARGET_ARCH_X64 | 2594 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |