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

Side by Side Diff: src/factory.cc

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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/factory.h ('k') | src/flag-definitions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 // Set up the code pointer in both the shared function info and in 768 // Set up the code pointer in both the shared function info and in
769 // the function itself. 769 // the function itself.
770 function->shared()->set_code(*code); 770 function->shared()->set_code(*code);
771 function->set_code(*code); 771 function->set_code(*code);
772 772
773 if (force_initial_map || 773 if (force_initial_map ||
774 type != JS_OBJECT_TYPE || 774 type != JS_OBJECT_TYPE ||
775 instance_size != JSObject::kHeaderSize) { 775 instance_size != JSObject::kHeaderSize) {
776 Handle<Map> initial_map = NewMap(type, 776 Handle<Map> initial_map = NewMap(type,
777 instance_size, 777 instance_size,
778 GetInitialFastElementsKind()); 778 FAST_SMI_ONLY_ELEMENTS);
779 function->set_initial_map(*initial_map); 779 function->set_initial_map(*initial_map);
780 initial_map->set_constructor(*function); 780 initial_map->set_constructor(*function);
781 } 781 }
782 782
783 // Set function.prototype and give the prototype a constructor 783 // Set function.prototype and give the prototype a constructor
784 // property that refers to the function. 784 // property that refers to the function.
785 SetPrototypeProperty(function, prototype); 785 SetPrototypeProperty(function, prototype);
786 // Currently safe because it is only invoked from Genesis. 786 // Currently safe because it is only invoked from Genesis.
787 CHECK_NOT_EMPTY_HANDLE(isolate(), 787 CHECK_NOT_EMPTY_HANDLE(isolate(),
788 JSObject::SetLocalPropertyIgnoreAttributes( 788 JSObject::SetLocalPropertyIgnoreAttributes(
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 1006
1007 void Factory::EnsureCanContainHeapObjectElements(Handle<JSArray> array) { 1007 void Factory::EnsureCanContainHeapObjectElements(Handle<JSArray> array) {
1008 CALL_HEAP_FUNCTION_VOID( 1008 CALL_HEAP_FUNCTION_VOID(
1009 isolate(), 1009 isolate(),
1010 array->EnsureCanContainHeapObjectElements()); 1010 array->EnsureCanContainHeapObjectElements());
1011 } 1011 }
1012 1012
1013 1013
1014 void Factory::EnsureCanContainElements(Handle<JSArray> array, 1014 void Factory::EnsureCanContainElements(Handle<JSArray> array,
1015 Handle<FixedArrayBase> elements, 1015 Handle<FixedArrayBase> elements,
1016 uint32_t length,
1017 EnsureElementsMode mode) { 1016 EnsureElementsMode mode) {
1018 CALL_HEAP_FUNCTION_VOID( 1017 CALL_HEAP_FUNCTION_VOID(
1019 isolate(), 1018 isolate(),
1020 array->EnsureCanContainElements(*elements, length, mode)); 1019 array->EnsureCanContainElements(*elements, mode));
1021 } 1020 }
1022 1021
1023 1022
1024 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler, 1023 Handle<JSProxy> Factory::NewJSProxy(Handle<Object> handler,
1025 Handle<Object> prototype) { 1024 Handle<Object> prototype) {
1026 CALL_HEAP_FUNCTION( 1025 CALL_HEAP_FUNCTION(
1027 isolate(), 1026 isolate(),
1028 isolate()->heap()->AllocateJSProxy(*handler, *prototype), 1027 isolate()->heap()->AllocateJSProxy(*handler, *prototype),
1029 JSProxy); 1028 JSProxy);
1030 } 1029 }
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 1440
1442 1441
1443 Handle<Object> Factory::ToBoolean(bool value) { 1442 Handle<Object> Factory::ToBoolean(bool value) {
1444 return Handle<Object>(value 1443 return Handle<Object>(value
1445 ? isolate()->heap()->true_value() 1444 ? isolate()->heap()->true_value()
1446 : isolate()->heap()->false_value()); 1445 : isolate()->heap()->false_value());
1447 } 1446 }
1448 1447
1449 1448
1450 } } // namespace v8::internal 1449 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698