| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 instance_size, | 744 instance_size, |
| 745 default_elements_kind); | 745 default_elements_kind); |
| 746 function->set_initial_map(*initial_map); | 746 function->set_initial_map(*initial_map); |
| 747 initial_map->set_constructor(*function); | 747 initial_map->set_constructor(*function); |
| 748 } | 748 } |
| 749 | 749 |
| 750 // Set function.prototype and give the prototype a constructor | 750 // Set function.prototype and give the prototype a constructor |
| 751 // property that refers to the function. | 751 // property that refers to the function. |
| 752 SetPrototypeProperty(function, prototype); | 752 SetPrototypeProperty(function, prototype); |
| 753 // Currently safe because it is only invoked from Genesis. | 753 // Currently safe because it is only invoked from Genesis. |
| 754 SetLocalPropertyNoThrow(prototype, constructor_symbol(), function, DONT_ENUM); | 754 JSObject::SetLocalPropertyNoThrow( |
| 755 prototype, constructor_symbol(), function, DONT_ENUM); |
| 755 return function; | 756 return function; |
| 756 } | 757 } |
| 757 | 758 |
| 758 | 759 |
| 759 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, | 760 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, |
| 760 Handle<Code> code) { | 761 Handle<Code> code) { |
| 761 Handle<JSFunction> function = NewFunctionWithoutPrototype(name, | 762 Handle<JSFunction> function = NewFunctionWithoutPrototype(name, |
| 762 CLASSIC_MODE); | 763 CLASSIC_MODE); |
| 763 function->shared()->set_code(*code); | 764 function->shared()->set_code(*code); |
| 764 function->set_code(*code); | 765 function->set_code(*code); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 | 1382 |
| 1382 | 1383 |
| 1383 Handle<Object> Factory::ToBoolean(bool value) { | 1384 Handle<Object> Factory::ToBoolean(bool value) { |
| 1384 return Handle<Object>(value | 1385 return Handle<Object>(value |
| 1385 ? isolate()->heap()->true_value() | 1386 ? isolate()->heap()->true_value() |
| 1386 : isolate()->heap()->false_value()); | 1387 : isolate()->heap()->false_value()); |
| 1387 } | 1388 } |
| 1388 | 1389 |
| 1389 | 1390 |
| 1390 } } // namespace v8::internal | 1391 } } // namespace v8::internal |
| OLD | NEW |