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

Side by Side Diff: src/mips/builtins-mips.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/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 // ----------------------------------- 1687 // -----------------------------------
1688 1688
1689 Label non_callable, non_function, non_smi; 1689 Label non_callable, non_function, non_smi;
1690 __ JumpIfSmi(a1, &non_callable); 1690 __ JumpIfSmi(a1, &non_callable);
1691 __ bind(&non_smi); 1691 __ bind(&non_smi);
1692 __ GetObjectType(a1, t1, t2); 1692 __ GetObjectType(a1, t1, t2);
1693 __ Jump(masm->isolate()->builtins()->CallFunction(mode), 1693 __ Jump(masm->isolate()->builtins()->CallFunction(mode),
1694 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE)); 1694 RelocInfo::CODE_TARGET, eq, t2, Operand(JS_FUNCTION_TYPE));
1695 __ Branch(&non_function, ne, t2, Operand(JS_PROXY_TYPE)); 1695 __ Branch(&non_function, ne, t2, Operand(JS_PROXY_TYPE));
1696 1696
1697 // 1. Call Proxy. 1697 // 1. Runtime fallback for Proxy [[Call]].
1698 // TODO(neis): implement call on Proxy 1698 __ Push(a1);
1699 // Increase the arguments size to include the pushed function and the
1700 // existing receiver on the stack.
1701 __ Addu(a0, a0, 2);
1702 // Tail-call to the runtime.
1703 __ JumpToExternalReference(
1704 ExternalReference(Runtime::kJSProxyCall, masm->isolate()));
1699 1705
1700 // 2. Call to something else, which might have a [[Call]] internal method (if 1706 // 2. Call to something else, which might have a [[Call]] internal method (if
1701 // not we raise an exception). 1707 // not we raise an exception).
1702 __ bind(&non_function); 1708 __ bind(&non_function);
1703 // Check if target has a [[Call]] internal method. 1709 // Check if target has a [[Call]] internal method.
1704 __ lbu(t1, FieldMemOperand(t1, Map::kBitFieldOffset)); 1710 __ lbu(t1, FieldMemOperand(t1, Map::kBitFieldOffset));
1705 __ And(t1, t1, Operand(1 << Map::kIsCallable)); 1711 __ And(t1, t1, Operand(1 << Map::kIsCallable));
1706 __ Branch(&non_callable, eq, t1, Operand(zero_reg)); 1712 __ Branch(&non_callable, eq, t1, Operand(zero_reg));
1707 // Overwrite the original receiver with the (original) target. 1713 // Overwrite the original receiver with the (original) target.
1708 __ sll(at, a0, kPointerSizeLog2); 1714 __ sll(at, a0, kPointerSizeLog2);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 } 1966 }
1961 } 1967 }
1962 1968
1963 1969
1964 #undef __ 1970 #undef __
1965 1971
1966 } // namespace internal 1972 } // namespace internal
1967 } // namespace v8 1973 } // namespace v8
1968 1974
1969 #endif // V8_TARGET_ARCH_MIPS 1975 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698