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

Side by Side Diff: src/builtins/mips/builtins-mips.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/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, 1357 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex,
1358 &gotta_call_runtime_no_stack); 1358 &gotta_call_runtime_no_stack);
1359 1359
1360 __ push(argument_count); 1360 __ push(argument_count);
1361 __ push(new_target); 1361 __ push(new_target);
1362 __ push(closure); 1362 __ push(closure);
1363 1363
1364 __ lw(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1364 __ lw(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1365 __ lw(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); 1365 __ lw(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
1366 __ lw(index, FieldMemOperand(map, FixedArray::kLengthOffset)); 1366 __ lw(index, FieldMemOperand(map, FixedArray::kLengthOffset));
1367 __ Branch(&gotta_call_runtime, lt, index, Operand(Smi::FromInt(2))); 1367 __ Branch(&try_shared, lt, index, Operand(Smi::FromInt(2)));
1368 1368
1369 // a3 : native context 1369 // a3 : native context
1370 // a2 : length / index 1370 // a2 : length / index
1371 // a0 : optimized code map 1371 // a0 : optimized code map
1372 // stack[0] : new target 1372 // stack[0] : new target
1373 // stack[4] : closure 1373 // stack[4] : closure
1374 Register native_context = a3; 1374 Register native_context = a3;
1375 __ lw(native_context, NativeContextMemOperand()); 1375 __ lw(native_context, NativeContextMemOperand());
1376 1376
1377 __ bind(&loop_top); 1377 __ bind(&loop_top);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 __ mov(closure, t1); 1422 __ mov(closure, t1);
1423 __ pop(new_target); 1423 __ pop(new_target);
1424 __ pop(argument_count); 1424 __ pop(argument_count);
1425 __ Jump(entry); 1425 __ Jump(entry);
1426 1426
1427 __ bind(&loop_bottom); 1427 __ bind(&loop_bottom);
1428 __ Subu(index, index, 1428 __ Subu(index, index,
1429 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); 1429 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength)));
1430 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); 1430 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1)));
1431 1431
1432 // We found no code. 1432 // We found no code. Try the SharedFunctionInfo.
1433 __ jmp(&gotta_call_runtime);
1434
1435 __ bind(&try_shared); 1433 __ bind(&try_shared);
1436 __ pop(closure); 1434 __ pop(closure);
1437 __ pop(new_target); 1435 __ pop(new_target);
1438 __ pop(argument_count); 1436 __ pop(argument_count);
1439 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1437 __ lw(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1440 // Is the shared function marked for tier up? 1438 // Is the shared function marked for tier up?
1441 __ lbu(t1, FieldMemOperand(entry, 1439 __ lbu(t1, FieldMemOperand(entry,
1442 SharedFunctionInfo::kMarkedForTierUpByteOffset)); 1440 SharedFunctionInfo::kMarkedForTierUpByteOffset));
1443 __ And(t1, t1, 1441 __ And(t1, t1,
1444 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); 1442 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte));
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
2962 __ break_(0xCC); 2960 __ break_(0xCC);
2963 } 2961 }
2964 } 2962 }
2965 2963
2966 #undef __ 2964 #undef __
2967 2965
2968 } // namespace internal 2966 } // namespace internal
2969 } // namespace v8 2967 } // namespace v8
2970 2968
2971 #endif // V8_TARGET_ARCH_MIPS 2969 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698