OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |