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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 7230047: Remove the fcontext field from all contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Setup the object header. 129 // Setup the object header.
130 Factory* factory = masm->isolate()->factory(); 130 Factory* factory = masm->isolate()->factory();
131 __ mov(FieldOperand(eax, HeapObject::kMapOffset), 131 __ mov(FieldOperand(eax, HeapObject::kMapOffset),
132 factory->function_context_map()); 132 factory->function_context_map());
133 __ mov(FieldOperand(eax, Context::kLengthOffset), 133 __ mov(FieldOperand(eax, Context::kLengthOffset),
134 Immediate(Smi::FromInt(length))); 134 Immediate(Smi::FromInt(length)));
135 135
136 // Setup the fixed slots. 136 // Setup the fixed slots.
137 __ Set(ebx, Immediate(0)); // Set to NULL. 137 __ Set(ebx, Immediate(0)); // Set to NULL.
138 __ mov(Operand(eax, Context::SlotOffset(Context::CLOSURE_INDEX)), ecx); 138 __ mov(Operand(eax, Context::SlotOffset(Context::CLOSURE_INDEX)), ecx);
139 __ mov(Operand(eax, Context::SlotOffset(Context::FCONTEXT_INDEX)), eax);
140 __ mov(Operand(eax, Context::SlotOffset(Context::PREVIOUS_INDEX)), esi); 139 __ mov(Operand(eax, Context::SlotOffset(Context::PREVIOUS_INDEX)), esi);
141 __ mov(Operand(eax, Context::SlotOffset(Context::EXTENSION_INDEX)), ebx); 140 __ mov(Operand(eax, Context::SlotOffset(Context::EXTENSION_INDEX)), ebx);
142 141
143 // Copy the global object from the previous context. 142 // Copy the global object from the previous context.
144 __ mov(ebx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); 143 __ mov(ebx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
145 __ mov(Operand(eax, Context::SlotOffset(Context::GLOBAL_INDEX)), ebx); 144 __ mov(Operand(eax, Context::SlotOffset(Context::GLOBAL_INDEX)), ebx);
146 145
147 // Initialize the rest of the slots to undefined. 146 // Initialize the rest of the slots to undefined.
148 __ mov(ebx, factory->undefined_value()); 147 __ mov(ebx, factory->undefined_value());
149 for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) { 148 for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
(...skipping 6199 matching lines...) Expand 10 before | Expand all | Expand 10 after
6349 __ Drop(1); 6348 __ Drop(1);
6350 __ ret(2 * kPointerSize); 6349 __ ret(2 * kPointerSize);
6351 } 6350 }
6352 6351
6353 6352
6354 #undef __ 6353 #undef __
6355 6354
6356 } } // namespace v8::internal 6355 } } // namespace v8::internal
6357 6356
6358 #endif // V8_TARGET_ARCH_IA32 6357 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/arm/full-codegen-arm.cc ('K') | « src/heap.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698