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

Side by Side Diff: src/arm/macro-assembler-arm.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 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 ldr(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2555 ldr(dst, MemOperand(cp, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2556 for (int i = 1; i < context_chain_length; i++) { 2556 for (int i = 1; i < context_chain_length; i++) {
2557 ldr(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2557 ldr(dst, MemOperand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2558 } 2558 }
2559 } else { 2559 } else {
2560 // Slot is in the current function context. Move it into the 2560 // Slot is in the current function context. Move it into the
2561 // destination register in case we store into it (the write barrier 2561 // destination register in case we store into it (the write barrier
2562 // cannot be allowed to destroy the context in esi). 2562 // cannot be allowed to destroy the context in esi).
2563 mov(dst, cp); 2563 mov(dst, cp);
2564 } 2564 }
2565
2566 // We should not have found a 'with' context by walking the context chain
2567 // (i.e., the static scope chain and runtime context chain do not agree).
2568 // A variable occurring in such a scope should have slot type LOOKUP and
2569 // not CONTEXT.
2570 if (emit_debug_code()) {
2571 ldr(ip, MemOperand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX)));
2572 cmp(dst, ip);
2573 Check(eq, "Yo dawg, I heard you liked function contexts "
2574 "so I put function contexts in all your contexts");
2575 }
2576 } 2565 }
2577 2566
2578 2567
2579 void MacroAssembler::LoadGlobalFunction(int index, Register function) { 2568 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
2580 // Load the global or builtins object from the current context. 2569 // Load the global or builtins object from the current context.
2581 ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 2570 ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
2582 // Load the global context from the global or builtins object. 2571 // Load the global context from the global or builtins object.
2583 ldr(function, FieldMemOperand(function, 2572 ldr(function, FieldMemOperand(function,
2584 GlobalObject::kGlobalContextOffset)); 2573 GlobalObject::kGlobalContextOffset));
2585 // Load the function from the global context. 2574 // Load the function from the global context.
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 void CodePatcher::EmitCondition(Condition cond) { 3173 void CodePatcher::EmitCondition(Condition cond) {
3185 Instr instr = Assembler::instr_at(masm_.pc_); 3174 Instr instr = Assembler::instr_at(masm_.pc_);
3186 instr = (instr & ~kCondMask) | cond; 3175 instr = (instr & ~kCondMask) | cond;
3187 masm_.emit(instr); 3176 masm_.emit(instr);
3188 } 3177 }
3189 3178
3190 3179
3191 } } // namespace v8::internal 3180 } } // namespace v8::internal
3192 3181
3193 #endif // V8_TARGET_ARCH_ARM 3182 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698