OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 323 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
324 Handle<Name> name) { | 324 Handle<Name> name) { |
325 if (!label->is_unused()) { | 325 if (!label->is_unused()) { |
326 __ bind(label); | 326 __ bind(label); |
327 __ mov(this->name(), Immediate(name)); | 327 __ mov(this->name(), Immediate(name)); |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 | 331 |
332 void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap( | 332 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { |
333 Handle<Name> name, Handle<Map> transition) { | |
334 __ mov(this->name(), Immediate(name)); | 333 __ mov(this->name(), Immediate(name)); |
335 __ mov(StoreTransitionDescriptor::MapRegister(), Immediate(transition)); | |
336 } | 334 } |
337 | 335 |
338 | 336 |
| 337 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, |
| 338 Register scratch, |
| 339 Label* miss) { |
| 340 Handle<WeakCell> cell = Map::WeakCellForMap(transition); |
| 341 Register map_reg = StoreTransitionDescriptor::MapRegister(); |
| 342 DCHECK(!map_reg.is(scratch)); |
| 343 __ LoadWeakValue(map_reg, cell, miss); |
| 344 if (transition->CanBeDeprecated()) { |
| 345 __ mov(scratch, FieldOperand(map_reg, Map::kBitField3Offset)); |
| 346 __ and_(scratch, Immediate(Map::Deprecated::kMask)); |
| 347 __ j(not_zero, miss); |
| 348 } |
| 349 } |
| 350 |
| 351 |
339 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, | 352 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, |
340 Register value_reg, | 353 Register value_reg, |
341 Label* miss_label) { | 354 Label* miss_label) { |
342 __ CmpObject(value_reg, handle(constant, isolate())); | 355 __ CmpObject(value_reg, handle(constant, isolate())); |
343 __ j(not_equal, miss_label); | 356 __ j(not_equal, miss_label); |
344 } | 357 } |
345 | 358 |
346 | 359 |
347 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | 360 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, |
348 Register value_reg, | 361 Register value_reg, |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 // Return the generated code. | 711 // Return the generated code. |
699 return GetCode(kind(), Code::NORMAL, name); | 712 return GetCode(kind(), Code::NORMAL, name); |
700 } | 713 } |
701 | 714 |
702 | 715 |
703 #undef __ | 716 #undef __ |
704 } | 717 } |
705 } // namespace v8::internal | 718 } // namespace v8::internal |
706 | 719 |
707 #endif // V8_TARGET_ARCH_IA32 | 720 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |