OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/regexp_assembler_ir.h" | 5 #include "vm/regexp_assembler_ir.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 | 353 |
354 return local; | 354 return local; |
355 } | 355 } |
356 | 356 |
357 ConstantInstr* IRRegExpMacroAssembler::Int64Constant(int64_t value) const { | 357 ConstantInstr* IRRegExpMacroAssembler::Int64Constant(int64_t value) const { |
358 return new (Z) | 358 return new (Z) |
359 ConstantInstr(Integer::ZoneHandle(Z, Integer::New(value, Heap::kOld))); | 359 ConstantInstr(Integer::ZoneHandle(Z, Integer::New(value, Heap::kOld))); |
360 } | 360 } |
361 | 361 |
362 ConstantInstr* IRRegExpMacroAssembler::Uint64Constant(uint64_t value) const { | 362 ConstantInstr* IRRegExpMacroAssembler::Uint64Constant(uint64_t value) const { |
363 return new (Z) ConstantInstr( | 363 ASSERT(value < static_cast<uint64_t>(kMaxInt64)); |
364 Integer::ZoneHandle(Z, Integer::NewFromUint64(value, Heap::kOld))); | 364 return Int64Constant(static_cast<int64_t>(value)); |
365 } | 365 } |
366 | 366 |
367 ConstantInstr* IRRegExpMacroAssembler::BoolConstant(bool value) const { | 367 ConstantInstr* IRRegExpMacroAssembler::BoolConstant(bool value) const { |
368 return new (Z) ConstantInstr(value ? Bool::True() : Bool::False()); | 368 return new (Z) ConstantInstr(value ? Bool::True() : Bool::False()); |
369 } | 369 } |
370 | 370 |
371 ConstantInstr* IRRegExpMacroAssembler::StringConstant(const char* value) const { | 371 ConstantInstr* IRRegExpMacroAssembler::StringConstant(const char* value) const { |
372 return new (Z) | 372 return new (Z) |
373 ConstantInstr(String::ZoneHandle(Z, String::New(value, Heap::kOld))); | 373 ConstantInstr(String::ZoneHandle(Z, String::New(value, Heap::kOld))); |
374 } | 374 } |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 Value* index_val = BindLoadLocal(*index); | 1725 Value* index_val = BindLoadLocal(*index); |
1726 | 1726 |
1727 return Bind(new (Z) LoadCodeUnitsInstr(pattern_val, index_val, characters, | 1727 return Bind(new (Z) LoadCodeUnitsInstr(pattern_val, index_val, characters, |
1728 specialization_cid_, | 1728 specialization_cid_, |
1729 TokenPosition::kNoSource)); | 1729 TokenPosition::kNoSource)); |
1730 } | 1730 } |
1731 | 1731 |
1732 #undef __ | 1732 #undef __ |
1733 | 1733 |
1734 } // namespace dart | 1734 } // namespace dart |
OLD | NEW |