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/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 SaveCallerDoubles(); | 151 SaveCallerDoubles(); |
152 } | 152 } |
153 return !is_aborted(); | 153 return !is_aborted(); |
154 } | 154 } |
155 | 155 |
156 | 156 |
157 void LCodeGen::DoPrologue(LPrologue* instr) { | 157 void LCodeGen::DoPrologue(LPrologue* instr) { |
158 Comment(";;; Prologue begin"); | 158 Comment(";;; Prologue begin"); |
159 | 159 |
160 // Possibly allocate a local context. | 160 // Possibly allocate a local context. |
161 if (info()->scope()->num_heap_slots() > 0) { | 161 if (info()->scope()->NeedsContext()) { |
162 Comment(";;; Allocate local context"); | 162 Comment(";;; Allocate local context"); |
163 bool need_write_barrier = true; | 163 bool need_write_barrier = true; |
164 // Argument to NewContext is the function, which is in r4. | 164 // Argument to NewContext is the function, which is in r4. |
165 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 165 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
166 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 166 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
167 if (info()->scope()->is_script_scope()) { | 167 if (info()->scope()->is_script_scope()) { |
168 __ push(r4); | 168 __ push(r4); |
169 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 169 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
170 __ CallRuntime(Runtime::kNewScriptContext); | 170 __ CallRuntime(Runtime::kNewScriptContext); |
171 deopt_mode = Safepoint::kLazyDeopt; | 171 deopt_mode = Safepoint::kLazyDeopt; |
(...skipping 5604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5776 __ LoadP(result, | 5776 __ LoadP(result, |
5777 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5777 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5778 __ bind(deferred->exit()); | 5778 __ bind(deferred->exit()); |
5779 __ bind(&done); | 5779 __ bind(&done); |
5780 } | 5780 } |
5781 | 5781 |
5782 #undef __ | 5782 #undef __ |
5783 | 5783 |
5784 } // namespace internal | 5784 } // namespace internal |
5785 } // namespace v8 | 5785 } // namespace v8 |
OLD | NEW |