Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: src/factory.cc

Issue 9008012: Move handlified functions from handles.cc to objects.cc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More formatting fixes. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/debug.cc ('k') | src/handles.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 CHECK_NOT_EMPTY_HANDLE(isolate(),
755 JSObject::SetLocalPropertyIgnoreAttributes(
756 prototype, constructor_symbol(),
757 function, DONT_ENUM));
755 return function; 758 return function;
756 } 759 }
757 760
758 761
759 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name, 762 Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name,
760 Handle<Code> code) { 763 Handle<Code> code) {
761 Handle<JSFunction> function = NewFunctionWithoutPrototype(name, 764 Handle<JSFunction> function = NewFunctionWithoutPrototype(name,
762 CLASSIC_MODE); 765 CLASSIC_MODE);
763 function->shared()->set_code(*code); 766 function->shared()->set_code(*code);
764 function->set_code(*code); 767 function->set_code(*code);
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 1384
1382 1385
1383 Handle<Object> Factory::ToBoolean(bool value) { 1386 Handle<Object> Factory::ToBoolean(bool value) {
1384 return Handle<Object>(value 1387 return Handle<Object>(value
1385 ? isolate()->heap()->true_value() 1388 ? isolate()->heap()->true_value()
1386 : isolate()->heap()->false_value()); 1389 : isolate()->heap()->false_value());
1387 } 1390 }
1388 1391
1389 1392
1390 } } // namespace v8::internal 1393 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698