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 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2030 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { | 2030 LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
2031 LOperand* value = UseRegister(instr->value()); | 2031 LOperand* value = UseRegister(instr->value()); |
2032 // Use a temp to check the value in the cell in the case where we perform | 2032 // Use a temp to check the value in the cell in the case where we perform |
2033 // a hole check. | 2033 // a hole check. |
2034 return instr->RequiresHoleCheck() | 2034 return instr->RequiresHoleCheck() |
2035 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) | 2035 ? AssignEnvironment(new(zone()) LStoreGlobalCell(value, TempRegister())) |
2036 : new(zone()) LStoreGlobalCell(value, NULL); | 2036 : new(zone()) LStoreGlobalCell(value, NULL); |
2037 } | 2037 } |
2038 | 2038 |
2039 | 2039 |
2040 LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { | |
2041 LOperand* context = UseFixed(instr->context(), cp); | |
2042 LOperand* global_object = UseFixed(instr->global_object(), r1); | |
2043 LOperand* value = UseFixed(instr->value(), r0); | |
2044 LStoreGlobalGeneric* result = | |
2045 new(zone()) LStoreGlobalGeneric(context, global_object, value); | |
2046 return MarkAsCall(result, instr); | |
2047 } | |
2048 | |
2049 | |
2050 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 2040 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
2051 LOperand* context = UseRegisterAtStart(instr->value()); | 2041 LOperand* context = UseRegisterAtStart(instr->value()); |
2052 LInstruction* result = | 2042 LInstruction* result = |
2053 DefineAsRegister(new(zone()) LLoadContextSlot(context)); | 2043 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
2054 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; | 2044 return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
2055 } | 2045 } |
2056 | 2046 |
2057 | 2047 |
2058 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 2048 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
2059 LOperand* context; | 2049 LOperand* context; |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2543 } | 2533 } |
2544 | 2534 |
2545 | 2535 |
2546 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2536 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2547 LOperand* object = UseRegister(instr->object()); | 2537 LOperand* object = UseRegister(instr->object()); |
2548 LOperand* index = UseRegister(instr->index()); | 2538 LOperand* index = UseRegister(instr->index()); |
2549 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2539 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2550 } | 2540 } |
2551 | 2541 |
2552 } } // namespace v8::internal | 2542 } } // namespace v8::internal |
OLD | NEW |