OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2572 Register result = ToRegister(instr->result()); | 2572 Register result = ToRegister(instr->result()); |
2573 if (!access.IsInobject()) { | 2573 if (!access.IsInobject()) { |
2574 __ lw(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 2574 __ lw(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
2575 object = result; | 2575 object = result; |
2576 } | 2576 } |
2577 MemOperand operand = FieldMemOperand(object, offset); | 2577 MemOperand operand = FieldMemOperand(object, offset); |
2578 __ Load(result, operand, access.representation()); | 2578 __ Load(result, operand, access.representation()); |
2579 } | 2579 } |
2580 | 2580 |
2581 | 2581 |
2582 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | |
2583 DCHECK(ToRegister(instr->context()).is(cp)); | |
2584 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | |
2585 DCHECK(ToRegister(instr->result()).is(v0)); | |
2586 | |
2587 // Name is always in a2. | |
2588 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); | |
2589 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | |
2590 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); | |
2591 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
2592 } | |
2593 | |
2594 | |
2595 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2582 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
2596 Register scratch = scratch0(); | 2583 Register scratch = scratch0(); |
2597 Register function = ToRegister(instr->function()); | 2584 Register function = ToRegister(instr->function()); |
2598 Register result = ToRegister(instr->result()); | 2585 Register result = ToRegister(instr->result()); |
2599 | 2586 |
2600 // Get the prototype or initial map from the function. | 2587 // Get the prototype or initial map from the function. |
2601 __ lw(result, | 2588 __ lw(result, |
2602 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 2589 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
2603 | 2590 |
2604 // Check that the function has a prototype or an initial map. | 2591 // Check that the function has a prototype or an initial map. |
(...skipping 2875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5480 __ lw(result, FieldMemOperand(scratch, | 5467 __ lw(result, FieldMemOperand(scratch, |
5481 FixedArray::kHeaderSize - kPointerSize)); | 5468 FixedArray::kHeaderSize - kPointerSize)); |
5482 __ bind(deferred->exit()); | 5469 __ bind(deferred->exit()); |
5483 __ bind(&done); | 5470 __ bind(&done); |
5484 } | 5471 } |
5485 | 5472 |
5486 #undef __ | 5473 #undef __ |
5487 | 5474 |
5488 } // namespace internal | 5475 } // namespace internal |
5489 } // namespace v8 | 5476 } // namespace v8 |
OLD | NEW |