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/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/factory.h" | 8 #include "src/factory.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 RUNTIME_ASSERT(0 <= offset && offset < code->Size()); | 202 RUNTIME_ASSERT(0 <= offset && offset < code->Size()); |
203 Address pc = code->address() + offset; | 203 Address pc = code->address() + offset; |
204 | 204 |
205 return Smi::FromInt(code->SourcePosition(pc)); | 205 return Smi::FromInt(code->SourcePosition(pc)); |
206 } | 206 } |
207 | 207 |
208 return isolate->heap()->undefined_value(); | 208 return isolate->heap()->undefined_value(); |
209 } | 209 } |
210 | 210 |
211 | 211 |
212 RUNTIME_FUNCTION(Runtime_FunctionIsGenerator) { | |
213 SealHandleScope shs(isolate); | |
214 DCHECK(args.length() == 1); | |
215 CONVERT_ARG_CHECKED(JSFunction, f, 0); | |
216 return isolate->heap()->ToBoolean(f->shared()->is_generator()); | |
217 } | |
218 | |
219 | |
220 RUNTIME_FUNCTION(Runtime_GeneratorNext) { | 212 RUNTIME_FUNCTION(Runtime_GeneratorNext) { |
221 UNREACHABLE(); // Optimization disabled in SetUpGenerators(). | 213 UNREACHABLE(); // Optimization disabled in SetUpGenerators(). |
222 return NULL; | 214 return NULL; |
223 } | 215 } |
224 | 216 |
225 | 217 |
226 RUNTIME_FUNCTION(Runtime_GeneratorThrow) { | 218 RUNTIME_FUNCTION(Runtime_GeneratorThrow) { |
227 UNREACHABLE(); // Optimization disabled in SetUpGenerators(). | 219 UNREACHABLE(); // Optimization disabled in SetUpGenerators(). |
228 return NULL; | 220 return NULL; |
229 } | 221 } |
230 } // namespace internal | 222 } // namespace internal |
231 } // namespace v8 | 223 } // namespace v8 |
OLD | NEW |