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

Side by Side Diff: src/factory.cc

Issue 178463007: Moved type feedback vector to SharedFunctionInfo. (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 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 isolate()->heap()->ReinitializeJSReceiver( 1534 isolate()->heap()->ReinitializeJSReceiver(
1535 *object, JS_FUNCTION_TYPE, JSFunction::kSize)); 1535 *object, JS_FUNCTION_TYPE, JSFunction::kSize));
1536 } 1536 }
1537 1537
1538 1538
1539 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( 1539 Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
1540 Handle<String> name, 1540 Handle<String> name,
1541 int number_of_literals, 1541 int number_of_literals,
1542 bool is_generator, 1542 bool is_generator,
1543 Handle<Code> code, 1543 Handle<Code> code,
1544 Handle<ScopeInfo> scope_info) { 1544 Handle<ScopeInfo> scope_info,
1545 Handle<FixedArray> feedback_vector) {
1545 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); 1546 Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name);
1546 shared->set_code(*code); 1547 shared->set_code(*code);
1547 shared->set_scope_info(*scope_info); 1548 shared->set_scope_info(*scope_info);
1549 shared->set_feedback_vector(*feedback_vector);
1548 int literals_array_size = number_of_literals; 1550 int literals_array_size = number_of_literals;
1549 // If the function contains object, regexp or array literals, 1551 // If the function contains object, regexp or array literals,
1550 // allocate extra space for a literals array prefix containing the 1552 // allocate extra space for a literals array prefix containing the
1551 // context. 1553 // context.
1552 if (number_of_literals > 0) { 1554 if (number_of_literals > 0) {
1553 literals_array_size += JSFunction::kLiteralsPrefixSize; 1555 literals_array_size += JSFunction::kLiteralsPrefixSize;
1554 } 1556 }
1555 shared->set_num_literals(literals_array_size); 1557 shared->set_num_literals(literals_array_size);
1556 if (is_generator) { 1558 if (is_generator) {
1557 shared->set_instance_class_name(isolate()->heap()->Generator_string()); 1559 shared->set_instance_class_name(isolate()->heap()->Generator_string());
(...skipping 431 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