| 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/v8.h" | 5 #include "src/v8.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/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 | 195 |
| 196 | 196 |
| 197 RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) { | 197 RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) { |
| 198 HandleScope scope(isolate); | 198 HandleScope scope(isolate); |
| 199 DCHECK(args.length() == 2); | 199 DCHECK(args.length() == 2); |
| 200 | 200 |
| 201 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); | 201 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); |
| 202 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 202 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 203 RUNTIME_ASSERT(fun->should_have_prototype()); | 203 RUNTIME_ASSERT(fun->should_have_prototype()); |
| 204 Accessors::FunctionSetPrototype(fun, value); | 204 RETURN_FAILURE_ON_EXCEPTION(isolate, |
| 205 Accessors::FunctionSetPrototype(fun, value)); |
| 205 return args[0]; // return TOS | 206 return args[0]; // return TOS |
| 206 } | 207 } |
| 207 | 208 |
| 208 | 209 |
| 209 RUNTIME_FUNCTION(Runtime_FunctionIsAPIFunction) { | 210 RUNTIME_FUNCTION(Runtime_FunctionIsAPIFunction) { |
| 210 SealHandleScope shs(isolate); | 211 SealHandleScope shs(isolate); |
| 211 DCHECK(args.length() == 1); | 212 DCHECK(args.length() == 1); |
| 212 | 213 |
| 213 CONVERT_ARG_CHECKED(JSFunction, f, 0); | 214 CONVERT_ARG_CHECKED(JSFunction, f, 0); |
| 214 return isolate->heap()->ToBoolean(f->shared()->IsApiFunction()); | 215 return isolate->heap()->ToBoolean(f->shared()->IsApiFunction()); |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 | 598 |
| 598 | 599 |
| 599 RUNTIME_FUNCTION(RuntimeReference_IsFunction) { | 600 RUNTIME_FUNCTION(RuntimeReference_IsFunction) { |
| 600 SealHandleScope shs(isolate); | 601 SealHandleScope shs(isolate); |
| 601 DCHECK(args.length() == 1); | 602 DCHECK(args.length() == 1); |
| 602 CONVERT_ARG_CHECKED(Object, obj, 0); | 603 CONVERT_ARG_CHECKED(Object, obj, 0); |
| 603 return isolate->heap()->ToBoolean(obj->IsJSFunction()); | 604 return isolate->heap()->ToBoolean(obj->IsJSFunction()); |
| 604 } | 605 } |
| 605 } | 606 } |
| 606 } // namespace v8::internal | 607 } // namespace v8::internal |
| OLD | NEW |