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

Side by Side Diff: src/factory.cc

Issue 10743003: Splitting DescriptorArray::CopyInsert into CopyInsert and CopyReplace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 5 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 | « no previous file | src/objects.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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 } 881 }
882 882
883 883
884 Handle<Code> Factory::CopyCode(Handle<Code> code, Vector<byte> reloc_info) { 884 Handle<Code> Factory::CopyCode(Handle<Code> code, Vector<byte> reloc_info) {
885 CALL_HEAP_FUNCTION(isolate(), 885 CALL_HEAP_FUNCTION(isolate(),
886 isolate()->heap()->CopyCode(*code, reloc_info), 886 isolate()->heap()->CopyCode(*code, reloc_info),
887 Code); 887 Code);
888 } 888 }
889 889
890 890
891 MUST_USE_RESULT static inline MaybeObject* DoCopyInsert( 891 MUST_USE_RESULT static inline MaybeObject* DoCopyAdd(
892 DescriptorArray* array, 892 DescriptorArray* array,
893 String* key, 893 String* key,
894 Object* value, 894 Object* value,
895 PropertyAttributes attributes) { 895 PropertyAttributes attributes) {
896 CallbacksDescriptor desc(key, value, attributes, 0); 896 CallbacksDescriptor desc(key, value, attributes, 0);
897 MaybeObject* obj = array->CopyInsert(&desc); 897 MaybeObject* obj = array->CopyAdd(&desc);
898 return obj; 898 return obj;
899 } 899 }
900 900
901 901
902 // Allocate the new array. 902 // Allocate the new array.
903 Handle<DescriptorArray> Factory::CopyAppendForeignDescriptor( 903 Handle<DescriptorArray> Factory::CopyAppendForeignDescriptor(
904 Handle<DescriptorArray> array, 904 Handle<DescriptorArray> array,
905 Handle<String> key, 905 Handle<String> key,
906 Handle<Object> value, 906 Handle<Object> value,
907 PropertyAttributes attributes) { 907 PropertyAttributes attributes) {
908 CALL_HEAP_FUNCTION(isolate(), 908 CALL_HEAP_FUNCTION(isolate(),
909 DoCopyInsert(*array, *key, *value, attributes), 909 DoCopyAdd(*array, *key, *value, attributes),
910 DescriptorArray); 910 DescriptorArray);
911 } 911 }
912 912
913 913
914 Handle<String> Factory::SymbolFromString(Handle<String> value) { 914 Handle<String> Factory::SymbolFromString(Handle<String> value) {
915 CALL_HEAP_FUNCTION(isolate(), 915 CALL_HEAP_FUNCTION(isolate(),
916 isolate()->heap()->LookupSymbol(*value), String); 916 isolate()->heap()->LookupSymbol(*value), String);
917 } 917 }
918 918
919 919
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 1492
1493 1493
1494 Handle<Object> Factory::ToBoolean(bool value) { 1494 Handle<Object> Factory::ToBoolean(bool value) {
1495 return Handle<Object>(value 1495 return Handle<Object>(value
1496 ? isolate()->heap()->true_value() 1496 ? isolate()->heap()->true_value()
1497 : isolate()->heap()->false_value()); 1497 : isolate()->heap()->false_value());
1498 } 1498 }
1499 1499
1500 1500
1501 } } // namespace v8::internal 1501 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698