OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/builtins.h" | 5 #include "src/builtins.h" |
6 | 6 |
7 #include "src/api-arguments.h" | 7 #include "src/api-arguments.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 4205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4216 | 4216 |
4217 // ES6 section 25.2.1.1 GeneratorFunction (p1, p2, ... , pn, body) | 4217 // ES6 section 25.2.1.1 GeneratorFunction (p1, p2, ... , pn, body) |
4218 BUILTIN(GeneratorFunctionConstructor) { | 4218 BUILTIN(GeneratorFunctionConstructor) { |
4219 HandleScope scope(isolate); | 4219 HandleScope scope(isolate); |
4220 Handle<JSFunction> result; | 4220 Handle<JSFunction> result; |
4221 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 4221 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
4222 isolate, result, CreateDynamicFunction(isolate, args, "function*")); | 4222 isolate, result, CreateDynamicFunction(isolate, args, "function*")); |
4223 return *result; | 4223 return *result; |
4224 } | 4224 } |
4225 | 4225 |
| 4226 BUILTIN(AsyncFunctionConstructor) { |
| 4227 HandleScope scope(isolate); |
| 4228 Handle<JSFunction> result; |
| 4229 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
| 4230 isolate, result, CreateDynamicFunction(isolate, args, "async function")); |
| 4231 return *result; |
| 4232 } |
4226 | 4233 |
4227 // ES6 section 19.4.1.1 Symbol ( [ description ] ) for the [[Call]] case. | 4234 // ES6 section 19.4.1.1 Symbol ( [ description ] ) for the [[Call]] case. |
4228 BUILTIN(SymbolConstructor) { | 4235 BUILTIN(SymbolConstructor) { |
4229 HandleScope scope(isolate); | 4236 HandleScope scope(isolate); |
4230 Handle<Symbol> result = isolate->factory()->NewSymbol(); | 4237 Handle<Symbol> result = isolate->factory()->NewSymbol(); |
4231 Handle<Object> description = args.atOrUndefined(isolate, 1); | 4238 Handle<Object> description = args.atOrUndefined(isolate, 1); |
4232 if (!description->IsUndefined()) { | 4239 if (!description->IsUndefined()) { |
4233 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, description, | 4240 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, description, |
4234 Object::ToString(isolate, description)); | 4241 Object::ToString(isolate, description)); |
4235 result->set_name(*description); | 4242 result->set_name(*description); |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5478 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) | 5485 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) |
5479 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 5486 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
5480 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 5487 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
5481 #undef DEFINE_BUILTIN_ACCESSOR_C | 5488 #undef DEFINE_BUILTIN_ACCESSOR_C |
5482 #undef DEFINE_BUILTIN_ACCESSOR_A | 5489 #undef DEFINE_BUILTIN_ACCESSOR_A |
5483 #undef DEFINE_BUILTIN_ACCESSOR_T | 5490 #undef DEFINE_BUILTIN_ACCESSOR_T |
5484 #undef DEFINE_BUILTIN_ACCESSOR_H | 5491 #undef DEFINE_BUILTIN_ACCESSOR_H |
5485 | 5492 |
5486 } // namespace internal | 5493 } // namespace internal |
5487 } // namespace v8 | 5494 } // namespace v8 |
OLD | NEW |