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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 320 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
321 Handle<Name> name) { | 321 Handle<Name> name) { |
322 if (!label->is_unused()) { | 322 if (!label->is_unused()) { |
323 __ bind(label); | 323 __ bind(label); |
324 __ mov(this->name(), Operand(name)); | 324 __ mov(this->name(), Operand(name)); |
325 } | 325 } |
326 } | 326 } |
327 | 327 |
328 | 328 |
329 void NamedStoreHandlerCompiler::GenerateRestoreNameAndMap( | 329 void NamedStoreHandlerCompiler::GenerateRestoreName(Handle<Name> name) { |
330 Handle<Name> name, Handle<Map> transition) { | |
331 __ mov(this->name(), Operand(name)); | 330 __ mov(this->name(), Operand(name)); |
332 __ mov(StoreTransitionDescriptor::MapRegister(), Operand(transition)); | |
333 } | 331 } |
334 | 332 |
335 | 333 |
| 334 void NamedStoreHandlerCompiler::GenerateRestoreMap(Handle<Map> transition, |
| 335 Register scratch, |
| 336 Label* miss) { |
| 337 Handle<WeakCell> cell = Map::WeakCellForMap(transition); |
| 338 Register map_reg = StoreTransitionDescriptor::MapRegister(); |
| 339 DCHECK(!map_reg.is(scratch)); |
| 340 __ LoadWeakValue(map_reg, cell, miss); |
| 341 if (transition->CanBeDeprecated()) { |
| 342 __ ldr(scratch, FieldMemOperand(map_reg, Map::kBitField3Offset)); |
| 343 __ tst(scratch, Operand(Map::Deprecated::kMask)); |
| 344 __ b(ne, miss); |
| 345 } |
| 346 } |
| 347 |
| 348 |
336 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, | 349 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, |
337 Register value_reg, | 350 Register value_reg, |
338 Label* miss_label) { | 351 Label* miss_label) { |
339 __ Move(scratch1(), handle(constant, isolate())); | 352 __ Move(scratch1(), handle(constant, isolate())); |
340 __ cmp(value_reg, scratch1()); | 353 __ cmp(value_reg, scratch1()); |
341 __ b(ne, miss_label); | 354 __ b(ne, miss_label); |
342 } | 355 } |
343 | 356 |
344 | 357 |
345 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | 358 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 // Return the generated code. | 692 // Return the generated code. |
680 return GetCode(kind(), Code::NORMAL, name); | 693 return GetCode(kind(), Code::NORMAL, name); |
681 } | 694 } |
682 | 695 |
683 | 696 |
684 #undef __ | 697 #undef __ |
685 } | 698 } |
686 } // namespace v8::internal | 699 } // namespace v8::internal |
687 | 700 |
688 #endif // V8_TARGET_ARCH_ARM | 701 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |