Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: src/factory.cc

Issue 1590273002: [runtime] No need to carry around the creation context for JSBoundFunctions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698