| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 __ mov(this->name(), Immediate(name)); | 347 __ mov(this->name(), Immediate(name)); |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 | 350 |
| 351 | 351 |
| 352 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { | 352 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { |
| 353 __ mov(this->name(), Immediate(name)); | 353 __ mov(this->name(), Immediate(name)); |
| 354 } | 354 } |
| 355 | 355 |
| 356 | 356 |
| 357 void NamedStoreHandlerCompiler::GeneratePushMap(Register map_reg, |
| 358 Register scratch) { |
| 359 // Get the return address, push the argument and then continue. |
| 360 __ pop(scratch); |
| 361 __ push(map_reg); |
| 362 __ push(scratch); |
| 363 } |
| 364 |
| 365 |
| 357 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, | 366 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, |
| 367 Register map_reg, |
| 358 Register scratch, | 368 Register scratch, |
| 359 Label* miss) { | 369 Label* miss) { |
| 360 Handle<WeakCell> cell = Map::WeakCellForMap(transition); | 370 Handle<WeakCell> cell = Map::WeakCellForMap(transition); |
| 361 Register map_reg = StoreTransitionDescriptor::MapRegister(); | |
| 362 DCHECK(!map_reg.is(scratch)); | 371 DCHECK(!map_reg.is(scratch)); |
| 363 __ LoadWeakValue(map_reg, cell, miss); | 372 __ LoadWeakValue(map_reg, cell, miss); |
| 364 if (transition->CanBeDeprecated()) { | 373 if (transition->CanBeDeprecated()) { |
| 365 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); | 374 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); |
| 366 __ and_(scratch, Immediate(Map::Deprecated::kMask)); | 375 __ and_(scratch, Immediate(Map::Deprecated::kMask)); |
| 367 __ j(not_zero, miss); | 376 __ j(not_zero, miss); |
| 368 } | 377 } |
| 369 } | 378 } |
| 370 | 379 |
| 371 | 380 |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 // Return the generated code. | 814 // Return the generated code. |
| 806 return GetCode(kind(), Code::NORMAL, name); | 815 return GetCode(kind(), Code::NORMAL, name); |
| 807 } | 816 } |
| 808 | 817 |
| 809 | 818 |
| 810 #undef __ | 819 #undef __ |
| 811 } // namespace internal | 820 } // namespace internal |
| 812 } // namespace v8 | 821 } // namespace v8 |
| 813 | 822 |
| 814 #endif // V8_TARGET_ARCH_X87 | 823 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |