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

Side by Side Diff: src/regexp-macro-assembler-irregexp-inl.h

Issue 9854020: RegExp: Add support for table-based character class (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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
OLDNEW
1 // Copyright 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-2009 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void RegExpMacroAssemblerIrregexp::Emit16(uint32_t word) { 55 void RegExpMacroAssemblerIrregexp::Emit16(uint32_t word) {
56 ASSERT(pc_ <= buffer_.length()); 56 ASSERT(pc_ <= buffer_.length());
57 if (pc_ + 1 >= buffer_.length()) { 57 if (pc_ + 1 >= buffer_.length()) {
58 Expand(); 58 Expand();
59 } 59 }
60 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word; 60 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word;
61 pc_ += 2; 61 pc_ += 2;
62 } 62 }
63 63
64 64
65 void RegExpMacroAssemblerIrregexp::Emit8(uint32_t word) {
66 ASSERT(pc_ <= buffer_.length());
67 if (pc_ == buffer_.length()) {
68 Expand();
69 }
70 *reinterpret_cast<unsigned char*>(buffer_.start() + pc_) = word;
71 pc_ += 1;
72 }
73
74
65 void RegExpMacroAssemblerIrregexp::Emit32(uint32_t word) { 75 void RegExpMacroAssemblerIrregexp::Emit32(uint32_t word) {
66 ASSERT(pc_ <= buffer_.length()); 76 ASSERT(pc_ <= buffer_.length());
67 if (pc_ + 3 >= buffer_.length()) { 77 if (pc_ + 3 >= buffer_.length()) {
68 Expand(); 78 Expand();
69 } 79 }
70 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; 80 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word;
71 pc_ += 4; 81 pc_ += 4;
72 } 82 }
73 83
74 #endif // V8_INTERPRETED_REGEXP 84 #endif // V8_INTERPRETED_REGEXP
75 85
76 } } // namespace v8::internal 86 } } // namespace v8::internal
77 87
78 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ 88 #endif // V8_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698