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 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 // the stack pointer. | 2488 // the stack pointer. |
2489 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); | 2489 ASSERT(reg_code >= 0 && reg_code < kNumSafepointRegisters); |
2490 return kNumSafepointRegisters - reg_code - 1; | 2490 return kNumSafepointRegisters - reg_code - 1; |
2491 } | 2491 } |
2492 | 2492 |
2493 | 2493 |
2494 void MacroAssembler::LoadHeapObject(Register result, | 2494 void MacroAssembler::LoadHeapObject(Register result, |
2495 Handle<HeapObject> object) { | 2495 Handle<HeapObject> object) { |
2496 AllowDeferredHandleDereference embedding_raw_address; | 2496 AllowDeferredHandleDereference embedding_raw_address; |
2497 if (isolate()->heap()->InNewSpace(*object)) { | 2497 if (isolate()->heap()->InNewSpace(*object)) { |
2498 Handle<JSGlobalPropertyCell> cell = | 2498 Handle<Cell> cell = isolate()->factory()->NewCell(object); |
2499 isolate()->factory()->NewJSGlobalPropertyCell(object); | |
2500 mov(result, Operand::Cell(cell)); | 2499 mov(result, Operand::Cell(cell)); |
2501 } else { | 2500 } else { |
2502 mov(result, object); | 2501 mov(result, object); |
2503 } | 2502 } |
2504 } | 2503 } |
2505 | 2504 |
2506 | 2505 |
2507 void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) { | 2506 void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) { |
2508 AllowDeferredHandleDereference using_raw_address; | 2507 AllowDeferredHandleDereference using_raw_address; |
2509 if (isolate()->heap()->InNewSpace(*object)) { | 2508 if (isolate()->heap()->InNewSpace(*object)) { |
2510 Handle<JSGlobalPropertyCell> cell = | 2509 Handle<Cell> cell = isolate()->factory()->NewCell(object); |
2511 isolate()->factory()->NewJSGlobalPropertyCell(object); | |
2512 cmp(reg, Operand::Cell(cell)); | 2510 cmp(reg, Operand::Cell(cell)); |
2513 } else { | 2511 } else { |
2514 cmp(reg, object); | 2512 cmp(reg, object); |
2515 } | 2513 } |
2516 } | 2514 } |
2517 | 2515 |
2518 | 2516 |
2519 void MacroAssembler::PushHeapObject(Handle<HeapObject> object) { | 2517 void MacroAssembler::PushHeapObject(Handle<HeapObject> object) { |
2520 AllowDeferredHandleDereference using_raw_address; | 2518 AllowDeferredHandleDereference using_raw_address; |
2521 if (isolate()->heap()->InNewSpace(*object)) { | 2519 if (isolate()->heap()->InNewSpace(*object)) { |
2522 Handle<JSGlobalPropertyCell> cell = | 2520 Handle<Cell> cell = isolate()->factory()->NewCell(object); |
2523 isolate()->factory()->NewJSGlobalPropertyCell(object); | |
2524 push(Operand::Cell(cell)); | 2521 push(Operand::Cell(cell)); |
2525 } else { | 2522 } else { |
2526 Push(object); | 2523 Push(object); |
2527 } | 2524 } |
2528 } | 2525 } |
2529 | 2526 |
2530 | 2527 |
2531 void MacroAssembler::Ret() { | 2528 void MacroAssembler::Ret() { |
2532 ret(0); | 2529 ret(0); |
2533 } | 2530 } |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3151 j(greater, &no_info_available); | 3148 j(greater, &no_info_available); |
3152 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 3149 cmp(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
3153 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); | 3150 Immediate(Handle<Map>(isolate()->heap()->allocation_site_info_map()))); |
3154 bind(&no_info_available); | 3151 bind(&no_info_available); |
3155 } | 3152 } |
3156 | 3153 |
3157 | 3154 |
3158 } } // namespace v8::internal | 3155 } } // namespace v8::internal |
3159 | 3156 |
3160 #endif // V8_TARGET_ARCH_IA32 | 3157 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |