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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 bool need_write_barrier = true; 153 bool need_write_barrier = true;
154 // Argument to NewContext is the function, which is in r3. 154 // Argument to NewContext is the function, which is in r3.
155 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 155 int slots = info()->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
156 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 156 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
157 if (info()->scope()->is_script_scope()) { 157 if (info()->scope()->is_script_scope()) {
158 __ push(r3); 158 __ push(r3);
159 __ Push(info()->scope()->scope_info()); 159 __ Push(info()->scope()->scope_info());
160 __ CallRuntime(Runtime::kNewScriptContext); 160 __ CallRuntime(Runtime::kNewScriptContext);
161 deopt_mode = Safepoint::kLazyDeopt; 161 deopt_mode = Safepoint::kLazyDeopt;
162 } else { 162 } else {
163 FastNewFunctionContextStub stub(isolate()); 163 FastNewFunctionContextStub stub(isolate(),
164 info()->scope()->is_eval_scope());
164 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots)); 165 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), Operand(slots));
165 __ CallStub(&stub); 166 __ CallStub(&stub);
166 // Result of FastNewFunctionContextStub is always in new space. 167 // Result of FastNewFunctionContextStub is always in new space.
167 need_write_barrier = false; 168 need_write_barrier = false;
168 } 169 }
169 RecordSafepoint(deopt_mode); 170 RecordSafepoint(deopt_mode);
170 171
171 // Context is returned in both r2 and cp. It replaces the context 172 // Context is returned in both r2 and cp. It replaces the context
172 // passed to us. It's saved in the stack and kept live in cp. 173 // passed to us. It's saved in the stack and kept live in cp.
173 __ LoadRR(cp, r2); 174 __ LoadRR(cp, r2);
(...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after
5554 __ LoadP(result, 5555 __ LoadP(result,
5555 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5556 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5556 __ bind(deferred->exit()); 5557 __ bind(deferred->exit());
5557 __ bind(&done); 5558 __ bind(&done);
5558 } 5559 }
5559 5560
5560 #undef __ 5561 #undef __
5561 5562
5562 } // namespace internal 5563 } // namespace internal
5563 } // namespace v8 5564 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698