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

Side by Side Diff: src/objects-inl.h

Issue 28311: Flattened the representation of compiled RegExp data. (Closed)
Patch Set: ... and it lints. 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
« src/jsregexp.cc ('K') | « src/objects-debug.cc ('k') | no next file » | 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 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2330 return pattern; 2330 return pattern;
2331 } 2331 }
2332 2332
2333 2333
2334 Object* JSRegExp::DataAt(int index) { 2334 Object* JSRegExp::DataAt(int index) {
2335 ASSERT(TypeTag() != NOT_COMPILED); 2335 ASSERT(TypeTag() != NOT_COMPILED);
2336 return FixedArray::cast(data())->get(index); 2336 return FixedArray::cast(data())->get(index);
2337 } 2337 }
2338 2338
2339 2339
2340 void JSRegExp::SetDataAt(int index, Object* value) {
2341 ASSERT(TypeTag() != NOT_COMPILED);
2342 ASSERT(index >= kDataIndex); // Only implementation data can be set this way.
2343 FixedArray::cast(data())->set(index, value);
2344 }
2345
2346
2340 bool JSObject::HasFastElements() { 2347 bool JSObject::HasFastElements() {
2341 return !elements()->IsDictionary(); 2348 return !elements()->IsDictionary();
2342 } 2349 }
2343 2350
2344 2351
2345 bool JSObject::HasNamedInterceptor() { 2352 bool JSObject::HasNamedInterceptor() {
2346 return map()->has_named_interceptor(); 2353 return map()->has_named_interceptor();
2347 } 2354 }
2348 2355
2349 2356
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2552 #undef WRITE_INT_FIELD 2559 #undef WRITE_INT_FIELD
2553 #undef READ_SHORT_FIELD 2560 #undef READ_SHORT_FIELD
2554 #undef WRITE_SHORT_FIELD 2561 #undef WRITE_SHORT_FIELD
2555 #undef READ_BYTE_FIELD 2562 #undef READ_BYTE_FIELD
2556 #undef WRITE_BYTE_FIELD 2563 #undef WRITE_BYTE_FIELD
2557 2564
2558 2565
2559 } } // namespace v8::internal 2566 } } // namespace v8::internal
2560 2567
2561 #endif // V8_OBJECTS_INL_H_ 2568 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/jsregexp.cc ('K') | « src/objects-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698