| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 case OuterGlobalObject: | 699 case OuterGlobalObject: |
| 700 type = JS_GLOBAL_PROXY_TYPE; | 700 type = JS_GLOBAL_PROXY_TYPE; |
| 701 instance_size += JSGlobalProxy::kSize; | 701 instance_size += JSGlobalProxy::kSize; |
| 702 break; | 702 break; |
| 703 default: | 703 default: |
| 704 break; | 704 break; |
| 705 } | 705 } |
| 706 ASSERT(type != INVALID_TYPE); | 706 ASSERT(type != INVALID_TYPE); |
| 707 | 707 |
| 708 Handle<JSFunction> result = | 708 Handle<JSFunction> result = |
| 709 Factory::NewFunction(Factory::empty_symbol(), type, instance_size, | 709 Factory::NewFunction(Factory::empty_symbol(), |
| 710 code, true); | 710 type, |
| 711 instance_size, |
| 712 code, |
| 713 true); |
| 711 // Set class name. | 714 // Set class name. |
| 712 Handle<Object> class_name = Handle<Object>(obj->class_name()); | 715 Handle<Object> class_name = Handle<Object>(obj->class_name()); |
| 713 if (class_name->IsString()) { | 716 if (class_name->IsString()) { |
| 714 result->shared()->set_instance_class_name(*class_name); | 717 result->shared()->set_instance_class_name(*class_name); |
| 715 result->shared()->set_name(*class_name); | 718 result->shared()->set_name(*class_name); |
| 716 } | 719 } |
| 717 | 720 |
| 718 Handle<Map> map = Handle<Map>(result->initial_map()); | 721 Handle<Map> map = Handle<Map>(result->initial_map()); |
| 719 | 722 |
| 720 // Mark as undetectable if needed. | 723 // Mark as undetectable if needed. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 Execution::ConfigureInstance(instance, | 836 Execution::ConfigureInstance(instance, |
| 834 instance_template, | 837 instance_template, |
| 835 pending_exception); | 838 pending_exception); |
| 836 } else { | 839 } else { |
| 837 *pending_exception = false; | 840 *pending_exception = false; |
| 838 } | 841 } |
| 839 } | 842 } |
| 840 | 843 |
| 841 | 844 |
| 842 } } // namespace v8::internal | 845 } } // namespace v8::internal |
| OLD | NEW |