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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 result = CompileLazyHelper(&info, flag); | 864 result = CompileLazyHelper(&info, flag); |
865 ASSERT(!result || function->is_compiled()); | 865 ASSERT(!result || function->is_compiled()); |
866 } | 866 } |
867 if (result && function->is_compiled()) { | 867 if (result && function->is_compiled()) { |
868 PROFILE(FunctionCreateEvent(*function)); | 868 PROFILE(FunctionCreateEvent(*function)); |
869 } | 869 } |
870 return result; | 870 return result; |
871 } | 871 } |
872 | 872 |
873 | 873 |
874 bool CompileOptimized(Handle<JSFunction> function, int osr_ast_id) { | 874 bool CompileOptimized(Handle<JSFunction> function, |
| 875 int osr_ast_id, |
| 876 ClearExceptionFlag flag) { |
875 CompilationInfo info(function); | 877 CompilationInfo info(function); |
876 info.SetOptimizing(osr_ast_id); | 878 info.SetOptimizing(osr_ast_id); |
877 bool result = CompileLazyHelper(&info, KEEP_EXCEPTION); | 879 bool result = CompileLazyHelper(&info, flag); |
878 if (result) PROFILE(FunctionCreateEvent(*function)); | 880 if (result) PROFILE(FunctionCreateEvent(*function)); |
879 return result; | 881 return result; |
880 } | 882 } |
881 | 883 |
882 | 884 |
883 OptimizedObjectForAddingMultipleProperties:: | 885 OptimizedObjectForAddingMultipleProperties:: |
884 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, | 886 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, |
885 int expected_additional_properties, | 887 int expected_additional_properties, |
886 bool condition) { | 888 bool condition) { |
887 object_ = object; | 889 object_ = object; |
(...skipping 15 matching lines...) Expand all Loading... |
903 | 905 |
904 OptimizedObjectForAddingMultipleProperties:: | 906 OptimizedObjectForAddingMultipleProperties:: |
905 ~OptimizedObjectForAddingMultipleProperties() { | 907 ~OptimizedObjectForAddingMultipleProperties() { |
906 // Reoptimize the object to allow fast property access. | 908 // Reoptimize the object to allow fast property access. |
907 if (has_been_transformed_) { | 909 if (has_been_transformed_) { |
908 TransformToFastProperties(object_, unused_property_fields_); | 910 TransformToFastProperties(object_, unused_property_fields_); |
909 } | 911 } |
910 } | 912 } |
911 | 913 |
912 } } // namespace v8::internal | 914 } } // namespace v8::internal |
OLD | NEW |