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

Side by Side Diff: src/factory.cc

Issue 110203002: Refactor the compiling pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments 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
« no previous file with comments | « src/debug.cc ('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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 // context will be used when creating object, regexp and array 741 // context will be used when creating object, regexp and array
742 // literals in this function. 742 // literals in this function.
743 literals->set(JSFunction::kLiteralNativeContextIndex, 743 literals->set(JSFunction::kLiteralNativeContextIndex,
744 context->native_context()); 744 context->native_context());
745 } 745 }
746 result->set_literals(*literals); 746 result->set_literals(*literals);
747 } 747 }
748 748
749 if (index > 0) { 749 if (index > 0) {
750 // Caching of optimized code enabled and optimized code found. 750 // Caching of optimized code enabled and optimized code found.
751 function_info->InstallFromOptimizedCodeMap(*result, index); 751 FixedArray* literals =
752 function_info->GetLiteralsFromOptimizedCodeMap(index);
753 if (literals != NULL) result->set_literals(literals);
754 result->ReplaceCode(function_info->GetCodeFromOptimizedCodeMap(index));
752 return result; 755 return result;
753 } 756 }
754 757
755 if (isolate()->use_crankshaft() && 758 if (isolate()->use_crankshaft() &&
756 FLAG_always_opt && 759 FLAG_always_opt &&
757 result->is_compiled() && 760 result->is_compiled() &&
758 !function_info->is_toplevel() && 761 !function_info->is_toplevel() &&
759 function_info->allows_lazy_compilation() && 762 function_info->allows_lazy_compilation() &&
760 !function_info->optimization_disabled() && 763 !function_info->optimization_disabled() &&
761 !isolate()->DebuggerHasBreakPoints()) { 764 !isolate()->DebuggerHasBreakPoints()) {
762 result->MarkForLazyRecompilation(); 765 result->MarkForOptimization();
763 } 766 }
764 return result; 767 return result;
765 } 768 }
766 769
767 770
768 Handle<Object> Factory::NewNumber(double value, 771 Handle<Object> Factory::NewNumber(double value,
769 PretenureFlag pretenure) { 772 PretenureFlag pretenure) {
770 CALL_HEAP_FUNCTION( 773 CALL_HEAP_FUNCTION(
771 isolate(), 774 isolate(),
772 isolate()->heap()->NumberFromDouble(value, pretenure), Object); 775 isolate()->heap()->NumberFromDouble(value, pretenure), Object);
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 return Handle<Object>::null(); 1800 return Handle<Object>::null();
1798 } 1801 }
1799 1802
1800 1803
1801 Handle<Object> Factory::ToBoolean(bool value) { 1804 Handle<Object> Factory::ToBoolean(bool value) {
1802 return value ? true_value() : false_value(); 1805 return value ? true_value() : false_value();
1803 } 1806 }
1804 1807
1805 1808
1806 } } // namespace v8::internal 1809 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698