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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 7003058: A collection of context-related refactoring changes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
« src/runtime.cc ('K') | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Possibly allocate a local context. 190 // Possibly allocate a local context.
191 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 191 int heap_slots = scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
192 if (heap_slots > 0) { 192 if (heap_slots > 0) {
193 Comment(";;; Allocate local context"); 193 Comment(";;; Allocate local context");
194 // Argument to NewContext is the function, which is still in rdi. 194 // Argument to NewContext is the function, which is still in rdi.
195 __ push(rdi); 195 __ push(rdi);
196 if (heap_slots <= FastNewContextStub::kMaximumSlots) { 196 if (heap_slots <= FastNewContextStub::kMaximumSlots) {
197 FastNewContextStub stub(heap_slots); 197 FastNewContextStub stub(heap_slots);
198 __ CallStub(&stub); 198 __ CallStub(&stub);
199 } else { 199 } else {
200 __ CallRuntime(Runtime::kNewContext, 1); 200 __ CallRuntime(Runtime::kNewFunctionContext, 1);
201 } 201 }
202 RecordSafepoint(Safepoint::kNoDeoptimizationIndex); 202 RecordSafepoint(Safepoint::kNoDeoptimizationIndex);
203 // Context is returned in both rax and rsi. It replaces the context 203 // Context is returned in both rax and rsi. It replaces the context
204 // passed to us. It's saved in the stack and kept live in rsi. 204 // passed to us. It's saved in the stack and kept live in rsi.
205 __ movq(Operand(rbp, StandardFrameConstants::kContextOffset), rsi); 205 __ movq(Operand(rbp, StandardFrameConstants::kContextOffset), rsi);
206 206
207 // Copy any necessary parameters into the context. 207 // Copy any necessary parameters into the context.
208 int num_parameters = scope()->num_parameters(); 208 int num_parameters = scope()->num_parameters();
209 for (int i = 0; i < num_parameters; i++) { 209 for (int i = 0; i < num_parameters; i++) {
210 Slot* slot = scope()->parameter(i)->AsSlot(); 210 Slot* slot = scope()->parameter(i)->AsSlot();
(...skipping 4042 matching lines...) Expand 10 before | Expand all | Expand 10 after
4253 RegisterEnvironmentForDeoptimization(environment); 4253 RegisterEnvironmentForDeoptimization(environment);
4254 ASSERT(osr_pc_offset_ == -1); 4254 ASSERT(osr_pc_offset_ == -1);
4255 osr_pc_offset_ = masm()->pc_offset(); 4255 osr_pc_offset_ = masm()->pc_offset();
4256 } 4256 }
4257 4257
4258 #undef __ 4258 #undef __
4259 4259
4260 } } // namespace v8::internal 4260 } } // namespace v8::internal
4261 4261
4262 #endif // V8_TARGET_ARCH_X64 4262 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/runtime.cc ('K') | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698