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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 bool result = Compiler::CompileLazy(shared, loop_nesting); | 674 bool result = Compiler::CompileLazy(shared, loop_nesting); |
675 ASSERT(result != Top::has_pending_exception()); | 675 ASSERT(result != Top::has_pending_exception()); |
676 if (!result && flag == CLEAR_EXCEPTION) Top::clear_pending_exception(); | 676 if (!result && flag == CLEAR_EXCEPTION) Top::clear_pending_exception(); |
677 return result; | 677 return result; |
678 } | 678 } |
679 | 679 |
680 | 680 |
681 bool CompileLazy(Handle<JSFunction> function, ClearExceptionFlag flag) { | 681 bool CompileLazy(Handle<JSFunction> function, ClearExceptionFlag flag) { |
682 // Compile the source information to a code object. | 682 // Compile the source information to a code object. |
683 Handle<SharedFunctionInfo> shared(function->shared()); | 683 Handle<SharedFunctionInfo> shared(function->shared()); |
684 return CompileLazyShared(shared, flag, 0); | 684 bool result = CompileLazyShared(shared, flag, 0); |
| 685 LOG(FunctionCreateEvent(*function)); |
| 686 return result; |
685 } | 687 } |
686 | 688 |
687 | 689 |
688 bool CompileLazyInLoop(Handle<JSFunction> function, ClearExceptionFlag flag) { | 690 bool CompileLazyInLoop(Handle<JSFunction> function, ClearExceptionFlag flag) { |
689 // Compile the source information to a code object. | 691 // Compile the source information to a code object. |
690 Handle<SharedFunctionInfo> shared(function->shared()); | 692 Handle<SharedFunctionInfo> shared(function->shared()); |
691 return CompileLazyShared(shared, flag, 1); | 693 bool result = CompileLazyShared(shared, flag, 1); |
| 694 LOG(FunctionCreateEvent(*function)); |
| 695 return result; |
692 } | 696 } |
693 | 697 |
694 OptimizedObjectForAddingMultipleProperties:: | 698 OptimizedObjectForAddingMultipleProperties:: |
695 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, | 699 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, |
696 int expected_additional_properties, | 700 int expected_additional_properties, |
697 bool condition) { | 701 bool condition) { |
698 object_ = object; | 702 object_ = object; |
699 if (condition && object_->HasFastProperties()) { | 703 if (condition && object_->HasFastProperties()) { |
700 // Normalize the properties of object to avoid n^2 behavior | 704 // Normalize the properties of object to avoid n^2 behavior |
701 // when extending the object multiple properties. Indicate the number of | 705 // when extending the object multiple properties. Indicate the number of |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); | 806 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); |
803 obj->set_map(*new_map); | 807 obj->set_map(*new_map); |
804 new_map->set_needs_loading(true); | 808 new_map->set_needs_loading(true); |
805 // Store the lazy loading info in the constructor field. We'll | 809 // Store the lazy loading info in the constructor field. We'll |
806 // reestablish the constructor from the fixed array after loading. | 810 // reestablish the constructor from the fixed array after loading. |
807 new_map->set_constructor(*arr); | 811 new_map->set_constructor(*arr); |
808 ASSERT(!obj->IsLoaded()); | 812 ASSERT(!obj->IsLoaded()); |
809 } | 813 } |
810 | 814 |
811 } } // namespace v8::internal | 815 } } // namespace v8::internal |
OLD | NEW |