Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.cc

Issue 2177273002: Make FastNewFunctionContextStub take slots parameter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: move loop check Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool need_write_barrier = true; 172 bool need_write_barrier = true;
173 // Argument to NewContext is the function, which is still in edi. 173 // Argument to NewContext is the function, which is still in edi.
174 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 174 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
175 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 175 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
176 if (info()->scope()->is_script_scope()) { 176 if (info()->scope()->is_script_scope()) {
177 __ push(edi); 177 __ push(edi);
178 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 178 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
179 __ CallRuntime(Runtime::kNewScriptContext); 179 __ CallRuntime(Runtime::kNewScriptContext);
180 deopt_mode = Safepoint::kLazyDeopt; 180 deopt_mode = Safepoint::kLazyDeopt;
181 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 181 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
182 FastNewFunctionContextStub stub(isolate(), slots); 182 FastNewFunctionContextStub stub(isolate());
183 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
184 Immediate(slots));
183 __ CallStub(&stub); 185 __ CallStub(&stub);
184 // Result of FastNewFunctionContextStub is always in new space. 186 // Result of FastNewFunctionContextStub is always in new space.
185 need_write_barrier = false; 187 need_write_barrier = false;
186 } else { 188 } else {
187 __ push(edi); 189 __ push(edi);
188 __ CallRuntime(Runtime::kNewFunctionContext); 190 __ CallRuntime(Runtime::kNewFunctionContext);
189 } 191 }
190 RecordSafepoint(deopt_mode); 192 RecordSafepoint(deopt_mode);
191 193
192 // Context is returned in eax. It replaces the context passed to us. 194 // Context is returned in eax. It replaces the context passed to us.
(...skipping 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after
5284 __ bind(deferred->exit()); 5286 __ bind(deferred->exit());
5285 __ bind(&done); 5287 __ bind(&done);
5286 } 5288 }
5287 5289
5288 #undef __ 5290 #undef __
5289 5291
5290 } // namespace internal 5292 } // namespace internal
5291 } // namespace v8 5293 } // namespace v8
5292 5294
5293 #endif // V8_TARGET_ARCH_IA32 5295 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698