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

Unified Diff: runtime/vm/regexp_assembler_ir.cc

Issue 2982823002: Option to truncate integers to 64 bits, part 2 (Closed)
Patch Set: Fixes for review comments Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/regexp_assembler_ir.cc
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index 2d4832910c5fedeb622855aff6bb439dafd5b609..db30e92f9b7eb36765df662dd9f80207d5478dc2 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -360,8 +360,8 @@ ConstantInstr* IRRegExpMacroAssembler::Int64Constant(int64_t value) const {
}
ConstantInstr* IRRegExpMacroAssembler::Uint64Constant(uint64_t value) const {
- return new (Z) ConstantInstr(
- Integer::ZoneHandle(Z, Integer::NewFromUint64(value, Heap::kOld)));
+ ASSERT(value < static_cast<uint64_t>(kMaxInt64));
+ return Int64Constant(static_cast<int64_t>(value));
}
ConstantInstr* IRRegExpMacroAssembler::BoolConstant(bool value) const {

Powered by Google App Engine
This is Rietveld 408576698