OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4716 return (first_ & (1 << value)) != 0; | 4716 return (first_ & (1 << value)) != 0; |
4717 } else if (remaining_ == NULL) { | 4717 } else if (remaining_ == NULL) { |
4718 return false; | 4718 return false; |
4719 } else { | 4719 } else { |
4720 return remaining_->Contains(value); | 4720 return remaining_->Contains(value); |
4721 } | 4721 } |
4722 } | 4722 } |
4723 | 4723 |
4724 | 4724 |
4725 const uc16 DispatchTable::Config::kNoKey = unibrow::Utf8::kBadChar; | 4725 const uc16 DispatchTable::Config::kNoKey = unibrow::Utf8::kBadChar; |
4726 const DispatchTable::Entry DispatchTable::Config::kNoValue; | |
4727 | 4726 |
4728 | 4727 |
4729 void DispatchTable::AddRange(CharacterRange full_range, int value) { | 4728 void DispatchTable::AddRange(CharacterRange full_range, int value) { |
4730 CharacterRange current = full_range; | 4729 CharacterRange current = full_range; |
4731 if (tree()->is_empty()) { | 4730 if (tree()->is_empty()) { |
4732 // If this is the first range we just insert into the table. | 4731 // If this is the first range we just insert into the table. |
4733 ZoneSplayTree<Config>::Locator loc; | 4732 ZoneSplayTree<Config>::Locator loc; |
4734 ASSERT_RESULT(tree()->Insert(current.from(), &loc)); | 4733 ASSERT_RESULT(tree()->Insert(current.from(), &loc)); |
4735 loc.set_value(Entry(current.from(), current.to(), empty()->Extend(value))); | 4734 loc.set_value(Entry(current.from(), current.to(), empty()->Extend(value))); |
4736 return; | 4735 return; |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5333 } | 5332 } |
5334 | 5333 |
5335 return compiler.Assemble(¯o_assembler, | 5334 return compiler.Assemble(¯o_assembler, |
5336 node, | 5335 node, |
5337 data->capture_count, | 5336 data->capture_count, |
5338 pattern); | 5337 pattern); |
5339 } | 5338 } |
5340 | 5339 |
5341 | 5340 |
5342 }} // namespace v8::internal | 5341 }} // namespace v8::internal |
OLD | NEW |