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

Unified Diff: src/factory.cc

Issue 475423003: Implement Function.prototype.toMethod. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove stray change Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/harmony-classes.js » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 5ecdfcfd2f4aec25c94ab22927b53363715b3b59..30571a276effb095ba8148a903fc409c4e10b44c 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1346,13 +1346,11 @@ Handle<JSObject> Factory::NewFunctionPrototype(Handle<JSFunction> function) {
}
-Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
+Handle<JSFunction> Factory::NewFunctionWithMapFromSharedFunctionInfo(
+ Handle<Map> map,
Handle<SharedFunctionInfo> info,
Handle<Context> context,
PretenureFlag pretenure) {
- int map_index = Context::FunctionMapIndex(info->strict_mode(),
- info->is_generator());
- Handle<Map> map(Map::cast(context->native_context()->get(map_index)));
Handle<JSFunction> result = NewFunction(map, info, context, pretenure);
if (info->ic_age() != isolate()->heap()->global_ic_age()) {
@@ -1397,6 +1395,18 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
}
+Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
+ Handle<SharedFunctionInfo> info,
+ Handle<Context> context,
+ PretenureFlag pretenure) {
+ int map_index = Context::FunctionMapIndex(info->strict_mode(),
+ info->is_generator());
+ Handle<Map> map(Map::cast(context->native_context()->get(map_index)));
+ return NewFunctionWithMapFromSharedFunctionInfo(
+ map, info, context, pretenure);
+}
+
+
Handle<ScopeInfo> Factory::NewScopeInfo(int length) {
Handle<FixedArray> array = NewFixedArray(length, TENURED);
array->set_map_no_write_barrier(*scope_info_map());
« no previous file with comments | « src/factory.h ('k') | src/harmony-classes.js » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698