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

Side by Side Diff: src/mips64/builtins-mips64.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 | « src/mips/builtins-mips.cc ('k') | src/objects.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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 // ----------------------------------- 1679 // -----------------------------------
1680 1680
1681 Label non_callable, non_function, non_smi; 1681 Label non_callable, non_function, non_smi;
1682 __ JumpIfSmi(a1, &non_callable); 1682 __ JumpIfSmi(a1, &non_callable);
1683 __ bind(&non_smi); 1683 __ bind(&non_smi);
1684 __ GetObjectType(a1, t1, t2); 1684 __ GetObjectType(a1, t1, t2);
1685 __ Jump(masm->isolate()->builtins()->CallFunction(mode), 1685 __ Jump(masm->isolate()->builtins()->CallFunction(mode),
1686 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE)); 1686 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE));
1687 __ Branch(&non_function, ne, t2, Operand(JS_PROXY_TYPE)); 1687 __ Branch(&non_function, ne, t2, Operand(JS_PROXY_TYPE));
1688 1688
1689 // 1. Call to function proxy. 1689 // 1. Runtime fallback for Proxy [[Call]].
1690 // TODO(neis): Implement [[Call]] on proxies. 1690 __ Push(a1);
1691 // Increase the arguments size to include the pushed function and the
1692 // existing receiver on the stack.
1693 __ Daddu(a0, a0, 2);
1694 // Tail-call to the runtime.
1695 __ JumpToExternalReference(
1696 ExternalReference(Runtime::kJSProxyCall, masm->isolate()));
1691 1697
1692 // 2. Call to something else, which might have a [[Call]] internal method (if 1698 // 2. Call to something else, which might have a [[Call]] internal method (if
1693 // not we raise an exception). 1699 // not we raise an exception).
1694 __ bind(&non_function); 1700 __ bind(&non_function);
1695 // Check if target has a [[Call]] internal method. 1701 // Check if target has a [[Call]] internal method.
1696 __ lbu(t1, FieldMemOperand(t1, Map::kBitFieldOffset)); 1702 __ lbu(t1, FieldMemOperand(t1, Map::kBitFieldOffset));
1697 __ And(t1, t1, Operand(1 << Map::kIsCallable)); 1703 __ And(t1, t1, Operand(1 << Map::kIsCallable));
1698 __ Branch(&non_callable, eq, t1, Operand(zero_reg)); 1704 __ Branch(&non_callable, eq, t1, Operand(zero_reg));
1699 // Overwrite the original receiver with the (original) target. 1705 // Overwrite the original receiver with the (original) target.
1700 __ dsll(at, a0, kPointerSizeLog2); 1706 __ dsll(at, a0, kPointerSizeLog2);
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 } 1957 }
1952 } 1958 }
1953 1959
1954 1960
1955 #undef __ 1961 #undef __
1956 1962
1957 } // namespace internal 1963 } // namespace internal
1958 } // namespace v8 1964 } // namespace v8
1959 1965
1960 #endif // V8_TARGET_ARCH_MIPS64 1966 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698