Fix ClassOf check on ARM.
authorrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 21 Jul 2011 12:39:35 +0000 (12:39 +0000)
committerrossberg@chromium.org <rossberg@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 21 Jul 2011 12:39:35 +0000 (12:39 +0000)
R=ager@chromium.org
BUG=
TEST=

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

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

src/arm/full-codegen-arm.cc
src/v8natives.js

index c3440eb..cdfc0a9 100644 (file)
@@ -2753,7 +2753,7 @@ void FullCodeGenerator::EmitClassOf(ZoneList<Expression*>* args) {
 
   // Objects with a non-function constructor have class 'Object'.
   __ bind(&non_function_constructor);
-  __ LoadRoot(r0, Heap::kfunction_class_symbolRootIndex);
+  __ LoadRoot(r0, Heap::kObject_symbolRootIndex);
   __ jmp(&done);
 
   // Non-JS objects have class null.
index 76c327c..be9b297 100644 (file)
@@ -209,7 +209,7 @@ function ObjectToString() {
   if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
     return '[object Undefined]';
   }
-  if (IS_NULL(this)) return  '[object Null]';
+  if (IS_NULL(this)) return '[object Null]';
   return "[object " + %_ClassOf(ToObject(this)) + "]";
 }