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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 1393373003: Remove isolate argument from handle allocation: Part I (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanups Created 5 years, 2 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
« no previous file with comments | « runtime/vm/compiler_test.cc ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 6ccc307e2ee532ea554ffcf4ba4920feea067d42..61c09a610eaefdecefea869f93e765cd73937838 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -431,7 +431,7 @@ void ConstantPropagator::VisitIfThenElse(IfThenElseInstr* instr) {
ASSERT(value.IsBool());
bool result = Bool::Cast(value).value();
SetValue(instr,
- Smi::Handle(I, Smi::New(
+ Smi::Handle(Z, Smi::New(
result ? instr->if_true() : instr->if_false())));
}
}
@@ -521,9 +521,9 @@ void ConstantPropagator::VisitTestSmi(TestSmiInstr* instr) {
!left.IsBigint() && !right.IsBigint()) {
const bool result = CompareIntegers(
instr->kind(),
- Integer::Handle(I, Integer::Cast(left).BitOp(Token::kBIT_AND,
+ Integer::Handle(Z, Integer::Cast(left).BitOp(Token::kBIT_AND,
Integer::Cast(right))),
- Smi::Handle(I, Smi::New(0)));
+ Smi::Handle(Z, Smi::New(0)));
SetValue(instr, result ? Bool::True() : Bool::False());
} else {
SetValue(instr, non_constant_);
@@ -662,14 +662,14 @@ void ConstantPropagator::VisitLoadIndexed(LoadIndexedInstr* instr) {
if (array_obj.IsString()) {
const String& str = String::Cast(array_obj);
if (str.Length() > index) {
- SetValue(instr, Smi::Handle(I,
+ SetValue(instr, Smi::Handle(Z,
Smi::New(static_cast<intptr_t>(str.CharAt(index)))));
return;
}
} else if (array_obj.IsArray()) {
const Array& a = Array::Cast(array_obj);
if ((a.Length() > index) && a.IsImmutable()) {
- Instance& result = Instance::Handle(I);
+ Instance& result = Instance::Handle(Z);
result ^= a.At(index);
SetValue(instr, result);
return;
@@ -706,7 +706,7 @@ void ConstantPropagator::VisitInitStaticField(InitStaticFieldInstr* instr) {
void ConstantPropagator::VisitLoadStaticField(LoadStaticFieldInstr* instr) {
const Field& field = instr->StaticField();
ASSERT(field.is_static());
- Instance& obj = Instance::Handle(I, field.StaticValue());
+ Instance& obj = Instance::Handle(Z, field.StaticValue());
if (field.is_final() && (obj.raw() != Object::sentinel().raw()) &&
(obj.raw() != Object::transition_sentinel().raw())) {
if (obj.IsSmi() || obj.IsOld()) {
@@ -924,7 +924,7 @@ void ConstantPropagator::VisitBinaryIntegerOp(BinaryIntegerOpInstr* binary_op) {
const Integer& left_int = Integer::Cast(left);
const Integer& right_int = Integer::Cast(right);
const Integer& result =
- Integer::Handle(I, binary_op->Evaluate(left_int, right_int));
+ Integer::Handle(Z, binary_op->Evaluate(left_int, right_int));
if (!result.IsNull()) {
SetValue(binary_op, Integer::ZoneHandle(Z, result.raw()));
return;
@@ -983,7 +983,7 @@ void ConstantPropagator::VisitUnaryIntegerOp(UnaryIntegerOpInstr* unary_op) {
if (IsConstant(value) && value.IsInteger()) {
const Integer& value_int = Integer::Cast(value);
const Integer& result =
- Integer::Handle(I, unary_op->Evaluate(value_int));
+ Integer::Handle(Z, unary_op->Evaluate(value_int));
if (!result.IsNull()) {
SetValue(unary_op, Integer::ZoneHandle(Z, result.raw()));
return;
@@ -1018,7 +1018,7 @@ void ConstantPropagator::VisitUnaryDoubleOp(UnaryDoubleOpInstr* instr) {
void ConstantPropagator::VisitSmiToDouble(SmiToDoubleInstr* instr) {
const Object& value = instr->value()->definition()->constant_value();
if (IsConstant(value) && value.IsInteger()) {
- SetValue(instr, Double::Handle(I,
+ SetValue(instr, Double::Handle(Z,
Double::New(Integer::Cast(value).AsDoubleValue(), Heap::kOld)));
} else if (!IsUnknown(value)) {
SetValue(instr, non_constant_);
@@ -1029,7 +1029,7 @@ void ConstantPropagator::VisitSmiToDouble(SmiToDoubleInstr* instr) {
void ConstantPropagator::VisitMintToDouble(MintToDoubleInstr* instr) {
const Object& value = instr->value()->definition()->constant_value();
if (IsConstant(value) && value.IsInteger()) {
- SetValue(instr, Double::Handle(I,
+ SetValue(instr, Double::Handle(Z,
Double::New(Integer::Cast(value).AsDoubleValue(), Heap::kOld)));
} else if (!IsUnknown(value)) {
SetValue(instr, non_constant_);
@@ -1040,7 +1040,7 @@ void ConstantPropagator::VisitMintToDouble(MintToDoubleInstr* instr) {
void ConstantPropagator::VisitInt32ToDouble(Int32ToDoubleInstr* instr) {
const Object& value = instr->value()->definition()->constant_value();
if (IsConstant(value) && value.IsInteger()) {
- SetValue(instr, Double::Handle(I,
+ SetValue(instr, Double::Handle(Z,
Double::New(Integer::Cast(value).AsDoubleValue(), Heap::kOld)));
} else if (!IsUnknown(value)) {
SetValue(instr, non_constant_);
« no previous file with comments | « runtime/vm/compiler_test.cc ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698