OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 | 131 |
132 RUNTIME_FUNCTION(Runtime_InterpreterTypeOf) { | 132 RUNTIME_FUNCTION(Runtime_InterpreterTypeOf) { |
133 SealHandleScope shs(isolate); | 133 SealHandleScope shs(isolate); |
134 DCHECK_EQ(1, args.length()); | 134 DCHECK_EQ(1, args.length()); |
135 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); | 135 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); |
136 return Object::cast(*Object::TypeOf(isolate, x)); | 136 return Object::cast(*Object::TypeOf(isolate, x)); |
137 } | 137 } |
138 | 138 |
139 | 139 |
| 140 RUNTIME_FUNCTION(Runtime_InterpreterNewClosure) { |
| 141 HandleScope scope(isolate); |
| 142 DCHECK_EQ(2, args.length()); |
| 143 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); |
| 144 CONVERT_SMI_ARG_CHECKED(pretenured_flag, 1); |
| 145 Handle<Context> context(isolate->context(), isolate); |
| 146 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( |
| 147 shared, context, static_cast<PretenureFlag>(pretenured_flag)); |
| 148 } |
| 149 |
140 } // namespace internal | 150 } // namespace internal |
141 } // namespace v8 | 151 } // namespace v8 |
OLD | NEW |