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 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 ASSERT(ToRegister(instr->InputAt(0)).is(rdi)); | 2033 ASSERT(ToRegister(instr->InputAt(0)).is(rdi)); |
2034 ASSERT(ToRegister(instr->result()).is(rax)); | 2034 ASSERT(ToRegister(instr->result()).is(rax)); |
2035 | 2035 |
2036 Handle<Code> builtin(Builtins::builtin(Builtins::JSConstructCall)); | 2036 Handle<Code> builtin(Builtins::builtin(Builtins::JSConstructCall)); |
2037 __ Set(rax, instr->arity()); | 2037 __ Set(rax, instr->arity()); |
2038 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); | 2038 CallCode(builtin, RelocInfo::CONSTRUCT_CALL, instr); |
2039 } | 2039 } |
2040 | 2040 |
2041 | 2041 |
2042 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { | 2042 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { |
2043 Abort("Unimplemented: %s", "DoCallRuntime"); | 2043 CallRuntime(instr->function(), instr->arity(), instr); |
2044 } | 2044 } |
2045 | 2045 |
2046 | 2046 |
2047 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { | 2047 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
2048 Register object = ToRegister(instr->object()); | 2048 Register object = ToRegister(instr->object()); |
2049 Register value = ToRegister(instr->value()); | 2049 Register value = ToRegister(instr->value()); |
2050 int offset = instr->offset(); | 2050 int offset = instr->offset(); |
2051 | 2051 |
2052 if (!instr->transition().is_null()) { | 2052 if (!instr->transition().is_null()) { |
2053 __ Move(FieldOperand(object, HeapObject::kMapOffset), instr->transition()); | 2053 __ Move(FieldOperand(object, HeapObject::kMapOffset), instr->transition()); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); | 2646 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |
2647 __ j(above_equal, &done); | 2647 __ j(above_equal, &done); |
2648 | 2648 |
2649 StackCheckStub stub; | 2649 StackCheckStub stub; |
2650 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 2650 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
2651 __ bind(&done); | 2651 __ bind(&done); |
2652 } | 2652 } |
2653 | 2653 |
2654 | 2654 |
2655 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 2655 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
2656 Abort("Unimplemented: %s", "DoOsrEntry"); | 2656 // This is a pseudo-instruction that ensures that the environment here is |
| 2657 // properly registered for deoptimization and records the assembler's PC |
| 2658 // offset. |
| 2659 LEnvironment* environment = instr->environment(); |
| 2660 environment->SetSpilledRegisters(instr->SpilledRegisterArray(), |
| 2661 instr->SpilledDoubleRegisterArray()); |
| 2662 |
| 2663 // If the environment were already registered, we would have no way of |
| 2664 // backpatching it with the spill slot operands. |
| 2665 ASSERT(!environment->HasBeenRegistered()); |
| 2666 RegisterEnvironmentForDeoptimization(environment); |
| 2667 ASSERT(osr_pc_offset_ == -1); |
| 2668 osr_pc_offset_ = masm()->pc_offset(); |
2657 } | 2669 } |
2658 | 2670 |
2659 #undef __ | 2671 #undef __ |
2660 | 2672 |
2661 } } // namespace v8::internal | 2673 } } // namespace v8::internal |
2662 | 2674 |
2663 #endif // V8_TARGET_ARCH_X64 | 2675 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |