| 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 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 } | 2570 } |
| 2571 } | 2571 } |
| 2572 | 2572 |
| 2573 | 2573 |
| 2574 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, | 2574 void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
| 2575 Register object, | 2575 Register object, |
| 2576 Handle<Map> type, | 2576 Handle<Map> type, |
| 2577 Handle<String> name, | 2577 Handle<String> name, |
| 2578 LEnvironment* env) { | 2578 LEnvironment* env) { |
| 2579 LookupResult lookup(isolate()); | 2579 LookupResult lookup(isolate()); |
| 2580 type->LookupInDescriptors(NULL, *name, &lookup); | 2580 type->LookupTransitionOrDescriptor(NULL, *name, &lookup); |
| 2581 ASSERT(lookup.IsFound() || lookup.IsCacheable()); | 2581 ASSERT(lookup.IsFound() || lookup.IsCacheable()); |
| 2582 if (lookup.IsField()) { | 2582 if (lookup.IsField()) { |
| 2583 int index = lookup.GetLocalFieldIndexFromMap(*type); | 2583 int index = lookup.GetLocalFieldIndexFromMap(*type); |
| 2584 int offset = index * kPointerSize; | 2584 int offset = index * kPointerSize; |
| 2585 if (index < 0) { | 2585 if (index < 0) { |
| 2586 // Negative property indices are in-object properties, indexed | 2586 // Negative property indices are in-object properties, indexed |
| 2587 // from the end of the fixed part of the object. | 2587 // from the end of the fixed part of the object. |
| 2588 __ ldr(result, FieldMemOperand(object, offset + type->instance_size())); | 2588 __ ldr(result, FieldMemOperand(object, offset + type->instance_size())); |
| 2589 } else { | 2589 } else { |
| 2590 // Non-negative property indices are in the properties array. | 2590 // Non-negative property indices are in the properties array. |
| (...skipping 2807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5398 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5398 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5399 __ ldr(result, FieldMemOperand(scratch, | 5399 __ ldr(result, FieldMemOperand(scratch, |
| 5400 FixedArray::kHeaderSize - kPointerSize)); | 5400 FixedArray::kHeaderSize - kPointerSize)); |
| 5401 __ bind(&done); | 5401 __ bind(&done); |
| 5402 } | 5402 } |
| 5403 | 5403 |
| 5404 | 5404 |
| 5405 #undef __ | 5405 #undef __ |
| 5406 | 5406 |
| 5407 } } // namespace v8::internal | 5407 } } // namespace v8::internal |
| OLD | NEW |