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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 Register scratch = scratch2(); | 375 Register scratch = scratch2(); |
376 DCHECK(!value_reg.is(map_reg)); | 376 DCHECK(!value_reg.is(map_reg)); |
377 DCHECK(!value_reg.is(scratch)); | 377 DCHECK(!value_reg.is(scratch)); |
378 __ JumpIfSmi(value_reg, miss_label); | 378 __ JumpIfSmi(value_reg, miss_label); |
379 HeapType::Iterator<Map> it = field_type->Classes(); | 379 HeapType::Iterator<Map> it = field_type->Classes(); |
380 if (!it.Done()) { | 380 if (!it.Done()) { |
381 __ ld(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); | 381 __ ld(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); |
382 Label do_store; | 382 Label do_store; |
383 while (true) { | 383 while (true) { |
384 // Compare map directly within the Branch() functions. | 384 // Compare map directly within the Branch() functions. |
| 385 __ GetWeakValue(scratch, Map::WeakCellForMap(it.Current())); |
385 it.Advance(); | 386 it.Advance(); |
386 __ GetWeakValue(scratch, Map::WeakCellForMap(it.Current())); | |
387 if (it.Done()) { | 387 if (it.Done()) { |
388 __ Branch(miss_label, ne, map_reg, Operand(scratch)); | 388 __ Branch(miss_label, ne, map_reg, Operand(scratch)); |
389 break; | 389 break; |
390 } | 390 } |
391 __ Branch(&do_store, eq, map_reg, Operand(scratch)); | 391 __ Branch(&do_store, eq, map_reg, Operand(scratch)); |
392 } | 392 } |
393 __ bind(&do_store); | 393 __ bind(&do_store); |
394 } | 394 } |
395 } | 395 } |
396 | 396 |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 // Return the generated code. | 728 // Return the generated code. |
729 return GetCode(kind(), Code::NORMAL, name); | 729 return GetCode(kind(), Code::NORMAL, name); |
730 } | 730 } |
731 | 731 |
732 | 732 |
733 #undef __ | 733 #undef __ |
734 } | 734 } |
735 } // namespace v8::internal | 735 } // namespace v8::internal |
736 | 736 |
737 #endif // V8_TARGET_ARCH_MIPS64 | 737 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |