| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 CreateSloppyFunctionMap(FUNCTION_WITHOUT_PROTOTYPE); | 569 CreateSloppyFunctionMap(FUNCTION_WITHOUT_PROTOTYPE); |
| 570 DCHECK(!empty_function_map->is_dictionary_map()); | 570 DCHECK(!empty_function_map->is_dictionary_map()); |
| 571 Map::SetPrototype(empty_function_map, object_function_prototype); | 571 Map::SetPrototype(empty_function_map, object_function_prototype); |
| 572 empty_function_map->set_is_prototype_map(true); | 572 empty_function_map->set_is_prototype_map(true); |
| 573 | 573 |
| 574 empty_function->set_map(*empty_function_map); | 574 empty_function->set_map(*empty_function_map); |
| 575 | 575 |
| 576 // --- E m p t y --- | 576 // --- E m p t y --- |
| 577 Handle<String> source = factory->NewStringFromStaticChars("() {}"); | 577 Handle<String> source = factory->NewStringFromStaticChars("() {}"); |
| 578 Handle<Script> script = factory->NewScript(source); | 578 Handle<Script> script = factory->NewScript(source); |
| 579 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); | 579 script->set_type(Script::TYPE_NATIVE); |
| 580 empty_function->shared()->set_start_position(0); | 580 empty_function->shared()->set_start_position(0); |
| 581 empty_function->shared()->set_end_position(source->length()); | 581 empty_function->shared()->set_end_position(source->length()); |
| 582 empty_function->shared()->DontAdaptArguments(); | 582 empty_function->shared()->DontAdaptArguments(); |
| 583 SharedFunctionInfo::SetScript(handle(empty_function->shared()), script); | 583 SharedFunctionInfo::SetScript(handle(empty_function->shared()), script); |
| 584 | 584 |
| 585 // Set prototypes for the function maps. | 585 // Set prototypes for the function maps. |
| 586 Handle<Map> sloppy_function_map(native_context()->sloppy_function_map(), | 586 Handle<Map> sloppy_function_map(native_context()->sloppy_function_map(), |
| 587 isolate); | 587 isolate); |
| 588 Handle<Map> sloppy_function_without_prototype_map( | 588 Handle<Map> sloppy_function_without_prototype_map( |
| 589 native_context()->sloppy_function_without_prototype_map(), isolate); | 589 native_context()->sloppy_function_without_prototype_map(), isolate); |
| (...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3264 } | 3264 } |
| 3265 | 3265 |
| 3266 | 3266 |
| 3267 // Called when the top-level V8 mutex is destroyed. | 3267 // Called when the top-level V8 mutex is destroyed. |
| 3268 void Bootstrapper::FreeThreadResources() { | 3268 void Bootstrapper::FreeThreadResources() { |
| 3269 DCHECK(!IsActive()); | 3269 DCHECK(!IsActive()); |
| 3270 } | 3270 } |
| 3271 | 3271 |
| 3272 } // namespace internal | 3272 } // namespace internal |
| 3273 } // namespace v8 | 3273 } // namespace v8 |
| OLD | NEW |