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