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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 Top::initial_object_prototype(), Builtins::Illegal, | 713 Top::initial_object_prototype(), Builtins::Illegal, |
714 true); | 714 true); |
715 global_context()->set_boolean_function(*boolean_fun); | 715 global_context()->set_boolean_function(*boolean_fun); |
716 } | 716 } |
717 | 717 |
718 { // --- S t r i n g --- | 718 { // --- S t r i n g --- |
719 Handle<JSFunction> string_fun = | 719 Handle<JSFunction> string_fun = |
720 InstallFunction(global, "String", JS_VALUE_TYPE, JSValue::kSize, | 720 InstallFunction(global, "String", JS_VALUE_TYPE, JSValue::kSize, |
721 Top::initial_object_prototype(), Builtins::Illegal, | 721 Top::initial_object_prototype(), Builtins::Illegal, |
722 true); | 722 true); |
| 723 string_fun->shared()->set_construct_stub( |
| 724 Builtins::builtin(Builtins::StringConstructCode)); |
723 global_context()->set_string_function(*string_fun); | 725 global_context()->set_string_function(*string_fun); |
724 // Add 'length' property to strings. | 726 // Add 'length' property to strings. |
725 Handle<DescriptorArray> string_descriptors = | 727 Handle<DescriptorArray> string_descriptors = |
726 Factory::CopyAppendProxyDescriptor( | 728 Factory::CopyAppendProxyDescriptor( |
727 Factory::empty_descriptor_array(), | 729 Factory::empty_descriptor_array(), |
728 Factory::length_symbol(), | 730 Factory::length_symbol(), |
729 Factory::NewProxy(&Accessors::StringLength), | 731 Factory::NewProxy(&Accessors::StringLength), |
730 static_cast<PropertyAttributes>(DONT_ENUM | | 732 static_cast<PropertyAttributes>(DONT_ENUM | |
731 DONT_DELETE | | 733 DONT_DELETE | |
732 READ_ONLY)); | 734 READ_ONLY)); |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1829 } | 1831 } |
1830 | 1832 |
1831 | 1833 |
1832 // Restore statics that are thread local. | 1834 // Restore statics that are thread local. |
1833 char* BootstrapperActive::RestoreState(char* from) { | 1835 char* BootstrapperActive::RestoreState(char* from) { |
1834 nesting_ = *reinterpret_cast<int*>(from); | 1836 nesting_ = *reinterpret_cast<int*>(from); |
1835 return from + sizeof(nesting_); | 1837 return from + sizeof(nesting_); |
1836 } | 1838 } |
1837 | 1839 |
1838 } } // namespace v8::internal | 1840 } } // namespace v8::internal |
OLD | NEW |