Index: runtime/vm/intrinsifier_mips.cc |
=================================================================== |
--- runtime/vm/intrinsifier_mips.cc (revision 43426) |
+++ runtime/vm/intrinsifier_mips.cc (working copy) |
@@ -25,6 +25,11 @@ |
intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } |
+static bool TypeChecksEnabled() { |
+ return FLAG_enable_type_checks || Isolate::Current()->checked_mode(); |
+} |
+ |
+ |
static intptr_t ComputeObjectArrayTypeArgumentsOffset() { |
const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
const Class& cls = Class::Handle( |
@@ -42,7 +47,7 @@ |
void Intrinsifier::ObjectArraySetIndexed(Assembler* assembler) { |
Label fall_through; |
- if (FLAG_enable_type_checks) { |
+ if (TypeChecksEnabled()) { |
const intptr_t type_args_field_offset = |
ComputeObjectArrayTypeArgumentsOffset(); |
// Inline simple tests (Smi, null), fallthrough if not positive. |
@@ -139,7 +144,7 @@ |
// On stack: growable array (+1), value (+0). |
void Intrinsifier::GrowableArray_add(Assembler* assembler) { |
// In checked mode we need to type-check the incoming argument. |
- if (FLAG_enable_type_checks) return; |
+ if (TypeChecksEnabled()) return; |
Label fall_through; |
__ lw(T0, Address(SP, 1 * kWordSize)); // Array. |
__ lw(T1, FieldAddress(T0, GrowableObjectArray::length_offset())); |