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

Side by Side Diff: src/runtime/runtime-proxy.cc

Issue 651223002: Implement inline %_IsJSProxy() for full codegen and Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime/runtime.h ('k') | src/v8natives.js » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/runtime/runtime.h" 8 #include "src/runtime/runtime.h"
9 #include "src/runtime/runtime-utils.h" 9 #include "src/runtime/runtime-utils.h"
10 10
(...skipping 17 matching lines...) Expand all
28 CONVERT_ARG_HANDLE_CHECKED(Object, call_trap, 1); 28 CONVERT_ARG_HANDLE_CHECKED(Object, call_trap, 1);
29 RUNTIME_ASSERT(call_trap->IsJSFunction() || call_trap->IsJSFunctionProxy()); 29 RUNTIME_ASSERT(call_trap->IsJSFunction() || call_trap->IsJSFunctionProxy());
30 CONVERT_ARG_HANDLE_CHECKED(JSFunction, construct_trap, 2); 30 CONVERT_ARG_HANDLE_CHECKED(JSFunction, construct_trap, 2);
31 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 3); 31 CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 3);
32 if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value(); 32 if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value();
33 return *isolate->factory()->NewJSFunctionProxy(handler, call_trap, 33 return *isolate->factory()->NewJSFunctionProxy(handler, call_trap,
34 construct_trap, prototype); 34 construct_trap, prototype);
35 } 35 }
36 36
37 37
38 RUNTIME_FUNCTION(Runtime_IsJSProxy) { 38 RUNTIME_FUNCTION(RuntimeReference_IsJSProxy) {
39 SealHandleScope shs(isolate); 39 SealHandleScope shs(isolate);
40 DCHECK(args.length() == 1); 40 DCHECK(args.length() == 1);
41 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); 41 CONVERT_ARG_CHECKED(Object, obj, 0);
42 return isolate->heap()->ToBoolean(obj->IsJSProxy()); 42 return isolate->heap()->ToBoolean(obj->IsJSProxy());
43 } 43 }
44 44
45 45
46 RUNTIME_FUNCTION(Runtime_IsJSFunctionProxy) { 46 RUNTIME_FUNCTION(Runtime_IsJSFunctionProxy) {
47 SealHandleScope shs(isolate); 47 SealHandleScope shs(isolate);
48 DCHECK(args.length() == 1); 48 DCHECK(args.length() == 1);
49 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0); 49 CONVERT_ARG_HANDLE_CHECKED(Object, obj, 0);
50 return isolate->heap()->ToBoolean(obj->IsJSFunctionProxy()); 50 return isolate->heap()->ToBoolean(obj->IsJSFunctionProxy());
51 } 51 }
(...skipping 25 matching lines...) Expand all
77 77
78 RUNTIME_FUNCTION(Runtime_Fix) { 78 RUNTIME_FUNCTION(Runtime_Fix) {
79 HandleScope scope(isolate); 79 HandleScope scope(isolate);
80 DCHECK(args.length() == 1); 80 DCHECK(args.length() == 1);
81 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0); 81 CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
82 JSProxy::Fix(proxy); 82 JSProxy::Fix(proxy);
83 return isolate->heap()->undefined_value(); 83 return isolate->heap()->undefined_value();
84 } 84 }
85 } 85 }
86 } // namespace v8::internal 86 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698