OLD | NEW |
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 RUNTIME_FUNCTION(Runtime_GreaterThanOrEqual) { | 209 RUNTIME_FUNCTION(Runtime_GreaterThanOrEqual) { |
210 HandleScope scope(isolate); | 210 HandleScope scope(isolate); |
211 DCHECK_EQ(2, args.length()); | 211 DCHECK_EQ(2, args.length()); |
212 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); | 212 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); |
213 CONVERT_ARG_HANDLE_CHECKED(Object, y, 1); | 213 CONVERT_ARG_HANDLE_CHECKED(Object, y, 1); |
214 Maybe<bool> result = Object::GreaterThanOrEqual(x, y); | 214 Maybe<bool> result = Object::GreaterThanOrEqual(x, y); |
215 if (!result.IsJust()) return isolate->heap()->exception(); | 215 if (!result.IsJust()) return isolate->heap()->exception(); |
216 return isolate->heap()->ToBoolean(result.FromJust()); | 216 return isolate->heap()->ToBoolean(result.FromJust()); |
217 } | 217 } |
218 | 218 |
| 219 RUNTIME_FUNCTION(Runtime_InstanceOf) { |
| 220 HandleScope shs(isolate); |
| 221 DCHECK_EQ(2, args.length()); |
| 222 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 223 CONVERT_ARG_HANDLE_CHECKED(Object, callable, 1); |
| 224 Handle<Object> result; |
| 225 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 226 isolate, result, Object::InstanceOf(isolate, object, callable)); |
| 227 return *result; |
| 228 } |
| 229 |
219 } // namespace internal | 230 } // namespace internal |
220 } // namespace v8 | 231 } // namespace v8 |
OLD | NEW |