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 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2009 } | 2009 } |
2010 | 2010 |
2011 | 2011 |
2012 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 2012 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
2013 LOperand* value = UseRegisterAtStart(instr->value()); | 2013 LOperand* value = UseRegisterAtStart(instr->value()); |
2014 LInstruction* result = new(zone()) LCheckInstanceType(value); | 2014 LInstruction* result = new(zone()) LCheckInstanceType(value); |
2015 return AssignEnvironment(result); | 2015 return AssignEnvironment(result); |
2016 } | 2016 } |
2017 | 2017 |
2018 | 2018 |
2019 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | |
2020 LUnallocated* temp1 = NULL; | |
2021 LOperand* temp2 = NULL; | |
2022 if (!instr->CanOmitPrototypeChecks()) { | |
2023 temp1 = TempRegister(); | |
2024 temp2 = TempRegister(); | |
2025 } | |
2026 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2); | |
2027 if (instr->CanOmitPrototypeChecks()) return result; | |
2028 return AssignEnvironment(result); | |
2029 } | |
2030 | |
2031 | |
2032 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 2019 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
2033 LOperand* value = UseRegisterAtStart(instr->value()); | 2020 LOperand* value = UseRegisterAtStart(instr->value()); |
2034 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 2021 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
2035 } | 2022 } |
2036 | 2023 |
2037 | 2024 |
2038 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 2025 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
2039 LOperand* value = NULL; | 2026 LOperand* value = NULL; |
2040 if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value()); | 2027 if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value()); |
2041 LInstruction* result = new(zone()) LCheckMaps(value); | 2028 LInstruction* result = new(zone()) LCheckMaps(value); |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2614 | 2601 |
2615 | 2602 |
2616 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2603 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2617 LOperand* object = UseRegister(instr->object()); | 2604 LOperand* object = UseRegister(instr->object()); |
2618 LOperand* index = UseRegister(instr->index()); | 2605 LOperand* index = UseRegister(instr->index()); |
2619 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2606 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2620 } | 2607 } |
2621 | 2608 |
2622 | 2609 |
2623 } } // namespace v8::internal | 2610 } } // namespace v8::internal |
OLD | NEW |