| 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/factory.h" | 5 #include "src/factory.h" |
| 6 | 6 |
| 7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1994 map = Map::TransitionToPrototype(map, prototype, REGULAR_PROTOTYPE); | 1994 map = Map::TransitionToPrototype(map, prototype, REGULAR_PROTOTYPE); |
| 1995 } | 1995 } |
| 1996 DCHECK_EQ(target_function->IsConstructor(), map->is_constructor()); | 1996 DCHECK_EQ(target_function->IsConstructor(), map->is_constructor()); |
| 1997 | 1997 |
| 1998 // Setup the JSBoundFunction instance. | 1998 // Setup the JSBoundFunction instance. |
| 1999 Handle<JSBoundFunction> result = | 1999 Handle<JSBoundFunction> result = |
| 2000 Handle<JSBoundFunction>::cast(NewJSObjectFromMap(map)); | 2000 Handle<JSBoundFunction>::cast(NewJSObjectFromMap(map)); |
| 2001 result->set_bound_target_function(*target_function); | 2001 result->set_bound_target_function(*target_function); |
| 2002 result->set_bound_this(*bound_this); | 2002 result->set_bound_this(*bound_this); |
| 2003 result->set_bound_arguments(*bound_arguments); | 2003 result->set_bound_arguments(*bound_arguments); |
| 2004 result->set_creation_context(*isolate()->native_context()); | |
| 2005 result->set_length(Smi::FromInt(0)); | 2004 result->set_length(Smi::FromInt(0)); |
| 2006 result->set_name(*undefined_value(), SKIP_WRITE_BARRIER); | 2005 result->set_name(*undefined_value(), SKIP_WRITE_BARRIER); |
| 2007 return result; | 2006 return result; |
| 2008 } | 2007 } |
| 2009 | 2008 |
| 2010 | 2009 |
| 2011 // ES6 section 9.5.15 ProxyCreate (target, handler) | 2010 // ES6 section 9.5.15 ProxyCreate (target, handler) |
| 2012 Handle<JSProxy> Factory::NewJSProxy(Handle<JSReceiver> target, | 2011 Handle<JSProxy> Factory::NewJSProxy(Handle<JSReceiver> target, |
| 2013 Handle<JSReceiver> handler) { | 2012 Handle<JSReceiver> handler) { |
| 2014 // Allocate the proxy object. | 2013 // Allocate the proxy object. |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2398 } | 2397 } |
| 2399 | 2398 |
| 2400 | 2399 |
| 2401 Handle<Object> Factory::ToBoolean(bool value) { | 2400 Handle<Object> Factory::ToBoolean(bool value) { |
| 2402 return value ? true_value() : false_value(); | 2401 return value ? true_value() : false_value(); |
| 2403 } | 2402 } |
| 2404 | 2403 |
| 2405 | 2404 |
| 2406 } // namespace internal | 2405 } // namespace internal |
| 2407 } // namespace v8 | 2406 } // namespace v8 |
| OLD | NEW |