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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 1542963002: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: [arm64] Poke does not preserve flags with --debug-code. Created 4 years, 12 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/arm64/builtins-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('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/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 // Fast-case: The {function} must be a valid JSFunction. 1543 // Fast-case: The {function} must be a valid JSFunction.
1544 __ Bind(&fast_case); 1544 __ Bind(&fast_case);
1545 __ JumpIfSmi(function, &slow_case); 1545 __ JumpIfSmi(function, &slow_case);
1546 __ JumpIfNotObjectType(function, function_map, scratch, JS_FUNCTION_TYPE, 1546 __ JumpIfNotObjectType(function, function_map, scratch, JS_FUNCTION_TYPE,
1547 &slow_case); 1547 &slow_case);
1548 1548
1549 // Ensure that {function} has an instance prototype. 1549 // Ensure that {function} has an instance prototype.
1550 __ Ldrb(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset)); 1550 __ Ldrb(scratch, FieldMemOperand(function_map, Map::kBitFieldOffset));
1551 __ Tbnz(scratch, Map::kHasNonInstancePrototype, &slow_case); 1551 __ Tbnz(scratch, Map::kHasNonInstancePrototype, &slow_case);
1552 1552
1553 // Ensure that {function} is not bound.
1554 Register const shared_info = scratch;
1555 Register const scratch_w = scratch.W();
1556 __ Ldr(shared_info,
1557 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
1558 // On 64-bit platforms, compiler hints field is not a smi. See definition of
1559 // kCompilerHintsOffset in src/objects.h.
1560 __ Ldr(scratch_w, FieldMemOperand(shared_info,
1561 SharedFunctionInfo::kCompilerHintsOffset));
1562 __ Tbnz(scratch_w, SharedFunctionInfo::kBoundFunction, &slow_case);
1563
1564 // Get the "prototype" (or initial map) of the {function}. 1553 // Get the "prototype" (or initial map) of the {function}.
1565 __ Ldr(function_prototype, 1554 __ Ldr(function_prototype,
1566 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 1555 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
1567 __ AssertNotSmi(function_prototype); 1556 __ AssertNotSmi(function_prototype);
1568 1557
1569 // Resolve the prototype if the {function} has an initial map. Afterwards the 1558 // Resolve the prototype if the {function} has an initial map. Afterwards the
1570 // {function_prototype} will be either the JSReceiver prototype object or the 1559 // {function_prototype} will be either the JSReceiver prototype object or the
1571 // hole value, which means that no instances of the {function} were created so 1560 // hole value, which means that no instances of the {function} were created so
1572 // far and hence we should return false. 1561 // far and hence we should return false.
1573 Label function_prototype_valid; 1562 Label function_prototype_valid;
(...skipping 4276 matching lines...) Expand 10 before | Expand all | Expand 10 after
5850 MemOperand(fp, 6 * kPointerSize), NULL); 5839 MemOperand(fp, 6 * kPointerSize), NULL);
5851 } 5840 }
5852 5841
5853 5842
5854 #undef __ 5843 #undef __
5855 5844
5856 } // namespace internal 5845 } // namespace internal
5857 } // namespace v8 5846 } // namespace v8
5858 5847
5859 #endif // V8_TARGET_ARCH_ARM64 5848 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698