| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 osr_pc_offset_ = masm()->pc_offset(); | 266 osr_pc_offset_ = masm()->pc_offset(); |
| 267 | 267 |
| 268 // Adjust the frame size, subsuming the unoptimized frame into the | 268 // Adjust the frame size, subsuming the unoptimized frame into the |
| 269 // optimized frame. | 269 // optimized frame. |
| 270 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 270 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
| 271 ASSERT(slots >= 0); | 271 ASSERT(slots >= 0); |
| 272 __ subq(rsp, Immediate(slots * kPointerSize)); | 272 __ subq(rsp, Immediate(slots * kPointerSize)); |
| 273 } | 273 } |
| 274 | 274 |
| 275 | 275 |
| 276 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
| 277 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
| 278 safepoints_.BumpLastLazySafepointIndex(); |
| 279 } |
| 280 } |
| 281 |
| 282 |
| 276 bool LCodeGen::GenerateJumpTable() { | 283 bool LCodeGen::GenerateJumpTable() { |
| 277 Label needs_frame; | 284 Label needs_frame; |
| 278 if (jump_table_.length() > 0) { | 285 if (jump_table_.length() > 0) { |
| 279 Comment(";;; -------------------- Jump table --------------------"); | 286 Comment(";;; -------------------- Jump table --------------------"); |
| 280 } | 287 } |
| 281 for (int i = 0; i < jump_table_.length(); i++) { | 288 for (int i = 0; i < jump_table_.length(); i++) { |
| 282 __ bind(&jump_table_[i].label); | 289 __ bind(&jump_table_[i].label); |
| 283 Address entry = jump_table_[i].address; | 290 Address entry = jump_table_[i].address; |
| 284 Deoptimizer::BailoutType type = jump_table_[i].bailout_type; | 291 Deoptimizer::BailoutType type = jump_table_[i].bailout_type; |
| 285 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); | 292 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); |
| (...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 | 1900 |
| 1894 | 1901 |
| 1895 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1902 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| 1896 ASSERT(ToRegister(instr->context()).is(rsi)); | 1903 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 1897 ASSERT(ToRegister(instr->left()).is(rdx)); | 1904 ASSERT(ToRegister(instr->left()).is(rdx)); |
| 1898 ASSERT(ToRegister(instr->right()).is(rax)); | 1905 ASSERT(ToRegister(instr->right()).is(rax)); |
| 1899 ASSERT(ToRegister(instr->result()).is(rax)); | 1906 ASSERT(ToRegister(instr->result()).is(rax)); |
| 1900 | 1907 |
| 1901 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); | 1908 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); |
| 1902 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1909 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1903 __ nop(); // Signals no inlined code. | |
| 1904 } | 1910 } |
| 1905 | 1911 |
| 1906 | 1912 |
| 1907 template<class InstrType> | 1913 template<class InstrType> |
| 1908 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { | 1914 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { |
| 1909 int left_block = instr->TrueDestination(chunk_); | 1915 int left_block = instr->TrueDestination(chunk_); |
| 1910 int right_block = instr->FalseDestination(chunk_); | 1916 int right_block = instr->FalseDestination(chunk_); |
| 1911 | 1917 |
| 1912 int next_block = GetNextEmittedBlock(); | 1918 int next_block = GetNextEmittedBlock(); |
| 1913 | 1919 |
| (...skipping 3739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5653 FixedArray::kHeaderSize - kPointerSize)); | 5659 FixedArray::kHeaderSize - kPointerSize)); |
| 5654 __ bind(&done); | 5660 __ bind(&done); |
| 5655 } | 5661 } |
| 5656 | 5662 |
| 5657 | 5663 |
| 5658 #undef __ | 5664 #undef __ |
| 5659 | 5665 |
| 5660 } } // namespace v8::internal | 5666 } } // namespace v8::internal |
| 5661 | 5667 |
| 5662 #endif // V8_TARGET_ARCH_X64 | 5668 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |