| OLD | NEW | 
|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/ast/scopes.h" | 5 #include "src/ast/scopes.h" | 
| 6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" | 
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" | 
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" | 
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" | 
| 10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" | 
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1812 | 1812 | 
| 1813 void CodeGenerator::AssembleDeoptimizerCall( | 1813 void CodeGenerator::AssembleDeoptimizerCall( | 
| 1814     int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 1814     int deoptimization_id, Deoptimizer::BailoutType bailout_type) { | 
| 1815   Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 1815   Address deopt_entry = Deoptimizer::GetDeoptimizationEntry( | 
| 1816       isolate(), deoptimization_id, bailout_type); | 1816       isolate(), deoptimization_id, bailout_type); | 
| 1817   __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 1817   __ Call(deopt_entry, RelocInfo::RUNTIME_ENTRY); | 
| 1818 } | 1818 } | 
| 1819 | 1819 | 
| 1820 | 1820 | 
| 1821 void CodeGenerator::AssemblePrologue() { | 1821 void CodeGenerator::AssemblePrologue() { | 
| 1822   CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1822   const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 
| 1823   if (descriptor->IsCFunctionCall()) { | 1823   if (descriptor->IsCFunctionCall()) { | 
| 1824     __ Push(ra, fp); | 1824     __ Push(ra, fp); | 
| 1825     __ mov(fp, sp); | 1825     __ mov(fp, sp); | 
| 1826   } else if (descriptor->IsJSFunctionCall()) { | 1826   } else if (descriptor->IsJSFunctionCall()) { | 
| 1827     __ Prologue(this->info()->GeneratePreagedPrologue()); | 1827     __ Prologue(this->info()->GeneratePreagedPrologue()); | 
| 1828   } else if (frame()->needs_frame()) { | 1828   } else if (frame()->needs_frame()) { | 
| 1829     __ StubPrologue(); | 1829     __ StubPrologue(); | 
| 1830   } else { | 1830   } else { | 
| 1831     frame()->SetElidedFrameSizeInSlots(0); | 1831     frame()->SetElidedFrameSizeInSlots(0); | 
| 1832   } | 1832   } | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1867     // kNumCalleeSaved includes the fp register, but the fp register | 1867     // kNumCalleeSaved includes the fp register, but the fp register | 
| 1868     // is saved separately in TF. | 1868     // is saved separately in TF. | 
| 1869     int count = base::bits::CountPopulation32(saves); | 1869     int count = base::bits::CountPopulation32(saves); | 
| 1870     DCHECK(kNumCalleeSaved == count + 1); | 1870     DCHECK(kNumCalleeSaved == count + 1); | 
| 1871     frame()->AllocateSavedCalleeRegisterSlots(count); | 1871     frame()->AllocateSavedCalleeRegisterSlots(count); | 
| 1872   } | 1872   } | 
| 1873 } | 1873 } | 
| 1874 | 1874 | 
| 1875 | 1875 | 
| 1876 void CodeGenerator::AssembleReturn() { | 1876 void CodeGenerator::AssembleReturn() { | 
| 1877   CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 1877   const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); | 
| 1878 | 1878 | 
| 1879   // Restore GP registers. | 1879   // Restore GP registers. | 
| 1880   const RegList saves = descriptor->CalleeSavedRegisters(); | 1880   const RegList saves = descriptor->CalleeSavedRegisters(); | 
| 1881   if (saves != 0) { | 1881   if (saves != 0) { | 
| 1882     __ MultiPop(saves); | 1882     __ MultiPop(saves); | 
| 1883   } | 1883   } | 
| 1884 | 1884 | 
| 1885   // Restore FPU registers. | 1885   // Restore FPU registers. | 
| 1886   const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 1886   const RegList saves_fpu = descriptor->CalleeSavedFPRegisters(); | 
| 1887   if (saves_fpu != 0) { | 1887   if (saves_fpu != 0) { | 
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2117       padding_size -= v8::internal::Assembler::kInstrSize; | 2117       padding_size -= v8::internal::Assembler::kInstrSize; | 
| 2118     } | 2118     } | 
| 2119   } | 2119   } | 
| 2120 } | 2120 } | 
| 2121 | 2121 | 
| 2122 #undef __ | 2122 #undef __ | 
| 2123 | 2123 | 
| 2124 }  // namespace compiler | 2124 }  // namespace compiler | 
| 2125 }  // namespace internal | 2125 }  // namespace internal | 
| 2126 }  // namespace v8 | 2126 }  // namespace v8 | 
| OLD | NEW | 
|---|