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 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2402 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | 2402 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, |
2403 FAST_HOLEY_SMI_ELEMENTS, | 2403 FAST_HOLEY_SMI_ELEMENTS, |
2404 map_out, | 2404 map_out, |
2405 scratch, | 2405 scratch, |
2406 &done); | 2406 &done); |
2407 } | 2407 } |
2408 bind(&done); | 2408 bind(&done); |
2409 } | 2409 } |
2410 | 2410 |
2411 | 2411 |
| 2412 void MacroAssembler::LoadGlobalContext(Register global_context) { |
| 2413 // Load the global or builtins object from the current context. |
| 2414 mov(global_context, |
| 2415 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 2416 // Load the native context from the global or builtins object. |
| 2417 mov(global_context, |
| 2418 FieldOperand(global_context, GlobalObject::kNativeContextOffset)); |
| 2419 } |
| 2420 |
| 2421 |
2412 void MacroAssembler::LoadGlobalFunction(int index, Register function) { | 2422 void MacroAssembler::LoadGlobalFunction(int index, Register function) { |
2413 // Load the global or builtins object from the current context. | 2423 // Load the global or builtins object from the current context. |
2414 mov(function, | 2424 mov(function, |
2415 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 2425 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
2416 // Load the native context from the global or builtins object. | 2426 // Load the native context from the global or builtins object. |
2417 mov(function, FieldOperand(function, GlobalObject::kNativeContextOffset)); | 2427 mov(function, |
| 2428 FieldOperand(function, GlobalObject::kNativeContextOffset)); |
2418 // Load the function from the native context. | 2429 // Load the function from the native context. |
2419 mov(function, Operand(function, Context::SlotOffset(index))); | 2430 mov(function, Operand(function, Context::SlotOffset(index))); |
2420 } | 2431 } |
2421 | 2432 |
2422 | 2433 |
2423 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, | 2434 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, |
2424 Register map) { | 2435 Register map) { |
2425 // Load the initial map. The global functions all have initial maps. | 2436 // Load the initial map. The global functions all have initial maps. |
2426 mov(map, FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 2437 mov(map, FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
2427 if (emit_debug_code()) { | 2438 if (emit_debug_code()) { |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3081 j(greater, &no_info_available); | 3092 j(greater, &no_info_available); |
3082 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 3093 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
3083 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 3094 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
3084 bind(&no_info_available); | 3095 bind(&no_info_available); |
3085 } | 3096 } |
3086 | 3097 |
3087 | 3098 |
3088 } } // namespace v8::internal | 3099 } } // namespace v8::internal |
3089 | 3100 |
3090 #endif // V8_TARGET_ARCH_IA32 | 3101 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |