| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 osr_pc_offset_ = masm()->pc_offset(); | 261 osr_pc_offset_ = masm()->pc_offset(); |
| 262 | 262 |
| 263 // Adjust the frame size, subsuming the unoptimized frame into the | 263 // Adjust the frame size, subsuming the unoptimized frame into the |
| 264 // optimized frame. | 264 // optimized frame. |
| 265 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); | 265 int slots = GetStackSlotCount() - graph()->osr()->UnoptimizedFrameSlots(); |
| 266 ASSERT(slots >= 0); | 266 ASSERT(slots >= 0); |
| 267 __ subq(rsp, Immediate(slots * kPointerSize)); | 267 __ subq(rsp, Immediate(slots * kPointerSize)); |
| 268 } | 268 } |
| 269 | 269 |
| 270 | 270 |
| 271 void LCodeGen::GenerateBodyInstructionPre(LInstruction* instr) { |
| 272 if (!instr->IsLazyBailout() && !instr->IsGap()) { |
| 273 safepoints_.BumpLastLazySafepointIndex(); |
| 274 } |
| 275 } |
| 276 |
| 277 |
| 271 bool LCodeGen::GenerateJumpTable() { | 278 bool LCodeGen::GenerateJumpTable() { |
| 272 Label needs_frame; | 279 Label needs_frame; |
| 273 if (jump_table_.length() > 0) { | 280 if (jump_table_.length() > 0) { |
| 274 Comment(";;; -------------------- Jump table --------------------"); | 281 Comment(";;; -------------------- Jump table --------------------"); |
| 275 } | 282 } |
| 276 for (int i = 0; i < jump_table_.length(); i++) { | 283 for (int i = 0; i < jump_table_.length(); i++) { |
| 277 __ bind(&jump_table_[i].label); | 284 __ bind(&jump_table_[i].label); |
| 278 Address entry = jump_table_[i].address; | 285 Address entry = jump_table_[i].address; |
| 279 Deoptimizer::BailoutType type = jump_table_[i].bailout_type; | 286 Deoptimizer::BailoutType type = jump_table_[i].bailout_type; |
| 280 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); | 287 int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type); |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1946 | 1953 |
| 1947 | 1954 |
| 1948 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { | 1955 void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
| 1949 ASSERT(ToRegister(instr->context()).is(rsi)); | 1956 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 1950 ASSERT(ToRegister(instr->left()).is(rdx)); | 1957 ASSERT(ToRegister(instr->left()).is(rdx)); |
| 1951 ASSERT(ToRegister(instr->right()).is(rax)); | 1958 ASSERT(ToRegister(instr->right()).is(rax)); |
| 1952 ASSERT(ToRegister(instr->result()).is(rax)); | 1959 ASSERT(ToRegister(instr->result()).is(rax)); |
| 1953 | 1960 |
| 1954 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); | 1961 BinaryOpICStub stub(instr->op(), NO_OVERWRITE); |
| 1955 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1962 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1956 __ nop(); // Signals no inlined code. | |
| 1957 } | 1963 } |
| 1958 | 1964 |
| 1959 | 1965 |
| 1960 template<class InstrType> | 1966 template<class InstrType> |
| 1961 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { | 1967 void LCodeGen::EmitBranch(InstrType instr, Condition cc) { |
| 1962 int left_block = instr->TrueDestination(chunk_); | 1968 int left_block = instr->TrueDestination(chunk_); |
| 1963 int right_block = instr->FalseDestination(chunk_); | 1969 int right_block = instr->FalseDestination(chunk_); |
| 1964 | 1970 |
| 1965 int next_block = GetNextEmittedBlock(); | 1971 int next_block = GetNextEmittedBlock(); |
| 1966 | 1972 |
| (...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5655 FixedArray::kHeaderSize - kPointerSize)); | 5661 FixedArray::kHeaderSize - kPointerSize)); |
| 5656 __ bind(&done); | 5662 __ bind(&done); |
| 5657 } | 5663 } |
| 5658 | 5664 |
| 5659 | 5665 |
| 5660 #undef __ | 5666 #undef __ |
| 5661 | 5667 |
| 5662 } } // namespace v8::internal | 5668 } } // namespace v8::internal |
| 5663 | 5669 |
| 5664 #endif // V8_TARGET_ARCH_X64 | 5670 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |