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 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2041 (instr->representation().IsDouble() && | 2041 (instr->representation().IsDouble() && |
2042 IsDoubleOrFloatElementsKind(instr->elements_kind()))); | 2042 IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
2043 LOperand* backing_store = UseRegister(instr->elements()); | 2043 LOperand* backing_store = UseRegister(instr->elements()); |
2044 result = new(zone()) LLoadKeyed(backing_store, key); | 2044 result = new(zone()) LLoadKeyed(backing_store, key); |
2045 } | 2045 } |
2046 | 2046 |
2047 DefineAsRegister(result); | 2047 DefineAsRegister(result); |
2048 // An unsigned int array load might overflow and cause a deopt, make sure it | 2048 // An unsigned int array load might overflow and cause a deopt, make sure it |
2049 // has an environment. | 2049 // has an environment. |
2050 bool can_deoptimize = instr->RequiresHoleCheck() || | 2050 bool can_deoptimize = instr->RequiresHoleCheck() || |
2051 elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS || | 2051 elements_kind == EXTERNAL_UINT32_ELEMENTS || |
2052 elements_kind == UINT32_ELEMENTS; | 2052 elements_kind == UINT32_ELEMENTS; |
2053 return can_deoptimize ? AssignEnvironment(result) : result; | 2053 return can_deoptimize ? AssignEnvironment(result) : result; |
2054 } | 2054 } |
2055 | 2055 |
2056 | 2056 |
2057 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { | 2057 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
2058 LOperand* context = UseFixed(instr->context(), cp); | 2058 LOperand* context = UseFixed(instr->context(), cp); |
2059 LOperand* object = UseFixed(instr->object(), a1); | 2059 LOperand* object = UseFixed(instr->object(), a1); |
2060 LOperand* key = UseFixed(instr->key(), a0); | 2060 LOperand* key = UseFixed(instr->key(), a0); |
2061 | 2061 |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2455 | 2455 |
2456 | 2456 |
2457 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2457 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2458 LOperand* object = UseRegister(instr->object()); | 2458 LOperand* object = UseRegister(instr->object()); |
2459 LOperand* index = UseRegister(instr->index()); | 2459 LOperand* index = UseRegister(instr->index()); |
2460 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2460 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2461 } | 2461 } |
2462 | 2462 |
2463 | 2463 |
2464 } } // namespace v8::internal | 2464 } } // namespace v8::internal |
OLD | NEW |