Reviewers: Michael Achenbach,

Message:
As discussed offline... PTAL

Description:
Turn CHECK()s into ASSERT()s.

Please review this at https://codereview.chromium.org/275433002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+20, -15 lines):
  M src/arm/lithium-codegen-arm.cc
  M src/arm64/lithium-codegen-arm64.cc
  M src/ia32/lithium-codegen-ia32.cc
  M src/mips/lithium-codegen-mips.cc
  M src/x64/lithium-codegen-x64.cc


Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 6f73c1dde433d0c87ac2c73dd9b35cdd03292e7c..5a01d3bc84205a4b38868f142295cb7969e99e92 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -1877,9 +1877,10 @@ void LCodeGen::DoConstantT(LConstantT* instr) {
   AllowDeferredHandleDereference smi_check;
   if (instr->hydrogen()->HasObjectMap()) {
     Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle();
-    CHECK(object->IsHeapObject());
-    CHECK(!object_map->is_stable() ||
-          *object_map == Handle<HeapObject>::cast(object)->map());
+    ASSERT(object->IsHeapObject());
+    ASSERT(!object_map->is_stable() ||
+           *object_map == Handle<HeapObject>::cast(object)->map());
+    USE(object_map);
   }
   __ Move(ToRegister(instr->result()), object);
 }
Index: src/arm64/lithium-codegen-arm64.cc
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc index 85f15aef04ca125e250f94869689d69e0ea4967e..b064d3da9f12870157ecfc9f4b60e923129fcc42 100644
--- a/src/arm64/lithium-codegen-arm64.cc
+++ b/src/arm64/lithium-codegen-arm64.cc
@@ -2551,9 +2551,10 @@ void LCodeGen::DoConstantT(LConstantT* instr) {
   AllowDeferredHandleDereference smi_check;
   if (instr->hydrogen()->HasObjectMap()) {
     Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle();
-    CHECK(object->IsHeapObject());
-    CHECK(!object_map->is_stable() ||
-          *object_map == Handle<HeapObject>::cast(object)->map());
+    ASSERT(object->IsHeapObject());
+    ASSERT(!object_map->is_stable() ||
+           *object_map == Handle<HeapObject>::cast(object)->map());
+    USE(object_map);
   }
   __ LoadObject(ToRegister(instr->result()), object);
 }
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index ee37d0b5837404cc9db6bfd420a69f615221da67..2872d4dc0d676308c2b40641b75d28bf906201bd 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -2015,9 +2015,10 @@ void LCodeGen::DoConstantT(LConstantT* instr) {
   AllowDeferredHandleDereference smi_check;
   if (instr->hydrogen()->HasObjectMap()) {
     Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle();
-    CHECK(object->IsHeapObject());
-    CHECK(!object_map->is_stable() ||
-          *object_map == Handle<HeapObject>::cast(object)->map());
+    ASSERT(object->IsHeapObject());
+    ASSERT(!object_map->is_stable() ||
+           *object_map == Handle<HeapObject>::cast(object)->map());
+    USE(object_map);
   }
   __ LoadObject(reg, object);
 }
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index bdbc010bd3840ae5715986e7b9055bde909a20a2..95ee3a6c12dd2c2b1ced217c8b2193372775a5ee 100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -1732,9 +1732,10 @@ void LCodeGen::DoConstantT(LConstantT* instr) {
   AllowDeferredHandleDereference smi_check;
   if (instr->hydrogen()->HasObjectMap()) {
     Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle();
-    CHECK(object->IsHeapObject());
-    CHECK(!object_map->is_stable() ||
-          *object_map == Handle<HeapObject>::cast(object)->map());
+    ASSERT(object->IsHeapObject());
+    ASSERT(!object_map->is_stable() ||
+           *object_map == Handle<HeapObject>::cast(object)->map());
+    USE(object_map);
   }
   __ li(ToRegister(instr->result()), object);
 }
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index a53a196e54fac31d451d0d82f53e276e1b6b9bc2..c3dc8ac30ccef168e72aeb536d8b390077124801 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -1695,9 +1695,10 @@ void LCodeGen::DoConstantT(LConstantT* instr) {
   AllowDeferredHandleDereference smi_check;
   if (instr->hydrogen()->HasObjectMap()) {
     Handle<Map> object_map = instr->hydrogen()->ObjectMap().handle();
-    CHECK(object->IsHeapObject());
-    CHECK(!object_map->is_stable() ||
-          *object_map == Handle<HeapObject>::cast(object)->map());
+    ASSERT(object->IsHeapObject());
+    ASSERT(!object_map->is_stable() ||
+           *object_map == Handle<HeapObject>::cast(object)->map());
+    USE(object_map);
   }
   __ Move(ToRegister(instr->result()), object);
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to