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

Side by Side Diff: src/factory.cc

Issue 101853003: Cache optimized code for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments, fixed a bug. Created 7 years 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
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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 function_info, 725 function_info,
726 MapForNewFunction(isolate(), function_info), 726 MapForNewFunction(isolate(), function_info),
727 pretenure); 727 pretenure);
728 728
729 if (function_info->ic_age() != isolate()->heap()->global_ic_age()) { 729 if (function_info->ic_age() != isolate()->heap()->global_ic_age()) {
730 function_info->ResetForNewContext(isolate()->heap()->global_ic_age()); 730 function_info->ResetForNewContext(isolate()->heap()->global_ic_age());
731 } 731 }
732 732
733 result->set_context(*context); 733 result->set_context(*context);
734 734
735 int index = function_info->SearchOptimizedCodeMap(context->native_context()); 735 int index = function_info->SearchOptimizedCodeMap(context->native_context(),
736 BailoutId::None());
736 if (!function_info->bound() && index < 0) { 737 if (!function_info->bound() && index < 0) {
737 int number_of_literals = function_info->num_literals(); 738 int number_of_literals = function_info->num_literals();
738 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); 739 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure);
739 if (number_of_literals > 0) { 740 if (number_of_literals > 0) {
740 // Store the native context in the literals array prefix. This 741 // Store the native context in the literals array prefix. This
741 // context will be used when creating object, regexp and array 742 // context will be used when creating object, regexp and array
742 // literals in this function. 743 // literals in this function.
743 literals->set(JSFunction::kLiteralNativeContextIndex, 744 literals->set(JSFunction::kLiteralNativeContextIndex,
744 context->native_context()); 745 context->native_context());
745 } 746 }
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 return Handle<Object>::null(); 1801 return Handle<Object>::null();
1801 } 1802 }
1802 1803
1803 1804
1804 Handle<Object> Factory::ToBoolean(bool value) { 1805 Handle<Object> Factory::ToBoolean(bool value) {
1805 return value ? true_value() : false_value(); 1806 return value ? true_value() : false_value();
1806 } 1807 }
1807 1808
1808 1809
1809 } } // namespace v8::internal 1810 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen-instructions.h » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698