| OLD | NEW |
| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 // Assemble. | 238 // Assemble. |
| 239 left->right_ = current->left_; | 239 left->right_ = current->left_; |
| 240 right->left_ = current->right_; | 240 right->left_ = current->right_; |
| 241 current->left_ = dummy->right_; | 241 current->left_ = dummy->right_; |
| 242 current->right_ = dummy->left_; | 242 current->right_ = dummy->left_; |
| 243 root_ = current; | 243 root_ = current; |
| 244 } | 244 } |
| 245 | 245 |
| 246 | 246 |
| 247 template <typename Node, class Callback> |
| 248 static void DoForEach(Node* node, Callback callback) { |
| 249 if (node == NULL) return; |
| 250 DoForEach<Node, Callback>(node->left(), callback); |
| 251 callback.Call(node->key(), node->value()); |
| 252 DoForEach<Node, Callback>(node->right(), callback); |
| 253 } |
| 254 |
| 255 |
| 247 OutSet::OutSet(unsigned value) | 256 OutSet::OutSet(unsigned value) |
| 248 : first_(0), | 257 : first_(0), |
| 249 remaining_(NULL) { | 258 remaining_(NULL) { |
| 250 Set(value); | 259 Set(value); |
| 251 } | 260 } |
| 252 | 261 |
| 253 | 262 |
| 254 DispatchTable::Entry::Entry(uc16 from, uc16 to, unsigned value) | 263 DispatchTable::Entry::Entry(uc16 from, uc16 to, unsigned value) |
| 255 : from_(from), | 264 : from_(from), |
| 256 to_(to), | 265 to_(to), |
| 257 out_set_(value) { } | 266 out_set_(value) { } |
| 258 | 267 |
| 259 | 268 |
| 260 } // namespace internal | 269 } // namespace internal |
| 261 } // namespace v8 | 270 } // namespace v8 |
| 262 | 271 |
| 263 | 272 |
| 264 #endif // V8_JSREGEXP_INL_H_ | 273 #endif // V8_JSREGEXP_INL_H_ |
| OLD | NEW |