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

Side by Side Diff: src/factory.cc

Issue 199973004: Continued fix for 351257. Reusing the feedback vector is too complex. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/full-codegen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 isolate()->heap()->ReinitializeJSReceiver( 1535 isolate()->heap()->ReinitializeJSReceiver(
1536 *object, JS_FUNCTION_TYPE, JSFunction::kSize)); 1536 *object, JS_FUNCTION_TYPE, JSFunction::kSize));
1537 } 1537 }
1538 1538
1539 1539
1540 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( 1540 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
1541 Handle<String> name, 1541 Handle<String> name,
1542 int number_of_literals, 1542 int number_of_literals,
1543 bool is_generator, 1543 bool is_generator,
1544 Handle<Code> code, 1544 Handle<Code> code,
1545 Handle<ScopeInfo> scope_info) { 1545 Handle<ScopeInfo> scope_info,
1546 Handle<FixedArray> feedback_vector) {
1546 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); 1547 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name);
1547 shared->set_code(*code); 1548 shared->set_code(*code);
1548 shared->set_scope_info(*scope_info); 1549 shared->set_scope_info(*scope_info);
1550 shared->set_feedback_vector(*feedback_vector);
1549 int literals_array_size = number_of_literals; 1551 int literals_array_size = number_of_literals;
1550 // If the function contains object, regexp or array literals, 1552 // If the function contains object, regexp or array literals,
1551 // allocate extra space for a literals array prefix containing the 1553 // allocate extra space for a literals array prefix containing the
1552 // context. 1554 // context.
1553 if (number_of_literals > 0) { 1555 if (number_of_literals > 0) {
1554 literals_array_size += JSFunction::kLiteralsPrefixSize; 1556 literals_array_size += JSFunction::kLiteralsPrefixSize;
1555 } 1557 }
1556 shared->set_num_literals(literals_array_size); 1558 shared->set_num_literals(literals_array_size);
1557 if (is_generator) { 1559 if (is_generator) {
1558 shared->set_instance_class_name(isolate()->heap()->Generator_string()); 1560 shared->set_instance_class_name(isolate()->heap()->Generator_string());
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 return Handle<Object>::null(); 1991 return Handle<Object>::null();
1990 } 1992 }
1991 1993
1992 1994
1993 Handle<Object> Factory::ToBoolean(bool value) { 1995 Handle<Object> Factory::ToBoolean(bool value) {
1994 return value ? true_value() : false_value(); 1996 return value ? true_value() : false_value();
1995 } 1997 }
1996 1998
1997 1999
1998 } } // namespace v8::internal 2000 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698