Reviewers: Mads Ager,

Description:
Fix ClassOf check on ARM.

[email protected]
BUG=
TEST=


Please review this at http://codereview.chromium.org/7472034/

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

Affected files:
  M src/arm/full-codegen-arm.cc
  M src/v8natives.js


Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index c3440eb3ea1ecd83dff6fc7b6b58a79826f3e09c..cdfc0a9acf5cf3813bc42e9225defd0fce7c6b3e 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -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: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 76c327c021b13ac76ce23b78fc8f15df6d1ad8d5..be9b297f81315acf7f46ea6f117c518b6ea74cc9 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -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)) + "]";
 }



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to