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

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

Issue 2930243002: [WIP] Refactor OrdinaryHasInstance to be self-contained.
Patch Set: Created 3 years, 6 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-internal.cc ('k') | no next file » | 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/arguments.h" 5 #include "src/arguments.h"
6 #include "src/isolate-inl.h" 6 #include "src/isolate-inl.h"
7 #include "src/runtime/runtime-utils.h" 7 #include "src/runtime/runtime-utils.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 RUNTIME_FUNCTION(Runtime_GreaterThanOrEqual) { 177 RUNTIME_FUNCTION(Runtime_GreaterThanOrEqual) {
178 HandleScope scope(isolate); 178 HandleScope scope(isolate);
179 DCHECK_EQ(2, args.length()); 179 DCHECK_EQ(2, args.length());
180 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); 180 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0);
181 CONVERT_ARG_HANDLE_CHECKED(Object, y, 1); 181 CONVERT_ARG_HANDLE_CHECKED(Object, y, 1);
182 Maybe<bool> result = Object::GreaterThanOrEqual(x, y); 182 Maybe<bool> result = Object::GreaterThanOrEqual(x, y);
183 if (!result.IsJust()) return isolate->heap()->exception(); 183 if (!result.IsJust()) return isolate->heap()->exception();
184 return isolate->heap()->ToBoolean(result.FromJust()); 184 return isolate->heap()->ToBoolean(result.FromJust());
185 } 185 }
186 186
187 RUNTIME_FUNCTION(Runtime_InstanceOf) {
188 HandleScope shs(isolate);
189 DCHECK_EQ(2, args.length());
190 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
191 CONVERT_ARG_HANDLE_CHECKED(Object, callable, 1);
192 RETURN_RESULT_OR_FAILURE(isolate,
193 Object::InstanceOf(isolate, object, callable));
194 }
195
196 } // namespace internal 187 } // namespace internal
197 } // namespace v8 188 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698