| 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 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 ASSERT(ToRegister(instr->key()).is(eax)); | 2536 ASSERT(ToRegister(instr->key()).is(eax)); |
| 2537 | 2537 |
| 2538 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 2538 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
| 2539 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2539 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2540 } | 2540 } |
| 2541 | 2541 |
| 2542 | 2542 |
| 2543 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 2543 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 2544 Register result = ToRegister(instr->result()); | 2544 Register result = ToRegister(instr->result()); |
| 2545 | 2545 |
| 2546 // Check for arguments adapter frame. | 2546 if (instr->from_inlined()) { |
| 2547 Label done, adapted; | 2547 __ lea(result, Operand(esp, -2 * kPointerSize)); |
| 2548 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | 2548 } else { |
| 2549 __ mov(result, Operand(result, StandardFrameConstants::kContextOffset)); | 2549 // Check for arguments adapter frame. |
| 2550 __ cmp(Operand(result), | 2550 Label done, adapted; |
| 2551 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 2551 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
| 2552 __ j(equal, &adapted, Label::kNear); | 2552 __ mov(result, Operand(result, StandardFrameConstants::kContextOffset)); |
| 2553 __ cmp(Operand(result), |
| 2554 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 2555 __ j(equal, &adapted, Label::kNear); |
| 2553 | 2556 |
| 2554 // No arguments adaptor frame. | 2557 // No arguments adaptor frame. |
| 2555 __ mov(result, Operand(ebp)); | 2558 __ mov(result, Operand(ebp)); |
| 2556 __ jmp(&done, Label::kNear); | 2559 __ jmp(&done, Label::kNear); |
| 2557 | 2560 |
| 2558 // Arguments adaptor frame present. | 2561 // Arguments adaptor frame present. |
| 2559 __ bind(&adapted); | 2562 __ bind(&adapted); |
| 2560 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | 2563 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
| 2561 | 2564 |
| 2562 // Result is the frame pointer for the frame if not adapted and for the real | 2565 // Result is the frame pointer for the frame if not adapted and for the real |
| 2563 // frame below the adaptor frame if adapted. | 2566 // frame below the adaptor frame if adapted. |
| 2564 __ bind(&done); | 2567 __ bind(&done); |
| 2568 } |
| 2565 } | 2569 } |
| 2566 | 2570 |
| 2567 | 2571 |
| 2568 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { | 2572 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
| 2569 Operand elem = ToOperand(instr->InputAt(0)); | 2573 Operand elem = ToOperand(instr->InputAt(0)); |
| 2570 Register result = ToRegister(instr->result()); | 2574 Register result = ToRegister(instr->result()); |
| 2571 | 2575 |
| 2572 Label done; | 2576 Label done; |
| 2573 | 2577 |
| 2574 // If no arguments adaptor frame the number of arguments is fixed. | 2578 // If no arguments adaptor frame the number of arguments is fixed. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 safepoint_generator, CALL_AS_METHOD); | 2680 safepoint_generator, CALL_AS_METHOD); |
| 2677 } | 2681 } |
| 2678 | 2682 |
| 2679 | 2683 |
| 2680 void LCodeGen::DoPushArgument(LPushArgument* instr) { | 2684 void LCodeGen::DoPushArgument(LPushArgument* instr) { |
| 2681 LOperand* argument = instr->InputAt(0); | 2685 LOperand* argument = instr->InputAt(0); |
| 2682 EmitPushTaggedOperand(argument); | 2686 EmitPushTaggedOperand(argument); |
| 2683 } | 2687 } |
| 2684 | 2688 |
| 2685 | 2689 |
| 2690 void LCodeGen::DoPop(LPop* instr) { |
| 2691 __ Drop(instr->count()); |
| 2692 } |
| 2693 |
| 2694 |
| 2686 void LCodeGen::DoThisFunction(LThisFunction* instr) { | 2695 void LCodeGen::DoThisFunction(LThisFunction* instr) { |
| 2687 Register result = ToRegister(instr->result()); | 2696 Register result = ToRegister(instr->result()); |
| 2688 __ LoadHeapObject(result, instr->hydrogen()->closure()); | 2697 __ LoadHeapObject(result, instr->hydrogen()->closure()); |
| 2689 } | 2698 } |
| 2690 | 2699 |
| 2691 | 2700 |
| 2692 void LCodeGen::DoContext(LContext* instr) { | 2701 void LCodeGen::DoContext(LContext* instr) { |
| 2693 Register result = ToRegister(instr->result()); | 2702 Register result = ToRegister(instr->result()); |
| 2694 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); | 2703 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 2695 } | 2704 } |
| (...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4995 FixedArray::kHeaderSize - kPointerSize)); | 5004 FixedArray::kHeaderSize - kPointerSize)); |
| 4996 __ bind(&done); | 5005 __ bind(&done); |
| 4997 } | 5006 } |
| 4998 | 5007 |
| 4999 | 5008 |
| 5000 #undef __ | 5009 #undef __ |
| 5001 | 5010 |
| 5002 } } // namespace v8::internal | 5011 } } // namespace v8::internal |
| 5003 | 5012 |
| 5004 #endif // V8_TARGET_ARCH_IA32 | 5013 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |