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