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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 281 } |
282 | 282 |
283 RUNTIME_FUNCTION(Runtime_ThrowNotConstructor) { | 283 RUNTIME_FUNCTION(Runtime_ThrowNotConstructor) { |
284 HandleScope scope(isolate); | 284 HandleScope scope(isolate); |
285 DCHECK_EQ(1, args.length()); | 285 DCHECK_EQ(1, args.length()); |
286 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 286 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
287 THROW_NEW_ERROR_RETURN_FAILURE( | 287 THROW_NEW_ERROR_RETURN_FAILURE( |
288 isolate, NewTypeError(MessageTemplate::kNotConstructor, object)); | 288 isolate, NewTypeError(MessageTemplate::kNotConstructor, object)); |
289 } | 289 } |
290 | 290 |
| 291 RUNTIME_FUNCTION(Runtime_ThrowNotGeneric) { |
| 292 HandleScope scope(isolate); |
| 293 DCHECK_EQ(1, args.length()); |
| 294 CONVERT_ARG_HANDLE_CHECKED(Object, arg0, 0); |
| 295 THROW_NEW_ERROR_RETURN_FAILURE( |
| 296 isolate, NewTypeError(MessageTemplate::kNotGeneric, arg0)); |
| 297 } |
| 298 |
291 RUNTIME_FUNCTION(Runtime_ThrowGeneratorRunning) { | 299 RUNTIME_FUNCTION(Runtime_ThrowGeneratorRunning) { |
292 HandleScope scope(isolate); | 300 HandleScope scope(isolate); |
293 DCHECK_EQ(0, args.length()); | 301 DCHECK_EQ(0, args.length()); |
294 THROW_NEW_ERROR_RETURN_FAILURE( | 302 THROW_NEW_ERROR_RETURN_FAILURE( |
295 isolate, NewTypeError(MessageTemplate::kGeneratorRunning)); | 303 isolate, NewTypeError(MessageTemplate::kGeneratorRunning)); |
296 } | 304 } |
297 | 305 |
298 RUNTIME_FUNCTION(Runtime_ThrowApplyNonFunction) { | 306 RUNTIME_FUNCTION(Runtime_ThrowApplyNonFunction) { |
299 HandleScope scope(isolate); | 307 HandleScope scope(isolate); |
300 DCHECK_EQ(1, args.length()); | 308 DCHECK_EQ(1, args.length()); |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 THROW_NEW_ERROR_RETURN_FAILURE( | 576 THROW_NEW_ERROR_RETURN_FAILURE( |
569 isolate, NewTypeError(MessageTemplate::kSymbolIteratorInvalid)); | 577 isolate, NewTypeError(MessageTemplate::kSymbolIteratorInvalid)); |
570 } | 578 } |
571 | 579 |
572 return *isolate->factory()->NewJSAsyncFromSyncIterator( | 580 return *isolate->factory()->NewJSAsyncFromSyncIterator( |
573 Handle<JSReceiver>::cast(sync_iterator)); | 581 Handle<JSReceiver>::cast(sync_iterator)); |
574 } | 582 } |
575 | 583 |
576 } // namespace internal | 584 } // namespace internal |
577 } // namespace v8 | 585 } // namespace v8 |
OLD | NEW |