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/arm64/code-stubs-arm64.cc

Issue 1552473002: Revert of [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: 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
1553 // Get the "prototype" (or initial map) of the {function}. 1564 // Get the "prototype" (or initial map) of the {function}.
1554 __ Ldr(function_prototype, 1565 __ Ldr(function_prototype,
1555 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 1566 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
1556 __ AssertNotSmi(function_prototype); 1567 __ AssertNotSmi(function_prototype);
1557 1568
1558 // Resolve the prototype if the {function} has an initial map. Afterwards the 1569 // Resolve the prototype if the {function} has an initial map. Afterwards the
1559 // {function_prototype} will be either the JSReceiver prototype object or the 1570 // {function_prototype} will be either the JSReceiver prototype object or the
1560 // hole value, which means that no instances of the {function} were created so 1571 // hole value, which means that no instances of the {function} were created so
1561 // far and hence we should return false. 1572 // far and hence we should return false.
1562 Label function_prototype_valid; 1573 Label function_prototype_valid;
(...skipping 4276 matching lines...) Expand 10 before | Expand all | Expand 10 after
5839 MemOperand(fp, 6 * kPointerSize), NULL); 5850 MemOperand(fp, 6 * kPointerSize), NULL);
5840 } 5851 }
5841 5852
5842 5853
5843 #undef __ 5854 #undef __
5844 5855
5845 } // namespace internal 5856 } // namespace internal
5846 } // namespace v8 5857 } // namespace v8
5847 5858
5848 #endif // V8_TARGET_ARCH_ARM64 5859 #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