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

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

Issue 1692713005: ES6: Desugaring of instanceof to support @@hasInstance (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@blah
Patch Set: Code comments. Created 4 years, 10 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/runtime/runtime.h ('k') | test/mjsunit/messages.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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 231
232 RUNTIME_FUNCTION(Runtime_IsConstructor) { 232 RUNTIME_FUNCTION(Runtime_IsConstructor) {
233 SealHandleScope shs(isolate); 233 SealHandleScope shs(isolate);
234 DCHECK_EQ(1, args.length()); 234 DCHECK_EQ(1, args.length());
235 CONVERT_ARG_CHECKED(Object, object, 0); 235 CONVERT_ARG_CHECKED(Object, object, 0);
236 return isolate->heap()->ToBoolean(object->IsConstructor()); 236 return isolate->heap()->ToBoolean(object->IsConstructor());
237 } 237 }
238 238
239 RUNTIME_FUNCTION(Runtime_IsCallable) {
240 SealHandleScope shs(isolate);
241 DCHECK_EQ(1, args.length());
242 CONVERT_ARG_CHECKED(Object, object, 0);
243 // PrintF("object %p is callable %d\n", (void*) object, object->IsCallable());
Benedikt Meurer 2016/02/18 05:09:44 Nit: Remove this PrintF
mvstanton 2016/02/18 21:19:15 Doh...actually removed the whole function as Dan p
244 return isolate->heap()->ToBoolean(object->IsCallable());
245 }
239 246
240 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { 247 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) {
241 SealHandleScope shs(isolate); 248 SealHandleScope shs(isolate);
242 RUNTIME_ASSERT(args.length() == 1); 249 RUNTIME_ASSERT(args.length() == 1);
243 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 250 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
244 251
245 if (object->IsJSFunction()) { 252 if (object->IsJSFunction()) {
246 JSFunction* func = JSFunction::cast(*object); 253 JSFunction* func = JSFunction::cast(*object);
247 func->shared()->set_force_inline(true); 254 func->shared()->set_force_inline(true);
248 } 255 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 DCHECK_EQ(1, args.length()); 363 DCHECK_EQ(1, args.length());
357 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 364 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
358 return function->IsJSBoundFunction() 365 return function->IsJSBoundFunction()
359 ? *JSBoundFunction::ToString( 366 ? *JSBoundFunction::ToString(
360 Handle<JSBoundFunction>::cast(function)) 367 Handle<JSBoundFunction>::cast(function))
361 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 368 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
362 } 369 }
363 370
364 } // namespace internal 371 } // namespace internal
365 } // namespace v8 372 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698