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

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

Issue 1601743002: [regexp] do not include irregexp interpreter by default. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « src/regexp/regexp-macro-assembler-irregexp.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 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ 5 #ifndef V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
6 #define V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ 6 #define V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
7 7
8 #ifdef V8_INTERPRETED_REGEXP
9
8 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
9 #include "src/regexp/bytecodes-irregexp.h" 11 #include "src/regexp/bytecodes-irregexp.h"
10 12
11 namespace v8 { 13 namespace v8 {
12 namespace internal { 14 namespace internal {
13 15
14 #ifdef V8_INTERPRETED_REGEXP
15
16 void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte, 16 void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte,
17 uint32_t twenty_four_bits) { 17 uint32_t twenty_four_bits) {
18 uint32_t word = ((twenty_four_bits << BYTECODE_SHIFT) | byte); 18 uint32_t word = ((twenty_four_bits << BYTECODE_SHIFT) | byte);
19 DCHECK(pc_ <= buffer_.length()); 19 DCHECK(pc_ <= buffer_.length());
20 if (pc_ + 3 >= buffer_.length()) { 20 if (pc_ + 3 >= buffer_.length()) {
21 Expand(); 21 Expand();
22 } 22 }
23 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; 23 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word;
24 pc_ += 4; 24 pc_ += 4;
25 } 25 }
(...skipping 21 matching lines...) Expand all
47 47
48 void RegExpMacroAssemblerIrregexp::Emit32(uint32_t word) { 48 void RegExpMacroAssemblerIrregexp::Emit32(uint32_t word) {
49 DCHECK(pc_ <= buffer_.length()); 49 DCHECK(pc_ <= buffer_.length());
50 if (pc_ + 3 >= buffer_.length()) { 50 if (pc_ + 3 >= buffer_.length()) {
51 Expand(); 51 Expand();
52 } 52 }
53 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; 53 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word;
54 pc_ += 4; 54 pc_ += 4;
55 } 55 }
56 56
57 #endif // V8_INTERPRETED_REGEXP
58
59 } // namespace internal 57 } // namespace internal
60 } // namespace v8 58 } // namespace v8
61 59
60 #endif // V8_INTERPRETED_REGEXP
61
62 #endif // V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_ 62 #endif // V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
OLDNEW
« no previous file with comments | « src/regexp/regexp-macro-assembler-irregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698