OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 SaveCallerDoubles(); | 140 SaveCallerDoubles(); |
141 } | 141 } |
142 return !is_aborted(); | 142 return !is_aborted(); |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 void LCodeGen::DoPrologue(LPrologue* instr) { | 146 void LCodeGen::DoPrologue(LPrologue* instr) { |
147 Comment(";;; Prologue begin"); | 147 Comment(";;; Prologue begin"); |
148 | 148 |
149 // Possibly allocate a local context. | 149 // Possibly allocate a local context. |
150 if (info()->scope()->num_heap_slots() > 0) { | 150 if (info()->scope()->NeedsContext()) { |
151 Comment(";;; Allocate local context"); | 151 Comment(";;; Allocate local context"); |
152 bool need_write_barrier = true; | 152 bool need_write_barrier = true; |
153 // Argument to NewContext is the function, which is in a1. | 153 // Argument to NewContext is the function, which is in a1. |
154 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 154 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
155 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; | 155 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; |
156 if (info()->scope()->is_script_scope()) { | 156 if (info()->scope()->is_script_scope()) { |
157 __ push(a1); | 157 __ push(a1); |
158 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); | 158 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); |
159 __ CallRuntime(Runtime::kNewScriptContext); | 159 __ CallRuntime(Runtime::kNewScriptContext); |
160 deopt_mode = Safepoint::kLazyDeopt; | 160 deopt_mode = Safepoint::kLazyDeopt; |
(...skipping 5580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5741 __ ld(result, FieldMemOperand(scratch, | 5741 __ ld(result, FieldMemOperand(scratch, |
5742 FixedArray::kHeaderSize - kPointerSize)); | 5742 FixedArray::kHeaderSize - kPointerSize)); |
5743 __ bind(deferred->exit()); | 5743 __ bind(deferred->exit()); |
5744 __ bind(&done); | 5744 __ bind(&done); |
5745 } | 5745 } |
5746 | 5746 |
5747 #undef __ | 5747 #undef __ |
5748 | 5748 |
5749 } // namespace internal | 5749 } // namespace internal |
5750 } // namespace v8 | 5750 } // namespace v8 |
OLD | NEW |