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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 // function without changing the state. | 2540 // function without changing the state. |
2541 // We don't know if t0 is a WeakCell or a Symbol, but it's harmless to read at | 2541 // We don't know if t0 is a WeakCell or a Symbol, but it's harmless to read at |
2542 // this position in a symbol (see static asserts in type-feedback-vector.h). | 2542 // this position in a symbol (see static asserts in type-feedback-vector.h). |
2543 Label check_allocation_site; | 2543 Label check_allocation_site; |
2544 Register feedback_map = t1; | 2544 Register feedback_map = t1; |
2545 Register weak_value = t4; | 2545 Register weak_value = t4; |
2546 __ lw(weak_value, FieldMemOperand(t0, WeakCell::kValueOffset)); | 2546 __ lw(weak_value, FieldMemOperand(t0, WeakCell::kValueOffset)); |
2547 __ Branch(&done, eq, a1, Operand(weak_value)); | 2547 __ Branch(&done, eq, a1, Operand(weak_value)); |
2548 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); | 2548 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); |
2549 __ Branch(&done, eq, t0, Operand(at)); | 2549 __ Branch(&done, eq, t0, Operand(at)); |
2550 __ lw(feedback_map, FieldMemOperand(t0, Heap::kMapOffset)); | 2550 __ lw(feedback_map, FieldMemOperand(t0, HeapObject::kMapOffset)); |
2551 __ LoadRoot(at, Heap::kWeakCellMapRootIndex); | 2551 __ LoadRoot(at, Heap::kWeakCellMapRootIndex); |
2552 __ Branch(FLAG_pretenuring_call_new ? &miss : &check_allocation_site, ne, | 2552 __ Branch(FLAG_pretenuring_call_new ? &miss : &check_allocation_site, ne, |
2553 feedback_map, Operand(at)); | 2553 feedback_map, Operand(at)); |
2554 | 2554 |
2555 // If the weak cell is cleared, we have a new chance to become monomorphic. | 2555 // If the weak cell is cleared, we have a new chance to become monomorphic. |
2556 __ JumpIfSmi(weak_value, &initialize); | 2556 __ JumpIfSmi(weak_value, &initialize); |
2557 __ jmp(&megamorphic); | 2557 __ jmp(&megamorphic); |
2558 | 2558 |
2559 if (!FLAG_pretenuring_call_new) { | 2559 if (!FLAG_pretenuring_call_new) { |
2560 __ bind(&check_allocation_site); | 2560 __ bind(&check_allocation_site); |
(...skipping 2942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5503 kStackUnwindSpace, kInvalidStackOffset, | 5503 kStackUnwindSpace, kInvalidStackOffset, |
5504 MemOperand(fp, 6 * kPointerSize), NULL); | 5504 MemOperand(fp, 6 * kPointerSize), NULL); |
5505 } | 5505 } |
5506 | 5506 |
5507 | 5507 |
5508 #undef __ | 5508 #undef __ |
5509 | 5509 |
5510 } } // namespace v8::internal | 5510 } } // namespace v8::internal |
5511 | 5511 |
5512 #endif // V8_TARGET_ARCH_MIPS | 5512 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |