| 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 // Check the state of the object. | 787 // Check the state of the object. |
| 788 ASSERT(result->HasFastProperties()); | 788 ASSERT(result->HasFastProperties()); |
| 789 ASSERT(result->HasFastElements()); | 789 ASSERT(result->HasFastElements()); |
| 790 #endif | 790 #endif |
| 791 } | 791 } |
| 792 | 792 |
| 793 { // --- context extension | 793 { // --- context extension |
| 794 // Create a function for the context extension objects. | 794 // Create a function for the context extension objects. |
| 795 Handle<Code> code = Handle<Code>(Builtins::builtin(Builtins::Illegal)); | 795 Handle<Code> code = Handle<Code>(Builtins::builtin(Builtins::Illegal)); |
| 796 Handle<JSFunction> context_extension_fun = | 796 Handle<JSFunction> context_extension_fun = |
| 797 Factory::NewFunction(Factory::empty_symbol(), JS_OBJECT_TYPE, | 797 Factory::NewFunction(Factory::empty_symbol(), |
| 798 JSObject::kHeaderSize, code, true); | 798 JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
| 799 JSObject::kHeaderSize, |
| 800 code, |
| 801 true); |
| 799 | 802 |
| 800 Handle<String> name = Factory::LookupAsciiSymbol("context_extension"); | 803 Handle<String> name = Factory::LookupAsciiSymbol("context_extension"); |
| 801 context_extension_fun->shared()->set_instance_class_name(*name); | 804 context_extension_fun->shared()->set_instance_class_name(*name); |
| 802 global_context()->set_context_extension_function(*context_extension_fun); | 805 global_context()->set_context_extension_function(*context_extension_fun); |
| 803 } | 806 } |
| 804 | 807 |
| 805 // Setup the call-as-function delegate. | 808 // Setup the call-as-function delegate. |
| 806 Handle<Code> code = | 809 Handle<Code> code = |
| 807 Handle<Code>(Builtins::builtin(Builtins::HandleApiCallAsFunction)); | 810 Handle<Code>(Builtins::builtin(Builtins::HandleApiCallAsFunction)); |
| 808 Handle<JSFunction> delegate = | 811 Handle<JSFunction> delegate = |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 if (!ConfigureGlobalObjects(global_template)) return; | 1460 if (!ConfigureGlobalObjects(global_template)) return; |
| 1458 | 1461 |
| 1459 if (!InstallExtensions(extensions)) return; | 1462 if (!InstallExtensions(extensions)) return; |
| 1460 | 1463 |
| 1461 if (!InstallSpecialObjects()) return; | 1464 if (!InstallSpecialObjects()) return; |
| 1462 | 1465 |
| 1463 result_ = global_context_; | 1466 result_ = global_context_; |
| 1464 } | 1467 } |
| 1465 | 1468 |
| 1466 } } // namespace v8::internal | 1469 } } // namespace v8::internal |
| OLD | NEW |