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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Crankshaft backends and scope deserialization Created 4 years, 2 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 bool need_write_barrier = true; 176 bool need_write_barrier = true;
177 // Argument to NewContext is the function, which is in a1. 177 // Argument to NewContext is the function, which is in a1.
178 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 178 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
179 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 179 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
180 if (info()->scope()->is_script_scope()) { 180 if (info()->scope()->is_script_scope()) {
181 __ push(a1); 181 __ push(a1);
182 __ Push(info()->scope()->scope_info()); 182 __ Push(info()->scope()->scope_info());
183 __ CallRuntime(Runtime::kNewScriptContext); 183 __ CallRuntime(Runtime::kNewScriptContext);
184 deopt_mode = Safepoint::kLazyDeopt; 184 deopt_mode = Safepoint::kLazyDeopt;
185 } else { 185 } else {
186 FastNewFunctionContextStub stub(isolate()); 186 FastNewFunctionContextStub stub(isolate(),
187 info()->scope()->is_eval_scope());
187 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); 188 __ li(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots));
188 __ CallStub(&stub); 189 __ CallStub(&stub);
189 // Result of FastNewFunctionContextStub is always in new space. 190 // Result of FastNewFunctionContextStub is always in new space.
190 need_write_barrier = false; 191 need_write_barrier = false;
191 } 192 }
192 RecordSafepoint(deopt_mode); 193 RecordSafepoint(deopt_mode);
193 194
194 // Context is returned in both v0. It replaces the context passed to us. 195 // Context is returned in both v0. It replaces the context passed to us.
195 // It's saved in the stack and kept live in cp. 196 // It's saved in the stack and kept live in cp.
196 __ mov(cp, v0); 197 __ mov(cp, v0);
(...skipping 5217 matching lines...) Expand 10 before | Expand all | Expand 10 after
5414 __ lw(result, FieldMemOperand(scratch, 5415 __ lw(result, FieldMemOperand(scratch,
5415 FixedArray::kHeaderSize - kPointerSize)); 5416 FixedArray::kHeaderSize - kPointerSize));
5416 __ bind(deferred->exit()); 5417 __ bind(deferred->exit());
5417 __ bind(&done); 5418 __ bind(&done);
5418 } 5419 }
5419 5420
5420 #undef __ 5421 #undef __
5421 5422
5422 } // namespace internal 5423 } // namespace internal
5423 } // namespace v8 5424 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698