Use RUNTIME_ASSERT instead of CHECK in runtime.cc.
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Sep 2008 08:40:25 +0000 (08:40 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 9 Sep 2008 08:40:25 +0000 (08:40 +0000)
Remove unused function from array.js.

Review URL: http://codereview.chromium.org/1659

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/array.js
src/runtime.cc

index 6f229c0..fc44759 100644 (file)
 
 // -------------------------------------------------------------------
 
-// Determines if the array contains the element.
-function Contains(array, element) {
-  var length = array.length;
-  for (var i = 0; i < length; i++) {
-    if (array[i] === element) return true;
-  }
-  return false;
-};
-
 
 // Global list of arrays visited during toString, toLocaleString and
 // join invocations.
index 0f7797c..e44fe19 100644 (file)
@@ -3450,7 +3450,7 @@ static Object* Runtime_PushIfAbsent(Arguments args) {
   ASSERT(args.length() == 2);
   CONVERT_CHECKED(JSArray, array, args[0]);
   CONVERT_CHECKED(JSArray, element, args[1]);
-  CHECK(array->HasFastElements());
+  RUNTIME_ASSERT(array->HasFastElements());
   int length = Smi::cast(array->length())->value();
   FixedArray* elements = FixedArray::cast(array->elements());
   for (int i = 0; i < length; i++) {