| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 // Install global Function object | 852 // Install global Function object |
| 853 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, | 853 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, |
| 854 empty_function, Builtins::kIllegal, true, true); | 854 empty_function, Builtins::kIllegal, true, true); |
| 855 | 855 |
| 856 { // --- A r r a y --- | 856 { // --- A r r a y --- |
| 857 Handle<JSFunction> array_function = | 857 Handle<JSFunction> array_function = |
| 858 InstallFunction(global, "Array", JS_ARRAY_TYPE, JSArray::kSize, | 858 InstallFunction(global, "Array", JS_ARRAY_TYPE, JSArray::kSize, |
| 859 isolate->initial_object_prototype(), | 859 isolate->initial_object_prototype(), |
| 860 Builtins::kArrayCode, true, true); | 860 Builtins::kArrayCode, true, true); |
| 861 array_function->shared()->DontAdaptArguments(); | 861 array_function->shared()->DontAdaptArguments(); |
| 862 array_function->shared()->set_function_data(Smi::FromInt(kArrayCode)); |
| 862 | 863 |
| 863 // This seems a bit hackish, but we need to make sure Array.length | 864 // This seems a bit hackish, but we need to make sure Array.length |
| 864 // is 1. | 865 // is 1. |
| 865 array_function->shared()->set_length(1); | 866 array_function->shared()->set_length(1); |
| 866 | 867 |
| 867 Handle<Map> initial_map(array_function->initial_map()); | 868 Handle<Map> initial_map(array_function->initial_map()); |
| 868 Handle<DescriptorArray> array_descriptors( | 869 Handle<DescriptorArray> array_descriptors( |
| 869 factory->NewDescriptorArray(0, 1)); | 870 factory->NewDescriptorArray(0, 1)); |
| 870 DescriptorArray::WhitenessWitness witness(*array_descriptors); | 871 DescriptorArray::WhitenessWitness witness(*array_descriptors); |
| 871 | 872 |
| (...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2642 return from + sizeof(NestingCounterType); | 2643 return from + sizeof(NestingCounterType); |
| 2643 } | 2644 } |
| 2644 | 2645 |
| 2645 | 2646 |
| 2646 // Called when the top-level V8 mutex is destroyed. | 2647 // Called when the top-level V8 mutex is destroyed. |
| 2647 void Bootstrapper::FreeThreadResources() { | 2648 void Bootstrapper::FreeThreadResources() { |
| 2648 ASSERT(!IsActive()); | 2649 ASSERT(!IsActive()); |
| 2649 } | 2650 } |
| 2650 | 2651 |
| 2651 } } // namespace v8::internal | 2652 } } // namespace v8::internal |
| OLD | NEW |