| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 if (force_initial_map || | 928 if (force_initial_map || |
| 929 type != JS_OBJECT_TYPE || | 929 type != JS_OBJECT_TYPE || |
| 930 instance_size != JSObject::kHeaderSize) { | 930 instance_size != JSObject::kHeaderSize) { |
| 931 Handle<Map> initial_map = NewMap(type, | 931 Handle<Map> initial_map = NewMap(type, |
| 932 instance_size, | 932 instance_size, |
| 933 GetInitialFastElementsKind()); | 933 GetInitialFastElementsKind()); |
| 934 function->set_initial_map(*initial_map); | 934 function->set_initial_map(*initial_map); |
| 935 initial_map->set_constructor(*function); | 935 initial_map->set_constructor(*function); |
| 936 } | 936 } |
| 937 | 937 |
| 938 SetPrototypeProperty(function, prototype); | 938 JSFunction::SetPrototype(function, prototype); |
| 939 return function; | 939 return function; |
| 940 } | 940 } |
| 941 | 941 |
| 942 | 942 |
| 943 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, | 943 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, |
| 944 Handle<Code> code) { | 944 Handle<Code> code) { |
| 945 Handle<JSFunction> function = NewFunctionWithoutPrototype(name, | 945 Handle<JSFunction> function = NewFunctionWithoutPrototype(name, |
| 946 CLASSIC_MODE); | 946 CLASSIC_MODE); |
| 947 function->shared()->set_code(*code); | 947 function->shared()->set_code(*code); |
| 948 function->set_code(*code); | 948 function->set_code(*code); |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 return Handle<Object>::null(); | 1611 return Handle<Object>::null(); |
| 1612 } | 1612 } |
| 1613 | 1613 |
| 1614 | 1614 |
| 1615 Handle<Object> Factory::ToBoolean(bool value) { | 1615 Handle<Object> Factory::ToBoolean(bool value) { |
| 1616 return value ? true_value() : false_value(); | 1616 return value ? true_value() : false_value(); |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 | 1619 |
| 1620 } } // namespace v8::internal | 1620 } } // namespace v8::internal |
| OLD | NEW |