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

Unified Diff: src/jsregexp.cc

Issue 8098: - Added conditional write barrier to object accessors.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
===================================================================
--- src/jsregexp.cc (revision 564)
+++ src/jsregexp.cc (working copy)
@@ -222,8 +222,12 @@
if (value == -1) return Factory::null_value();
Handle<FixedArray> array = Factory::NewFixedArray(2);
- array->set(0, Smi::FromInt(value));
- array->set(1, Smi::FromInt(value + needle->length()));
+ array->set(0,
+ Smi::FromInt(value),
+ SKIP_WRITE_BARRIER);
+ array->set(1,
+ Smi::FromInt(value + needle->length()),
+ SKIP_WRITE_BARRIER);
return Factory::NewJSArrayWithElements(array);
}
@@ -247,8 +251,12 @@
int end = value + needle_length;
Handle<FixedArray> array = Factory::NewFixedArray(2);
- array->set(0, Smi::FromInt(value));
- array->set(1, Smi::FromInt(end));
+ array->set(0,
+ Smi::FromInt(value),
+ SKIP_WRITE_BARRIER);
+ array->set(1,
+ Smi::FromInt(end),
+ SKIP_WRITE_BARRIER);
Handle<JSArray> pair = Factory::NewJSArrayWithElements(array);
SetElement(result, match_count, pair);
match_count++;
@@ -372,8 +380,12 @@
Handle<FixedArray> array = Factory::NewFixedArray(2 * (num_captures+1));
// The captures come in (start, end+1) pairs.
for (int i = 0; i < 2 * (num_captures+1); i += 2) {
- array->set(i, Smi::FromInt(offsets_vector[i]));
- array->set(i+1, Smi::FromInt(offsets_vector[i+1]));
+ array->set(i,
+ Smi::FromInt(offsets_vector[i]),
+ SKIP_WRITE_BARRIER);
+ array->set(i+1,
+ Smi::FromInt(offsets_vector[i+1]),
+ SKIP_WRITE_BARRIER);
}
return Factory::NewJSArrayWithElements(array);
}
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698