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

Side by Side Diff: src/builtins/arm64/builtins-arm64.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/arm/builtins-arm.cc ('k') | src/builtins/ia32/builtins-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 1465
1466 __ Bind(&loop_bottom); 1466 __ Bind(&loop_bottom);
1467 __ Sub(index, index, Operand(SharedFunctionInfo::kEntryLength)); 1467 __ Sub(index, index, Operand(SharedFunctionInfo::kEntryLength));
1468 __ Cmp(index, Operand(1)); 1468 __ Cmp(index, Operand(1));
1469 __ B(gt, &loop_top); 1469 __ B(gt, &loop_top);
1470 1470
1471 // We found neither literals nor code. 1471 // We found neither literals nor code.
1472 __ B(&gotta_call_runtime); 1472 __ B(&gotta_call_runtime);
1473 1473
1474 __ Bind(&try_shared); 1474 __ Bind(&try_shared);
1475 // Is the full code valid?
1476 __ Ldr(entry, 1475 __ Ldr(entry,
1477 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1476 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1477 // Is the shared function marked for optimization?
1478 __ Ldrb(temp,
1479 FieldMemOperand(
1480 entry, SharedFunctionInfo::kWasMarkedForOptimizationByteOffset));
1481 __ TestAndBranchIfAnySet(
1482 temp, 1 << SharedFunctionInfo::kWasMarkedForOptimizationBitWithinByte,
1483 &gotta_call_runtime);
1484 // Is the full code valid?
1478 __ Ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); 1485 __ Ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset));
1479 __ Ldr(x5, FieldMemOperand(entry, Code::kFlagsOffset)); 1486 __ Ldr(x5, FieldMemOperand(entry, Code::kFlagsOffset));
1480 __ and_(x5, x5, Operand(Code::KindField::kMask)); 1487 __ and_(x5, x5, Operand(Code::KindField::kMask));
1481 __ Mov(x5, Operand(x5, LSR, Code::KindField::kShift)); 1488 __ Mov(x5, Operand(x5, LSR, Code::KindField::kShift));
1482 __ Cmp(x5, Operand(Code::BUILTIN)); 1489 __ Cmp(x5, Operand(Code::BUILTIN));
1483 __ B(eq, &gotta_call_runtime); 1490 __ B(eq, &gotta_call_runtime);
1484 // Yes, install the full code. 1491 // Yes, install the full code.
1485 __ Add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); 1492 __ Add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
1486 __ Str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); 1493 __ Str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset));
1487 __ RecordWriteCodeEntryField(closure, entry, x5); 1494 __ RecordWriteCodeEntryField(closure, entry, x5);
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
3005 __ Unreachable(); 3012 __ Unreachable();
3006 } 3013 }
3007 } 3014 }
3008 3015
3009 #undef __ 3016 #undef __
3010 3017
3011 } // namespace internal 3018 } // namespace internal
3012 } // namespace v8 3019 } // namespace v8
3013 3020
3014 #endif // V8_TARGET_ARCH_ARM 3021 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698