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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 13176002: factor out "ReloadContextFromFrame" (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 9 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2330 2330
2331 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { 2331 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
2332 ASSERT(!target.is(edi)); 2332 ASSERT(!target.is(edi));
2333 // Load the JavaScript builtin function from the builtins object. 2333 // Load the JavaScript builtin function from the builtins object.
2334 GetBuiltinFunction(edi, id); 2334 GetBuiltinFunction(edi, id);
2335 // Load the code entry point from the function into the target register. 2335 // Load the code entry point from the function into the target register.
2336 mov(target, FieldOperand(edi, JSFunction::kCodeEntryOffset)); 2336 mov(target, FieldOperand(edi, JSFunction::kCodeEntryOffset));
2337 } 2337 }
2338 2338
2339 2339
2340 void MacroAssembler::ReloadContextFromFrame() {
2341 mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2342 }
2343
2344
2340 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { 2345 void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
2341 if (context_chain_length > 0) { 2346 if (context_chain_length > 0) {
2342 // Move up the chain of contexts to the context containing the slot. 2347 // Move up the chain of contexts to the context containing the slot.
2343 mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2348 mov(dst, Operand(esi, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2344 for (int i = 1; i < context_chain_length; i++) { 2349 for (int i = 1; i < context_chain_length; i++) {
2345 mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX))); 2350 mov(dst, Operand(dst, Context::SlotOffset(Context::PREVIOUS_INDEX)));
2346 } 2351 }
2347 } else { 2352 } else {
2348 // Slot is in the current function context. Move it into the 2353 // Slot is in the current function context. Move it into the
2349 // destination register in case we store into it (the write barrier 2354 // destination register in case we store into it (the write barrier
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 j(greater, &no_info_available); 3102 j(greater, &no_info_available);
3098 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), 3103 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize),
3099 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); 3104 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map())));
3100 bind(&no_info_available); 3105 bind(&no_info_available);
3101 } 3106 }
3102 3107
3103 3108
3104 } } // namespace v8::internal 3109 } } // namespace v8::internal
3105 3110
3106 #endif // V8_TARGET_ARCH_IA32 3111 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698