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

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

Issue 2437043002: [compiler] Mark shared functions for optimization (Closed)
Patch Set: Unmark after compiling Created 4 years, 2 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/ppc/builtins-ppc.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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); 1464 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength)));
1465 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); 1465 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1)));
1466 1466
1467 // We found neither literals nor code. 1467 // We found neither literals nor code.
1468 __ jmp(&gotta_call_runtime); 1468 __ jmp(&gotta_call_runtime);
1469 1469
1470 __ bind(&try_shared); 1470 __ bind(&try_shared);
1471 __ pop(closure); 1471 __ pop(closure);
1472 __ pop(new_target); 1472 __ pop(new_target);
1473 __ pop(argument_count); 1473 __ pop(argument_count);
1474 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1475 // Is the shared function marked for optimization?
1476 __ lbu(a5,
1477 FieldMemOperand(
1478 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset));
1479 __ And(
1480 a5, a5,
1481 Operand(1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte));
1482 __ Branch(&gotta_call_runtime_no_stack, ne, a5, Operand(zero_reg));
1474 // Is the full code valid? 1483 // Is the full code valid?
1475 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1476 __ ld(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); 1484 __ ld(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset));
1477 __ lw(a5, FieldMemOperand(entry, Code::kFlagsOffset)); 1485 __ lw(a5, FieldMemOperand(entry, Code::kFlagsOffset));
1478 __ And(a5, a5, Operand(Code::KindField::kMask)); 1486 __ And(a5, a5, Operand(Code::KindField::kMask));
1479 __ dsrl(a5, a5, Code::KindField::kShift); 1487 __ dsrl(a5, a5, Code::KindField::kShift);
1480 __ Branch(&gotta_call_runtime_no_stack, eq, a5, Operand(Code::BUILTIN)); 1488 __ Branch(&gotta_call_runtime_no_stack, eq, a5, Operand(Code::BUILTIN));
1481 // Yes, install the full code. 1489 // Yes, install the full code.
1482 __ Daddu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); 1490 __ Daddu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
1483 __ sd(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); 1491 __ sd(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset));
1484 __ RecordWriteCodeEntryField(closure, entry, a5); 1492 __ RecordWriteCodeEntryField(closure, entry, a5);
1485 __ Jump(entry); 1493 __ Jump(entry);
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 __ break_(0xCC); 2985 __ break_(0xCC);
2978 } 2986 }
2979 } 2987 }
2980 2988
2981 #undef __ 2989 #undef __
2982 2990
2983 } // namespace internal 2991 } // namespace internal
2984 } // namespace v8 2992 } // namespace v8
2985 2993
2986 #endif // V8_TARGET_ARCH_MIPS64 2994 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698