OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 __ mov(this->name(), Immediate(name)); | 355 __ mov(this->name(), Immediate(name)); |
356 } | 356 } |
357 } | 357 } |
358 | 358 |
359 | 359 |
360 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { | 360 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { |
361 __ mov(this->name(), Immediate(name)); | 361 __ mov(this->name(), Immediate(name)); |
362 } | 362 } |
363 | 363 |
364 | 364 |
365 void NamedStoreHandlerCompiler::GeneratePushMap(Register map_reg, | 365 void NamedStoreHandlerCompiler::RearrangeVectorAndSlot( |
366 Register scratch) { | 366 Register current_map, Register destination_map) { |
367 // current after GeneratePushMap | 367 DCHECK(destination_map.is(StoreTransitionHelper::MapRegister())); |
368 // ------------------------------------------------- | 368 DCHECK(current_map.is(StoreTransitionHelper::VectorRegister())); |
369 // ret addr slot | 369 ExternalReference virtual_slot = |
370 // vector vector | 370 ExternalReference::virtual_slot_register(isolate()); |
371 // sp -> slot map | 371 __ mov(destination_map, current_map); |
372 // sp -> ret addr | 372 __ pop(current_map); |
373 // | 373 __ mov(Operand::StaticVariable(virtual_slot), current_map); |
374 __ xchg(map_reg, Operand(esp, 0)); | 374 __ pop(current_map); // put vector in place. |
375 __ xchg(map_reg, Operand(esp, 2 * kPointerSize)); | |
376 __ push(map_reg); | |
377 } | 375 } |
378 | 376 |
379 | 377 |
380 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, | 378 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, |
381 Register map_reg, | 379 Register map_reg, |
382 Register scratch, | 380 Register scratch, |
383 Label* miss) { | 381 Label* miss) { |
384 Handle<WeakCell> cell = Map::WeakCellForMap(transition); | 382 Handle<WeakCell> cell = Map::WeakCellForMap(transition); |
385 DCHECK(!map_reg.is(scratch)); | 383 DCHECK(!map_reg.is(scratch)); |
386 __ LoadWeakValue(map_reg, cell, miss); | 384 __ LoadWeakValue(map_reg, cell, miss); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 // Return the generated code. | 821 // Return the generated code. |
824 return GetCode(kind(), Code::NORMAL, name); | 822 return GetCode(kind(), Code::NORMAL, name); |
825 } | 823 } |
826 | 824 |
827 | 825 |
828 #undef __ | 826 #undef __ |
829 } // namespace internal | 827 } // namespace internal |
830 } // namespace v8 | 828 } // namespace v8 |
831 | 829 |
832 #endif // V8_TARGET_ARCH_X87 | 830 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |