| 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 <iomanip> | 7 #include <iomanip> |
| 8 | 8 |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 | 129 |
| 130 RUNTIME_FUNCTION(Runtime_InterpreterLogicalNot) { | 130 RUNTIME_FUNCTION(Runtime_InterpreterLogicalNot) { |
| 131 SealHandleScope shs(isolate); | 131 SealHandleScope shs(isolate); |
| 132 DCHECK_EQ(1, args.length()); | 132 DCHECK_EQ(1, args.length()); |
| 133 CONVERT_ARG_CHECKED(Object, x, 0); | 133 CONVERT_ARG_CHECKED(Object, x, 0); |
| 134 return isolate->heap()->ToBoolean(!x->BooleanValue()); | 134 return isolate->heap()->ToBoolean(!x->BooleanValue()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 RUNTIME_FUNCTION(Runtime_InterpreterTypeOf) { | |
| 139 HandleScope shs(isolate); | |
| 140 DCHECK_EQ(1, args.length()); | |
| 141 CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); | |
| 142 return Object::cast(*Object::TypeOf(isolate, x)); | |
| 143 } | |
| 144 | |
| 145 | |
| 146 RUNTIME_FUNCTION(Runtime_InterpreterNewClosure) { | 138 RUNTIME_FUNCTION(Runtime_InterpreterNewClosure) { |
| 147 HandleScope scope(isolate); | 139 HandleScope scope(isolate); |
| 148 DCHECK_EQ(2, args.length()); | 140 DCHECK_EQ(2, args.length()); |
| 149 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); | 141 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); |
| 150 CONVERT_SMI_ARG_CHECKED(pretenured_flag, 1); | 142 CONVERT_SMI_ARG_CHECKED(pretenured_flag, 1); |
| 151 Handle<Context> context(isolate->context(), isolate); | 143 Handle<Context> context(isolate->context(), isolate); |
| 152 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( | 144 return *isolate->factory()->NewFunctionFromSharedFunctionInfo( |
| 153 shared, context, static_cast<PretenureFlag>(pretenured_flag)); | 145 shared, context, static_cast<PretenureFlag>(pretenured_flag)); |
| 154 } | 146 } |
| 155 | 147 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 RUNTIME_FUNCTION(Runtime_InterpreterSetPendingMessage) { | 257 RUNTIME_FUNCTION(Runtime_InterpreterSetPendingMessage) { |
| 266 SealHandleScope shs(isolate); | 258 SealHandleScope shs(isolate); |
| 267 DCHECK_EQ(1, args.length()); | 259 DCHECK_EQ(1, args.length()); |
| 268 CONVERT_ARG_HANDLE_CHECKED(Object, message, 0); | 260 CONVERT_ARG_HANDLE_CHECKED(Object, message, 0); |
| 269 isolate->thread_local_top()->pending_message_obj_ = *message; | 261 isolate->thread_local_top()->pending_message_obj_ = *message; |
| 270 return isolate->heap()->undefined_value(); | 262 return isolate->heap()->undefined_value(); |
| 271 } | 263 } |
| 272 | 264 |
| 273 } // namespace internal | 265 } // namespace internal |
| 274 } // namespace v8 | 266 } // namespace v8 |
| OLD | NEW |