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

Side by Side Diff: src/factory.cc

Issue 39186: Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/jsregexp.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 if (result->IsMap()) return Handle<Map>::cast(result); 819 if (result->IsMap()) return Handle<Map>::cast(result);
820 // Create a new map and add it to the cache. 820 // Create a new map and add it to the cache.
821 Handle<Map> map = 821 Handle<Map> map =
822 CopyMap(Handle<Map>(context->object_function()->initial_map()), 822 CopyMap(Handle<Map>(context->object_function()->initial_map()),
823 keys->length()); 823 keys->length());
824 AddToMapCache(context, keys, map); 824 AddToMapCache(context, keys, map);
825 return Handle<Map>(map); 825 return Handle<Map>(map);
826 } 826 }
827 827
828 828
829 void Factory::SetRegExpAtomData(Handle<JSRegExp> regexp, 829 void Factory::SetRegExpData(Handle<JSRegExp> regexp,
830 JSRegExp::Type type, 830 JSRegExp::Type type,
831 Handle<String> source, 831 Handle<String> source,
832 JSRegExp::Flags flags, 832 JSRegExp::Flags flags,
833 Handle<Object> data) { 833 Handle<Object> data) {
834 Handle<FixedArray> store = NewFixedArray(JSRegExp::kAtomDataSize); 834 Handle<FixedArray> store = NewFixedArray(JSRegExp::kDataSize);
835
836 store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); 835 store->set(JSRegExp::kTagIndex, Smi::FromInt(type));
837 store->set(JSRegExp::kSourceIndex, *source); 836 store->set(JSRegExp::kSourceIndex, *source);
838 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value())); 837 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value()));
839 store->set(JSRegExp::kAtomPatternIndex, *data); 838 store->set(JSRegExp::kAtomPatternIndex, *data);
840 regexp->set_data(*store); 839 regexp->set_data(*store);
841 } 840 }
842 841
843 void Factory::SetRegExpIrregexpData(Handle<JSRegExp> regexp,
844 JSRegExp::Type type,
845 Handle<String> source,
846 JSRegExp::Flags flags,
847 int capture_count) {
848 Handle<FixedArray> store = NewFixedArray(JSRegExp::kIrregexpDataSize);
849
850 store->set(JSRegExp::kTagIndex, Smi::FromInt(type));
851 store->set(JSRegExp::kSourceIndex, *source);
852 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value()));
853 store->set(JSRegExp::kIrregexpASCIICodeIndex, Heap::the_hole_value());
854 store->set(JSRegExp::kIrregexpUC16CodeIndex, Heap::the_hole_value());
855 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0));
856 store->set(JSRegExp::kIrregexpCaptureCountIndex,
857 Smi::FromInt(capture_count));
858 regexp->set_data(*store);
859 }
860
861
862 842
863 void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc, 843 void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc,
864 Handle<JSObject> instance, 844 Handle<JSObject> instance,
865 bool* pending_exception) { 845 bool* pending_exception) {
866 // Configure the instance by adding the properties specified by the 846 // Configure the instance by adding the properties specified by the
867 // instance template. 847 // instance template.
868 Handle<Object> instance_template = Handle<Object>(desc->instance_template()); 848 Handle<Object> instance_template = Handle<Object>(desc->instance_template());
869 if (!instance_template->IsUndefined()) { 849 if (!instance_template->IsUndefined()) {
870 Execution::ConfigureInstance(instance, 850 Execution::ConfigureInstance(instance,
871 instance_template, 851 instance_template,
872 pending_exception); 852 pending_exception);
873 } else { 853 } else {
874 *pending_exception = false; 854 *pending_exception = false;
875 } 855 }
876 } 856 }
877 857
878 858
879 } } // namespace v8::internal 859 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698