| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2319 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); | 2319 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); |
| 2320 __ ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize)); | 2320 __ ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize)); |
| 2321 | 2321 |
| 2322 // Check for the hole value. | 2322 // Check for the hole value. |
| 2323 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 2323 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| 2324 __ cmp(result, scratch); | 2324 __ cmp(result, scratch); |
| 2325 DeoptimizeIf(eq, instr->environment()); | 2325 DeoptimizeIf(eq, instr->environment()); |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 | 2328 |
| 2329 void LCodeGen::DoLoadPixelArrayElement(LLoadPixelArrayElement* instr) { | 2329 void LCodeGen::DoLoadKeyedSpecializedArrayElement( |
| 2330 LLoadKeyedSpecializedArrayElement* instr) { |
| 2331 ASSERT(instr->array_type() == kExternalPixelArray); |
| 2332 |
| 2330 Register external_pointer = ToRegister(instr->external_pointer()); | 2333 Register external_pointer = ToRegister(instr->external_pointer()); |
| 2331 Register key = ToRegister(instr->key()); | 2334 Register key = ToRegister(instr->key()); |
| 2332 Register result = ToRegister(instr->result()); | 2335 Register result = ToRegister(instr->result()); |
| 2333 | 2336 |
| 2334 // Load the result. | 2337 // Load the result. |
| 2335 __ ldrb(result, MemOperand(external_pointer, key)); | 2338 __ ldrb(result, MemOperand(external_pointer, key)); |
| 2336 } | 2339 } |
| 2337 | 2340 |
| 2338 | 2341 |
| 2339 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 2342 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2987 } | 2990 } |
| 2988 | 2991 |
| 2989 if (instr->hydrogen()->NeedsWriteBarrier()) { | 2992 if (instr->hydrogen()->NeedsWriteBarrier()) { |
| 2990 // Compute address of modified element and store it into key register. | 2993 // Compute address of modified element and store it into key register. |
| 2991 __ add(key, scratch, Operand(FixedArray::kHeaderSize)); | 2994 __ add(key, scratch, Operand(FixedArray::kHeaderSize)); |
| 2992 __ RecordWrite(elements, key, value); | 2995 __ RecordWrite(elements, key, value); |
| 2993 } | 2996 } |
| 2994 } | 2997 } |
| 2995 | 2998 |
| 2996 | 2999 |
| 2997 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) { | 3000 void LCodeGen::DoStoreKeyedSpecializedArrayElement( |
| 3001 LStoreKeyedSpecializedArrayElement* instr) { |
| 3002 ASSERT(instr->array_type() == kExternalPixelArray); |
| 3003 |
| 2998 Register external_pointer = ToRegister(instr->external_pointer()); | 3004 Register external_pointer = ToRegister(instr->external_pointer()); |
| 2999 Register key = ToRegister(instr->key()); | 3005 Register key = ToRegister(instr->key()); |
| 3000 Register value = ToRegister(instr->value()); | 3006 Register value = ToRegister(instr->value()); |
| 3001 | 3007 |
| 3002 // Clamp the value to [0..255]. | 3008 // Clamp the value to [0..255]. |
| 3003 __ Usat(value, 8, Operand(value)); | 3009 __ Usat(value, 8, Operand(value)); |
| 3004 __ strb(value, MemOperand(external_pointer, key, LSL, 0)); | 3010 __ strb(value, MemOperand(external_pointer, key, LSL, 0)); |
| 3005 } | 3011 } |
| 3006 | 3012 |
| 3007 | 3013 |
| (...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4004 ASSERT(!environment->HasBeenRegistered()); | 4010 ASSERT(!environment->HasBeenRegistered()); |
| 4005 RegisterEnvironmentForDeoptimization(environment); | 4011 RegisterEnvironmentForDeoptimization(environment); |
| 4006 ASSERT(osr_pc_offset_ == -1); | 4012 ASSERT(osr_pc_offset_ == -1); |
| 4007 osr_pc_offset_ = masm()->pc_offset(); | 4013 osr_pc_offset_ = masm()->pc_offset(); |
| 4008 } | 4014 } |
| 4009 | 4015 |
| 4010 | 4016 |
| 4011 #undef __ | 4017 #undef __ |
| 4012 | 4018 |
| 4013 } } // namespace v8::internal | 4019 } } // namespace v8::internal |
| OLD | NEW |