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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 } | 698 } |
699 | 699 |
700 | 700 |
701 Handle<Map> Genesis::CreateStrongFunctionMap( | 701 Handle<Map> Genesis::CreateStrongFunctionMap( |
702 Handle<JSFunction> empty_function, bool is_constructor) { | 702 Handle<JSFunction> empty_function, bool is_constructor) { |
703 Handle<Map> map = factory()->NewMap(JS_FUNCTION_TYPE, JSFunction::kSize); | 703 Handle<Map> map = factory()->NewMap(JS_FUNCTION_TYPE, JSFunction::kSize); |
704 SetStrongFunctionInstanceDescriptor(map); | 704 SetStrongFunctionInstanceDescriptor(map); |
705 map->set_function_with_prototype(is_constructor); | 705 map->set_function_with_prototype(is_constructor); |
706 Map::SetPrototype(map, empty_function); | 706 Map::SetPrototype(map, empty_function); |
707 map->set_is_extensible(is_constructor); | 707 map->set_is_extensible(is_constructor); |
708 // TODO(rossberg): mark strong | 708 map->set_is_strong(true); |
709 return map; | 709 return map; |
710 } | 710 } |
711 | 711 |
712 | 712 |
713 void Genesis::CreateStrictModeFunctionMaps(Handle<JSFunction> empty) { | 713 void Genesis::CreateStrictModeFunctionMaps(Handle<JSFunction> empty) { |
714 // Allocate map for the prototype-less strict mode instances. | 714 // Allocate map for the prototype-less strict mode instances. |
715 Handle<Map> strict_function_without_prototype_map = | 715 Handle<Map> strict_function_without_prototype_map = |
716 CreateStrictFunctionMap(FUNCTION_WITHOUT_PROTOTYPE, empty); | 716 CreateStrictFunctionMap(FUNCTION_WITHOUT_PROTOTYPE, empty); |
717 native_context()->set_strict_function_without_prototype_map( | 717 native_context()->set_strict_function_without_prototype_map( |
718 *strict_function_without_prototype_map); | 718 *strict_function_without_prototype_map); |
(...skipping 2297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3016 return from + sizeof(NestingCounterType); | 3016 return from + sizeof(NestingCounterType); |
3017 } | 3017 } |
3018 | 3018 |
3019 | 3019 |
3020 // Called when the top-level V8 mutex is destroyed. | 3020 // Called when the top-level V8 mutex is destroyed. |
3021 void Bootstrapper::FreeThreadResources() { | 3021 void Bootstrapper::FreeThreadResources() { |
3022 DCHECK(!IsActive()); | 3022 DCHECK(!IsActive()); |
3023 } | 3023 } |
3024 | 3024 |
3025 } } // namespace v8::internal | 3025 } } // namespace v8::internal |
OLD | NEW |