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

Side by Side Diff: src/factory.cc

Issue 7540025: Merge regexp codeflushing (r8532+r8560) to the 3.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.3/
Patch Set: '' Created 9 years, 4 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/arm/code-stubs-arm.cc ('k') | src/heap.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 store->set(JSRegExp::kAtomPatternIndex, *data); 1182 store->set(JSRegExp::kAtomPatternIndex, *data);
1183 regexp->set_data(*store); 1183 regexp->set_data(*store);
1184 } 1184 }
1185 1185
1186 void Factory::SetRegExpIrregexpData(Handle<JSRegExp> regexp, 1186 void Factory::SetRegExpIrregexpData(Handle<JSRegExp> regexp,
1187 JSRegExp::Type type, 1187 JSRegExp::Type type,
1188 Handle<String> source, 1188 Handle<String> source,
1189 JSRegExp::Flags flags, 1189 JSRegExp::Flags flags,
1190 int capture_count) { 1190 int capture_count) {
1191 Handle<FixedArray> store = NewFixedArray(JSRegExp::kIrregexpDataSize); 1191 Handle<FixedArray> store = NewFixedArray(JSRegExp::kIrregexpDataSize);
1192 1192 Smi* uninitialized = Smi::FromInt(JSRegExp::kUninitializedValue);
1193 store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); 1193 store->set(JSRegExp::kTagIndex, Smi::FromInt(type));
1194 store->set(JSRegExp::kSourceIndex, *source); 1194 store->set(JSRegExp::kSourceIndex, *source);
1195 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value())); 1195 store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value()));
1196 store->set(JSRegExp::kIrregexpASCIICodeIndex, HEAP->the_hole_value()); 1196 store->set(JSRegExp::kIrregexpASCIICodeIndex, uninitialized);
1197 store->set(JSRegExp::kIrregexpUC16CodeIndex, HEAP->the_hole_value()); 1197 store->set(JSRegExp::kIrregexpUC16CodeIndex, uninitialized);
1198 store->set(JSRegExp::kIrregexpASCIICodeSavedIndex, uninitialized);
1199 store->set(JSRegExp::kIrregexpUC16CodeSavedIndex, uninitialized);
1198 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0)); 1200 store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0));
1199 store->set(JSRegExp::kIrregexpCaptureCountIndex, 1201 store->set(JSRegExp::kIrregexpCaptureCountIndex,
1200 Smi::FromInt(capture_count)); 1202 Smi::FromInt(capture_count));
1201 regexp->set_data(*store); 1203 regexp->set_data(*store);
1202 } 1204 }
1203 1205
1204 1206
1205 1207
1206 void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc, 1208 void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc,
1207 Handle<JSObject> instance, 1209 Handle<JSObject> instance,
1208 bool* pending_exception) { 1210 bool* pending_exception) {
1209 // Configure the instance by adding the properties specified by the 1211 // Configure the instance by adding the properties specified by the
1210 // instance template. 1212 // instance template.
1211 Handle<Object> instance_template = Handle<Object>(desc->instance_template()); 1213 Handle<Object> instance_template = Handle<Object>(desc->instance_template());
1212 if (!instance_template->IsUndefined()) { 1214 if (!instance_template->IsUndefined()) {
1213 Execution::ConfigureInstance(instance, 1215 Execution::ConfigureInstance(instance,
1214 instance_template, 1216 instance_template,
1215 pending_exception); 1217 pending_exception);
1216 } else { 1218 } else {
1217 *pending_exception = false; 1219 *pending_exception = false;
1218 } 1220 }
1219 } 1221 }
1220 1222
1221 1223
1222 } } // namespace v8::internal 1224 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698