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

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: REBASE plus comment response. 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/harmony/instanceof-es6.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
240 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) { 239 RUNTIME_FUNCTION(Runtime_SetForceInlineFlag) {
241 SealHandleScope shs(isolate); 240 SealHandleScope shs(isolate);
242 RUNTIME_ASSERT(args.length() == 1); 241 RUNTIME_ASSERT(args.length() == 1);
243 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 242 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
244 243
245 if (object->IsJSFunction()) { 244 if (object->IsJSFunction()) {
246 JSFunction* func = JSFunction::cast(*object); 245 JSFunction* func = JSFunction::cast(*object);
247 func->shared()->set_force_inline(true); 246 func->shared()->set_force_inline(true);
248 } 247 }
249 return isolate->heap()->undefined_value(); 248 return isolate->heap()->undefined_value();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 DCHECK_EQ(1, args.length()); 355 DCHECK_EQ(1, args.length());
357 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 356 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
358 return function->IsJSBoundFunction() 357 return function->IsJSBoundFunction()
359 ? *JSBoundFunction::ToString( 358 ? *JSBoundFunction::ToString(
360 Handle<JSBoundFunction>::cast(function)) 359 Handle<JSBoundFunction>::cast(function))
361 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 360 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
362 } 361 }
363 362
364 } // namespace internal 363 } // namespace internal
365 } // namespace v8 364 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/instanceof-es6.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698