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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 __ Daddu(array_pointer, map, Operand(at)); | 1306 __ Daddu(array_pointer, map, Operand(at)); |
1307 __ ld(temp, FieldMemOperand(array_pointer, | 1307 __ ld(temp, FieldMemOperand(array_pointer, |
1308 SharedFunctionInfo::kOffsetToPreviousContext)); | 1308 SharedFunctionInfo::kOffsetToPreviousContext)); |
1309 __ ld(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); | 1309 __ ld(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); |
1310 __ Branch(&loop_bottom, ne, temp, Operand(native_context)); | 1310 __ Branch(&loop_bottom, ne, temp, Operand(native_context)); |
1311 // OSR id set to none? | 1311 // OSR id set to none? |
1312 __ ld(temp, FieldMemOperand(array_pointer, | 1312 __ ld(temp, FieldMemOperand(array_pointer, |
1313 SharedFunctionInfo::kOffsetToPreviousOsrAstId)); | 1313 SharedFunctionInfo::kOffsetToPreviousOsrAstId)); |
1314 const int bailout_id = BailoutId::None().ToInt(); | 1314 const int bailout_id = BailoutId::None().ToInt(); |
1315 __ Branch(&loop_bottom, ne, temp, Operand(Smi::FromInt(bailout_id))); | 1315 __ Branch(&loop_bottom, ne, temp, Operand(Smi::FromInt(bailout_id))); |
1316 | |
1317 // Literals available? | 1316 // Literals available? |
1318 Label got_literals, maybe_cleared_weakcell; | |
1319 __ ld(temp, FieldMemOperand(array_pointer, | 1317 __ ld(temp, FieldMemOperand(array_pointer, |
1320 SharedFunctionInfo::kOffsetToPreviousLiterals)); | 1318 SharedFunctionInfo::kOffsetToPreviousLiterals)); |
1321 // temp contains either a WeakCell pointing to the literals array or the | |
1322 // literals array directly. | |
1323 __ ld(a4, FieldMemOperand(temp, WeakCell::kValueOffset)); | |
1324 __ JumpIfSmi(a4, &maybe_cleared_weakcell); | |
1325 // a4 is a pointer, therefore temp is a WeakCell pointing to a literals array. | |
1326 __ ld(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); | 1319 __ ld(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); |
1327 __ jmp(&got_literals); | 1320 __ JumpIfSmi(temp, &gotta_call_runtime); |
1328 | |
1329 // a4 is a smi. If it's 0, then we are looking at a cleared WeakCell | |
1330 // around the literals array, and we should visit the runtime. If it's > 0, | |
1331 // then temp already contains the literals array. | |
1332 __ bind(&maybe_cleared_weakcell); | |
1333 __ Branch(&gotta_call_runtime, eq, a4, Operand(Smi::FromInt(0))); | |
1334 | 1321 |
1335 // Save the literals in the closure. | 1322 // Save the literals in the closure. |
1336 __ bind(&got_literals); | |
1337 __ ld(a4, MemOperand(sp, 0)); | 1323 __ ld(a4, MemOperand(sp, 0)); |
1338 __ sd(temp, FieldMemOperand(a4, JSFunction::kLiteralsOffset)); | 1324 __ sd(temp, FieldMemOperand(a4, JSFunction::kLiteralsOffset)); |
1339 __ push(index); | 1325 __ push(index); |
1340 __ RecordWriteField(a4, JSFunction::kLiteralsOffset, temp, index, | 1326 __ RecordWriteField(a4, JSFunction::kLiteralsOffset, temp, index, |
1341 kRAHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET, | 1327 kRAHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET, |
1342 OMIT_SMI_CHECK); | 1328 OMIT_SMI_CHECK); |
1343 __ pop(index); | 1329 __ pop(index); |
1344 | 1330 |
1345 // Code available? | 1331 // Code available? |
1346 Register entry = a4; | 1332 Register entry = a4; |
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3009 __ break_(0xCC); | 2995 __ break_(0xCC); |
3010 } | 2996 } |
3011 } | 2997 } |
3012 | 2998 |
3013 #undef __ | 2999 #undef __ |
3014 | 3000 |
3015 } // namespace internal | 3001 } // namespace internal |
3016 } // namespace v8 | 3002 } // namespace v8 |
3017 | 3003 |
3018 #endif // V8_TARGET_ARCH_MIPS64 | 3004 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |