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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 | 114 |
115 | 115 |
116 RUNTIME_FUNCTION(Runtime_InterpreterToBoolean) { | 116 RUNTIME_FUNCTION(Runtime_InterpreterToBoolean) { |
117 SealHandleScope scope(isolate); | 117 SealHandleScope scope(isolate); |
118 DCHECK_EQ(1, args.length()); | 118 DCHECK_EQ(1, args.length()); |
119 CONVERT_ARG_CHECKED(Object, x, 0); | 119 CONVERT_ARG_CHECKED(Object, x, 0); |
120 return isolate->heap()->ToBoolean(x->BooleanValue()); | 120 return isolate->heap()->ToBoolean(x->BooleanValue()); |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 RUNTIME_FUNCTION(Runtime_InterpreterLogicalNot) { | |
125 HandleScope scope(isolate); | |
Toon Verwaest
2015/10/06 13:25:27
SealHandleScope shs(isolate); ?
oth
2015/10/06 13:52:10
Done.
| |
126 DCHECK_EQ(1, args.length()); | |
127 CONVERT_ARG_CHECKED(Object, x, 0); | |
128 return isolate->heap()->ToBoolean(!x->BooleanValue()); | |
129 } | |
130 | |
131 | |
132 RUNTIME_FUNCTION(Runtime_InterpreterTypeOf) { | |
133 HandleScope scope(isolate); | |
134 DCHECK_EQ(1, args.length()); | |
135 CONVERT_ARG_CHECKED(Object, x, 0); | |
Toon Verwaest
2015/10/06 13:25:27
CONVERT_ARG_HANDLE_CHECKED(Object, x, 0); avoids r
oth
2015/10/06 13:52:09
Done.
| |
136 return Object::cast(*Object::TypeOf(isolate, handle(x, isolate))); | |
137 } | |
138 | |
139 | |
124 } // namespace internal | 140 } // namespace internal |
125 } // namespace v8 | 141 } // namespace v8 |
OLD | NEW |