| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 result = CompileLazyHelper(&info, flag); | 843 result = CompileLazyHelper(&info, flag); |
| 844 ASSERT(!result || function->is_compiled()); | 844 ASSERT(!result || function->is_compiled()); |
| 845 } | 845 } |
| 846 if (result && function->is_compiled()) { | 846 if (result && function->is_compiled()) { |
| 847 PROFILE(FunctionCreateEvent(*function)); | 847 PROFILE(FunctionCreateEvent(*function)); |
| 848 } | 848 } |
| 849 return result; | 849 return result; |
| 850 } | 850 } |
| 851 | 851 |
| 852 | 852 |
| 853 bool CompileOptimized(Handle<JSFunction> function, int osr_ast_id) { | 853 bool CompileOptimized(Handle<JSFunction> function, AstId osr_ast_id) { |
| 854 CompilationInfo info(function); | 854 CompilationInfo info(function); |
| 855 info.SetOptimizing(osr_ast_id); | 855 info.SetOptimizing(osr_ast_id); |
| 856 bool result = CompileLazyHelper(&info, KEEP_EXCEPTION); | 856 bool result = CompileLazyHelper(&info, KEEP_EXCEPTION); |
| 857 if (result) PROFILE(FunctionCreateEvent(*function)); | 857 if (result) PROFILE(FunctionCreateEvent(*function)); |
| 858 return result; | 858 return result; |
| 859 } | 859 } |
| 860 | 860 |
| 861 | 861 |
| 862 OptimizedObjectForAddingMultipleProperties:: | 862 OptimizedObjectForAddingMultipleProperties:: |
| 863 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, | 863 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 882 | 882 |
| 883 OptimizedObjectForAddingMultipleProperties:: | 883 OptimizedObjectForAddingMultipleProperties:: |
| 884 ~OptimizedObjectForAddingMultipleProperties() { | 884 ~OptimizedObjectForAddingMultipleProperties() { |
| 885 // Reoptimize the object to allow fast property access. | 885 // Reoptimize the object to allow fast property access. |
| 886 if (has_been_transformed_) { | 886 if (has_been_transformed_) { |
| 887 TransformToFastProperties(object_, unused_property_fields_); | 887 TransformToFastProperties(object_, unused_property_fields_); |
| 888 } | 888 } |
| 889 } | 889 } |
| 890 | 890 |
| 891 } } // namespace v8::internal | 891 } } // namespace v8::internal |
| OLD | NEW |