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

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

Issue 2113673002: [stubs]: Convert FastNewContext stub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename based on feedback Created 4 years, 5 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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 Comment(";;; Allocate local context"); 178 Comment(";;; Allocate local context");
179 bool need_write_barrier = true; 179 bool need_write_barrier = true;
180 // Argument to NewContext is the function, which is in a1. 180 // Argument to NewContext is the function, which is in a1.
181 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 181 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
182 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 182 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
183 if (info()->scope()->is_script_scope()) { 183 if (info()->scope()->is_script_scope()) {
184 __ push(a1); 184 __ push(a1);
185 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 185 __ Push(info()->scope()->GetScopeInfo(info()->isolate()));
186 __ CallRuntime(Runtime::kNewScriptContext); 186 __ CallRuntime(Runtime::kNewScriptContext);
187 deopt_mode = Safepoint::kLazyDeopt; 187 deopt_mode = Safepoint::kLazyDeopt;
188 } else if (slots <= FastNewContextStub::kMaximumSlots) { 188 } else if (slots <= FastNewFunctionContextStub::kMaximumSlots) {
189 FastNewContextStub stub(isolate(), slots); 189 FastNewFunctionContextStub stub(isolate(), slots);
190 __ CallStub(&stub); 190 __ CallStub(&stub);
191 // Result of FastNewContextStub is always in new space. 191 // Result of FastNewFunctionContextStub is always in new space.
192 need_write_barrier = false; 192 need_write_barrier = false;
193 } else { 193 } else {
194 __ push(a1); 194 __ push(a1);
195 __ CallRuntime(Runtime::kNewFunctionContext); 195 __ CallRuntime(Runtime::kNewFunctionContext);
196 } 196 }
197 RecordSafepoint(deopt_mode); 197 RecordSafepoint(deopt_mode);
198 198
199 // Context is returned in both v0. It replaces the context passed to us. 199 // Context is returned in both v0. It replaces the context passed to us.
200 // It's saved in the stack and kept live in cp. 200 // It's saved in the stack and kept live in cp.
201 __ mov(cp, v0); 201 __ mov(cp, v0);
(...skipping 5328 matching lines...) Expand 10 before | Expand all | Expand 10 after
5530 __ lw(result, FieldMemOperand(scratch, 5530 __ lw(result, FieldMemOperand(scratch,
5531 FixedArray::kHeaderSize - kPointerSize)); 5531 FixedArray::kHeaderSize - kPointerSize));
5532 __ bind(deferred->exit()); 5532 __ bind(deferred->exit());
5533 __ bind(&done); 5533 __ bind(&done);
5534 } 5534 }
5535 5535
5536 #undef __ 5536 #undef __
5537 5537
5538 } // namespace internal 5538 } // namespace internal
5539 } // namespace v8 5539 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698