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

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

Issue 1499593003: [runtime] [proxy] Implementing [[Call]] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updating comment Created 5 years 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 | « no previous file | src/arm64/builtins-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 1678
1679 Label non_callable, non_function, non_smi; 1679 Label non_callable, non_function, non_smi;
1680 __ JumpIfSmi(r1, &non_callable); 1680 __ JumpIfSmi(r1, &non_callable);
1681 __ bind(&non_smi); 1681 __ bind(&non_smi);
1682 __ CompareObjectType(r1, r4, r5, JS_FUNCTION_TYPE); 1682 __ CompareObjectType(r1, r4, r5, JS_FUNCTION_TYPE);
1683 __ Jump(masm->isolate()->builtins()->CallFunction(mode), 1683 __ Jump(masm->isolate()->builtins()->CallFunction(mode),
1684 RelocInfo::CODE_TARGET, eq); 1684 RelocInfo::CODE_TARGET, eq);
1685 __ cmp(r5, Operand(JS_PROXY_TYPE)); 1685 __ cmp(r5, Operand(JS_PROXY_TYPE));
1686 __ b(ne, &non_function); 1686 __ b(ne, &non_function);
1687 1687
1688 // 1. Call to Proxy. 1688 // 1. Runtime fallback for Proxy [[Call]].
1689 // TODO(neis): Implement [[Call]] on proxies. 1689 __ Push(r1);
1690 // Increase the arguments size to include the pushed function and the
1691 // existing receiver on the stack.
1692 __ add(r0, r0, Operand(2));
1693 // Tail-call to the runtime.
1694 __ JumpToExternalReference(
1695 ExternalReference(Runtime::kJSProxyCall, masm->isolate()));
1690 1696
1691 // 2. Call to something else, which might have a [[Call]] internal method (if 1697 // 2. Call to something else, which might have a [[Call]] internal method (if
1692 // not we raise an exception). 1698 // not we raise an exception).
1693 __ bind(&non_function); 1699 __ bind(&non_function);
1694 // Check if target has a [[Call]] internal method. 1700 // Check if target has a [[Call]] internal method.
1695 __ ldrb(r4, FieldMemOperand(r4, Map::kBitFieldOffset)); 1701 __ ldrb(r4, FieldMemOperand(r4, Map::kBitFieldOffset));
1696 __ tst(r4, Operand(1 << Map::kIsCallable)); 1702 __ tst(r4, Operand(1 << Map::kIsCallable));
1697 __ b(eq, &non_callable); 1703 __ b(eq, &non_callable);
1698 // Overwrite the original receiver the (original) target. 1704 // Overwrite the original receiver the (original) target.
1699 __ str(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); 1705 __ str(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2));
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 } 1943 }
1938 } 1944 }
1939 1945
1940 1946
1941 #undef __ 1947 #undef __
1942 1948
1943 } // namespace internal 1949 } // namespace internal
1944 } // namespace v8 1950 } // namespace v8
1945 1951
1946 #endif // V8_TARGET_ARCH_ARM 1952 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698