Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: src/builtins/mips64/builtins-mips64.cc

Issue 2636143002: [builtins] CompileLazy bailed out to the runtime entirely too often. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, 1348 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex,
1349 &gotta_call_runtime_no_stack); 1349 &gotta_call_runtime_no_stack);
1350 1350
1351 __ push(argument_count); 1351 __ push(argument_count);
1352 __ push(new_target); 1352 __ push(new_target);
1353 __ push(closure); 1353 __ push(closure);
1354 1354
1355 __ ld(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1355 __ ld(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1356 __ ld(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); 1356 __ ld(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
1357 __ ld(index, FieldMemOperand(map, FixedArray::kLengthOffset)); 1357 __ ld(index, FieldMemOperand(map, FixedArray::kLengthOffset));
1358 __ Branch(&gotta_call_runtime, lt, index, Operand(Smi::FromInt(2))); 1358 __ Branch(&try_shared, lt, index, Operand(Smi::FromInt(2)));
1359 1359
1360 // a3 : native context 1360 // a3 : native context
1361 // a2 : length / index 1361 // a2 : length / index
1362 // a0 : optimized code map 1362 // a0 : optimized code map
1363 // stack[0] : new target 1363 // stack[0] : new target
1364 // stack[4] : closure 1364 // stack[4] : closure
1365 Register native_context = a3; 1365 Register native_context = a3;
1366 __ ld(native_context, NativeContextMemOperand()); 1366 __ ld(native_context, NativeContextMemOperand());
1367 1367
1368 __ bind(&loop_top); 1368 __ bind(&loop_top);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 __ mov(closure, a5); 1413 __ mov(closure, a5);
1414 __ pop(new_target); 1414 __ pop(new_target);
1415 __ pop(argument_count); 1415 __ pop(argument_count);
1416 __ Jump(entry); 1416 __ Jump(entry);
1417 1417
1418 __ bind(&loop_bottom); 1418 __ bind(&loop_bottom);
1419 __ Dsubu(index, index, 1419 __ Dsubu(index, index,
1420 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); 1420 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength)));
1421 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); 1421 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1)));
1422 1422
1423 // We found no code. 1423 // We found no code. Try the SharedFunctionInfo.
1424 __ jmp(&gotta_call_runtime);
1425
1426 __ bind(&try_shared); 1424 __ bind(&try_shared);
1427 __ pop(closure); 1425 __ pop(closure);
1428 __ pop(new_target); 1426 __ pop(new_target);
1429 __ pop(argument_count); 1427 __ pop(argument_count);
1430 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1428 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1431 // Is the shared function marked for tier up? 1429 // Is the shared function marked for tier up?
1432 __ lbu(a5, FieldMemOperand(entry, 1430 __ lbu(a5, FieldMemOperand(entry,
1433 SharedFunctionInfo::kMarkedForTierUpByteOffset)); 1431 SharedFunctionInfo::kMarkedForTierUpByteOffset));
1434 __ And(a5, a5, 1432 __ And(a5, a5,
1435 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); 1433 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte));
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 __ break_(0xCC); 2986 __ break_(0xCC);
2989 } 2987 }
2990 } 2988 }
2991 2989
2992 #undef __ 2990 #undef __
2993 2991
2994 } // namespace internal 2992 } // namespace internal
2995 } // namespace v8 2993 } // namespace v8
2996 2994
2997 #endif // V8_TARGET_ARCH_MIPS64 2995 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698