| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 ASSERT(!info->shared_info()->is_compiled()); | 679 ASSERT(!info->shared_info()->is_compiled()); |
| 680 bool result = Compiler::CompileLazy(info); | 680 bool result = Compiler::CompileLazy(info); |
| 681 ASSERT(result != Top::has_pending_exception()); | 681 ASSERT(result != Top::has_pending_exception()); |
| 682 if (!result && flag == CLEAR_EXCEPTION) Top::clear_pending_exception(); | 682 if (!result && flag == CLEAR_EXCEPTION) Top::clear_pending_exception(); |
| 683 return result; | 683 return result; |
| 684 } | 684 } |
| 685 | 685 |
| 686 | 686 |
| 687 bool CompileLazyShared(Handle<SharedFunctionInfo> shared, | 687 bool CompileLazyShared(Handle<SharedFunctionInfo> shared, |
| 688 ClearExceptionFlag flag) { | 688 ClearExceptionFlag flag) { |
| 689 CompilationInfo info(shared, Handle<Object>::null(), 0); | 689 CompilationInfo info(shared); |
| 690 return CompileLazyHelper(&info, flag); | 690 return CompileLazyHelper(&info, flag); |
| 691 } | 691 } |
| 692 | 692 |
| 693 | 693 |
| 694 bool CompileLazy(Handle<JSFunction> function, | 694 bool CompileLazy(Handle<JSFunction> function, |
| 695 Handle<Object> receiver, | 695 Handle<Object> receiver, |
| 696 ClearExceptionFlag flag) { | 696 ClearExceptionFlag flag) { |
| 697 Handle<SharedFunctionInfo> shared(function->shared()); | 697 CompilationInfo info(function, 0, receiver); |
| 698 CompilationInfo info(shared, receiver, 0); | |
| 699 bool result = CompileLazyHelper(&info, flag); | 698 bool result = CompileLazyHelper(&info, flag); |
| 700 LOG(FunctionCreateEvent(*function)); | 699 LOG(FunctionCreateEvent(*function)); |
| 701 return result; | 700 return result; |
| 702 } | 701 } |
| 703 | 702 |
| 704 | 703 |
| 705 bool CompileLazyInLoop(Handle<JSFunction> function, | 704 bool CompileLazyInLoop(Handle<JSFunction> function, |
| 706 Handle<Object> receiver, | 705 Handle<Object> receiver, |
| 707 ClearExceptionFlag flag) { | 706 ClearExceptionFlag flag) { |
| 708 Handle<SharedFunctionInfo> shared(function->shared()); | 707 CompilationInfo info(function, 1, receiver); |
| 709 CompilationInfo info(shared, receiver, 1); | |
| 710 bool result = CompileLazyHelper(&info, flag); | 708 bool result = CompileLazyHelper(&info, flag); |
| 711 LOG(FunctionCreateEvent(*function)); | 709 LOG(FunctionCreateEvent(*function)); |
| 712 return result; | 710 return result; |
| 713 } | 711 } |
| 714 | 712 |
| 715 | 713 |
| 716 OptimizedObjectForAddingMultipleProperties:: | 714 OptimizedObjectForAddingMultipleProperties:: |
| 717 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, | 715 OptimizedObjectForAddingMultipleProperties(Handle<JSObject> object, |
| 718 int expected_additional_properties, | 716 int expected_additional_properties, |
| 719 bool condition) { | 717 bool condition) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); | 822 Handle<Map> new_map = Factory::CopyMapDropTransitions(old_map); |
| 825 obj->set_map(*new_map); | 823 obj->set_map(*new_map); |
| 826 new_map->set_needs_loading(true); | 824 new_map->set_needs_loading(true); |
| 827 // Store the lazy loading info in the constructor field. We'll | 825 // Store the lazy loading info in the constructor field. We'll |
| 828 // reestablish the constructor from the fixed array after loading. | 826 // reestablish the constructor from the fixed array after loading. |
| 829 new_map->set_constructor(*arr); | 827 new_map->set_constructor(*arr); |
| 830 ASSERT(!obj->IsLoaded()); | 828 ASSERT(!obj->IsLoaded()); |
| 831 } | 829 } |
| 832 | 830 |
| 833 } } // namespace v8::internal | 831 } } // namespace v8::internal |
| OLD | NEW |