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 "factory.h" | 5 #include "factory.h" |
6 | 6 |
7 #include "isolate-inl.h" | 7 #include "isolate-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 ASSERT(object_function->has_initial_map()); | 804 ASSERT(object_function->has_initial_map()); |
805 new_map = Map::Copy(handle(object_function->initial_map())); | 805 new_map = Map::Copy(handle(object_function->initial_map())); |
806 } | 806 } |
807 | 807 |
808 Handle<JSObject> prototype = NewJSObjectFromMap(new_map); | 808 Handle<JSObject> prototype = NewJSObjectFromMap(new_map); |
809 | 809 |
810 if (!function->shared()->is_generator()) { | 810 if (!function->shared()->is_generator()) { |
811 JSObject::SetLocalPropertyIgnoreAttributes(prototype, | 811 JSObject::SetLocalPropertyIgnoreAttributes(prototype, |
812 constructor_string(), | 812 constructor_string(), |
813 function, | 813 function, |
814 DONT_ENUM); | 814 DONT_ENUM).Assert(); |
815 } | 815 } |
816 | 816 |
817 return prototype; | 817 return prototype; |
818 } | 818 } |
819 | 819 |
820 | 820 |
821 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { | 821 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { |
822 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); | 822 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); |
823 } | 823 } |
824 | 824 |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1948 if (name->Equals(h->infinity_string())) return infinity_value(); | 1948 if (name->Equals(h->infinity_string())) return infinity_value(); |
1949 return Handle<Object>::null(); | 1949 return Handle<Object>::null(); |
1950 } | 1950 } |
1951 | 1951 |
1952 | 1952 |
1953 Handle<Object> Factory::ToBoolean(bool value) { | 1953 Handle<Object> Factory::ToBoolean(bool value) { |
1954 return value ? true_value() : false_value(); | 1954 return value ? true_value() : false_value(); |
1955 } | 1955 } |
1956 | 1956 |
1957 } } // namespace v8::internal | 1957 } } // namespace v8::internal |
OLD | NEW |