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

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

Issue 1288923002: Revert of [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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') | src/runtime/runtime-object.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 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/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 542
543 RUNTIME_FUNCTION(Runtime_IsSmi) { 543 RUNTIME_FUNCTION(Runtime_IsSmi) {
544 SealHandleScope shs(isolate); 544 SealHandleScope shs(isolate);
545 DCHECK(args.length() == 1); 545 DCHECK(args.length() == 1);
546 CONVERT_ARG_CHECKED(Object, obj, 0); 546 CONVERT_ARG_CHECKED(Object, obj, 0);
547 return isolate->heap()->ToBoolean(obj->IsSmi()); 547 return isolate->heap()->ToBoolean(obj->IsSmi());
548 } 548 }
549 549
550 550
551 RUNTIME_FUNCTION(Runtime_IsNonNegativeSmi) {
552 SealHandleScope shs(isolate);
553 DCHECK(args.length() == 1);
554 CONVERT_ARG_CHECKED(Object, obj, 0);
555 return isolate->heap()->ToBoolean(obj->IsSmi() &&
556 Smi::cast(obj)->value() >= 0);
557 }
558
559
551 RUNTIME_FUNCTION(Runtime_GetRootNaN) { 560 RUNTIME_FUNCTION(Runtime_GetRootNaN) {
552 SealHandleScope shs(isolate); 561 SealHandleScope shs(isolate);
553 DCHECK(args.length() == 0); 562 DCHECK(args.length() == 0);
554 return isolate->heap()->nan_value(); 563 return isolate->heap()->nan_value();
555 } 564 }
556 } // namespace internal 565 } // namespace internal
557 } // namespace v8 566 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698