Revision: 5219
Author: [email protected]
Date: Mon Aug 9 23:39:13 2010
Log: Refactor and correct IS_SPEC_OBJECT macro (bringing bleeding edge
r5087 to 2.2 branch)
This needs to go to the 2.2 branch since the test expectations was
updated (and upstreamed) to reflect that we no longer need special
threatment of fast/dom/undetectable-document-all.html.
This fixes issue 51646.
Review URL: http://codereview.chromium.org/3151002
http://code.google.com/p/v8/source/detail?r=5219
Modified:
/branches/2.2/src/arm/codegen-arm.cc
/branches/2.2/src/arm/codegen-arm.h
/branches/2.2/src/arm/full-codegen-arm.cc
/branches/2.2/src/codegen.h
/branches/2.2/src/full-codegen.cc
/branches/2.2/src/full-codegen.h
/branches/2.2/src/ia32/codegen-ia32.cc
/branches/2.2/src/ia32/codegen-ia32.h
/branches/2.2/src/ia32/full-codegen-ia32.cc
/branches/2.2/src/macros.py
/branches/2.2/src/mips/codegen-mips.cc
/branches/2.2/src/mips/codegen-mips.h
/branches/2.2/src/runtime.js
/branches/2.2/src/v8natives.js
/branches/2.2/src/version.cc
/branches/2.2/src/x64/codegen-x64.cc
/branches/2.2/src/x64/codegen-x64.h
/branches/2.2/src/x64/full-codegen-x64.cc
=======================================
--- /branches/2.2/src/arm/codegen-arm.cc Wed Jul 28 06:36:30 2010
+++ /branches/2.2/src/arm/codegen-arm.cc Mon Aug 9 23:39:13 2010
@@ -4759,6 +4759,24 @@
__ cmp(possible_object, Operand(LAST_JS_OBJECT_TYPE));
cc_reg_ = le;
}
+
+
+void CodeGenerator::GenerateIsSpecObject(ZoneList<Expression*>* args) {
+ // This generates a fast version of:
+ // (typeof(arg) === 'object' || %_ClassOf(arg) == 'RegExp' ||
+ // typeof(arg) == function).
+ // It includes undetectable objects (as opposed to IsObject).
+ ASSERT(args->length() == 1);
+ Load(args->at(0));
+ Register value = frame_->PopToRegister();
+ __ tst(value, Operand(kSmiTagMask));
+ false_target()->Branch(eq);
+ // Check that this is an object.
+ __ ldr(value, FieldMemOperand(value, HeapObject::kMapOffset));
+ __ ldrb(value, FieldMemOperand(value, Map::kInstanceTypeOffset));
+ __ cmp(value, Operand(FIRST_JS_OBJECT_TYPE));
+ cc_reg_ = ge;
+}
void CodeGenerator::GenerateIsFunction(ZoneList<Expression*>* args) {
=======================================
--- /branches/2.2/src/arm/codegen-arm.h Mon Jul 5 04:01:40 2010
+++ /branches/2.2/src/arm/codegen-arm.h Mon Aug 9 23:39:13 2010
@@ -475,6 +475,7 @@
void GenerateIsArray(ZoneList<Expression*>* args);
void GenerateIsRegExp(ZoneList<Expression*>* args);
void GenerateIsObject(ZoneList<Expression*>* args);
+ void GenerateIsSpecObject(ZoneList<Expression*>* args);
void GenerateIsFunction(ZoneList<Expression*>* args);
void GenerateIsUndetectableObject(ZoneList<Expression*>* args);
=======================================
--- /branches/2.2/src/arm/full-codegen-arm.cc Thu Jul 15 02:58:47 2010
+++ /branches/2.2/src/arm/full-codegen-arm.cc Mon Aug 9 23:39:13 2010
@@ -1906,6 +1906,25 @@
Apply(context_, if_true, if_false);
}
+
+
+void FullCodeGenerator::EmitIsSpecObject(ZoneList<Expression*>* args) {
+ ASSERT(args->length() == 1);
+
+ VisitForValue(args->at(0), kAccumulator);
+
+ Label materialize_true, materialize_false;
+ Label* if_true = NULL;
+ Label* if_false = NULL;
+ PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
+
+ __ BranchOnSmi(r0, if_false);
+ __ CompareObjectType(r0, r1, r1, FIRST_JS_OBJECT_TYPE);
+ __ b(ge, if_true);
+ __ b(if_false);
+
+ Apply(context_, if_true, if_false);
+}
void FullCodeGenerator::EmitIsUndetectableObject(ZoneList<Expression*>*
args) {
=======================================
--- /branches/2.2/src/codegen.h Thu Jul 15 02:58:47 2010
+++ /branches/2.2/src/codegen.h Mon Aug 9 23:39:13 2010
@@ -120,6 +120,7 @@
F(IsObject, 1,
1) \
F(IsFunction, 1,
1) \
F(IsUndetectableObject, 1,
1) \
+ F(IsSpecObject, 1, 1) \
F(StringAdd, 2,
1) \
F(SubString, 3,
1) \
F(StringCompare, 2,
1) \
@@ -180,7 +181,6 @@
CodeGenerator* previous_;
};
-
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
// State of used registers in a virtual frame.
=======================================
--- /branches/2.2/src/full-codegen.cc Mon Jun 14 00:35:38 2010
+++ /branches/2.2/src/full-codegen.cc Mon Aug 9 23:39:13 2010
@@ -857,6 +857,8 @@
EmitIsNonNegativeSmi(expr->arguments());
} else if (strcmp("_IsObject", *name->ToCString()) == 0) {
EmitIsObject(expr->arguments());
+ } else if (strcmp("_IsSpecObject", *name->ToCString()) == 0) {
+ EmitIsSpecObject(expr->arguments());
} else if (strcmp("_IsUndetectableObject", *name->ToCString()) == 0) {
EmitIsUndetectableObject(expr->arguments());
} else if (strcmp("_IsFunction", *name->ToCString()) == 0) {
=======================================
--- /branches/2.2/src/full-codegen.h Mon Jun 14 00:35:38 2010
+++ /branches/2.2/src/full-codegen.h Mon Aug 9 23:39:13 2010
@@ -402,6 +402,7 @@
void EmitIsSmi(ZoneList<Expression*>* arguments);
void EmitIsNonNegativeSmi(ZoneList<Expression*>* arguments);
void EmitIsObject(ZoneList<Expression*>* arguments);
+ void EmitIsSpecObject(ZoneList<Expression*>* arguments);
void EmitIsUndetectableObject(ZoneList<Expression*>* arguments);
void EmitIsFunction(ZoneList<Expression*>* arguments);
void EmitIsArray(ZoneList<Expression*>* arguments);
=======================================
--- /branches/2.2/src/ia32/codegen-ia32.cc Thu Jul 15 02:58:47 2010
+++ /branches/2.2/src/ia32/codegen-ia32.cc Mon Aug 9 23:39:13 2010
@@ -6404,6 +6404,27 @@
map.Unuse();
destination()->Split(below_equal);
}
+
+
+ void CodeGenerator::GenerateIsSpecObject(ZoneList<Expression*>* args) {
+ // This generates a fast version of:
+ // (typeof(arg) === 'object' || %_ClassOf(arg) == 'RegExp' ||
+ // typeof(arg) == function).
+ // It includes undetectable objects (as opposed to IsObject).
+ ASSERT(args->length() == 1);
+ Load(args->at(0));
+ Result value = frame_->Pop();
+ value.ToRegister();
+ ASSERT(value.is_valid());
+ __ test(value.reg(), Immediate(kSmiTagMask));
+ destination()->false_target()->Branch(equal);
+
+ // Check that this is an object.
+ frame_->Spill(value.reg());
+ __ CmpObjectType(value.reg(), FIRST_JS_OBJECT_TYPE, value.reg());
+ value.Unuse();
+ destination()->Split(above_equal);
+}
void CodeGenerator::GenerateIsFunction(ZoneList<Expression*>* args) {
=======================================
--- /branches/2.2/src/ia32/codegen-ia32.h Mon Jun 14 00:35:38 2010
+++ /branches/2.2/src/ia32/codegen-ia32.h Mon Aug 9 23:39:13 2010
@@ -621,6 +621,7 @@
void GenerateIsArray(ZoneList<Expression*>* args);
void GenerateIsRegExp(ZoneList<Expression*>* args);
void GenerateIsObject(ZoneList<Expression*>* args);
+ void GenerateIsSpecObject(ZoneList<Expression*>* args);
void GenerateIsFunction(ZoneList<Expression*>* args);
void GenerateIsUndetectableObject(ZoneList<Expression*>* args);
=======================================
--- /branches/2.2/src/ia32/full-codegen-ia32.cc Tue Jul 13 13:58:03 2010
+++ /branches/2.2/src/ia32/full-codegen-ia32.cc Mon Aug 9 23:39:13 2010
@@ -1983,6 +1983,26 @@
Apply(context_, if_true, if_false);
}
+
+
+void FullCodeGenerator::EmitIsSpecObject(ZoneList<Expression*>* args) {
+ ASSERT(args->length() == 1);
+
+ VisitForValue(args->at(0), kAccumulator);
+
+ Label materialize_true, materialize_false;
+ Label* if_true = NULL;
+ Label* if_false = NULL;
+ PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
+
+ __ test(eax, Immediate(kSmiTagMask));
+ __ j(equal, if_false);
+ __ CmpObjectType(eax, FIRST_JS_OBJECT_TYPE, ebx);
+ __ j(above_equal, if_true);
+ __ jmp(if_false);
+
+ Apply(context_, if_true, if_false);
+}
void FullCodeGenerator::EmitIsUndetectableObject(ZoneList<Expression*>*
args) {
=======================================
--- /branches/2.2/src/macros.py Wed Jul 7 05:22:46 2010
+++ /branches/2.2/src/macros.py Mon Aug 9 23:39:13 2010
@@ -115,7 +115,8 @@
# Macro for ECMAScript 5 queries of the type:
# "Type(O) is object."
# This is the same as being either a function or an object in V8
terminology.
-macro IS_SPEC_OBJECT_OR_NULL(arg) = (%_IsObject(arg) || %_IsFunction(arg));
+# In addition, an undetectable object is also included by this.
+macro IS_SPEC_OBJECT(arg) = (%_IsSpecObject(arg));
# Inline macros. Use %IS_VAR to make sure arg is evaluated only once.
macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg));
=======================================
--- /branches/2.2/src/mips/codegen-mips.cc Fri May 21 05:58:28 2010
+++ /branches/2.2/src/mips/codegen-mips.cc Mon Aug 9 23:39:13 2010
@@ -905,6 +905,11 @@
void CodeGenerator::GenerateIsObject(ZoneList<Expression*>* args) {
UNIMPLEMENTED_MIPS();
}
+
+
+void CodeGenerator::GenerateIsSpecObject(ZoneList<Expression*>* args) {
+ UNIMPLEMENTED_MIPS();
+}
void CodeGenerator::GenerateIsFunction(ZoneList<Expression*>* args) {
=======================================
--- /branches/2.2/src/mips/codegen-mips.h Mon Apr 12 04:30:10 2010
+++ /branches/2.2/src/mips/codegen-mips.h Mon Aug 9 23:39:13 2010
@@ -355,6 +355,7 @@
void GenerateRandomHeapNumber(ZoneList<Expression*>* args);
void GenerateIsObject(ZoneList<Expression*>* args);
+ void GenerateIsSpecObject(ZoneList<Expression*>* args);
void GenerateIsFunction(ZoneList<Expression*>* args);
void GenerateIsUndetectableObject(ZoneList<Expression*>* args);
void GenerateStringAdd(ZoneList<Expression*>* args);
=======================================
--- /branches/2.2/src/runtime.js Tue Jul 13 13:58:03 2010
+++ /branches/2.2/src/runtime.js Mon Aug 9 23:39:13 2010
@@ -80,7 +80,7 @@
} else {
// x is not a number, boolean, null or undefined.
if (y == null) return 1; // not equal
- if (IS_SPEC_OBJECT_OR_NULL(y)) {
+ if (IS_SPEC_OBJECT(y)) {
return %_ObjectEquals(x, y) ? 0 : 1;
}
@@ -345,7 +345,7 @@
// ECMA-262, section 11.8.7, page 54.
function IN(x) {
- if (x == null || !IS_SPEC_OBJECT_OR_NULL(x)) {
+ if (!IS_SPEC_OBJECT(x)) {
throw %MakeTypeError('invalid_in_operator_use', [this, x]);
}
return %_IsNonNegativeSmi(this) ? %HasElement(x,
this) : %HasProperty(x, %ToString(this));
@@ -363,13 +363,13 @@
}
// If V is not an object, return false.
- if (IS_NULL(V) || !IS_SPEC_OBJECT_OR_NULL(V)) {
+ if (!IS_SPEC_OBJECT(V)) {
return 1;
}
// Get the prototype of F; if it is not an object, throw an error.
var O = F.prototype;
- if (IS_NULL(O) || !IS_SPEC_OBJECT_OR_NULL(O)) {
+ if (!IS_SPEC_OBJECT(O)) {
throw %MakeTypeError('instanceof_nonobject_proto', [O]);
}
@@ -483,8 +483,7 @@
// Fast case check.
if (IS_STRING(x)) return x;
// Normal behavior.
- if (!IS_SPEC_OBJECT_OR_NULL(x)) return x;
- if (x == null) return x; // check for null, undefined
+ if (!IS_SPEC_OBJECT(x)) return x;
if (hint == NO_HINT) hint = (IS_DATE(x)) ? STRING_HINT : NUMBER_HINT;
return (hint == NUMBER_HINT) ? %DefaultNumber(x) : %DefaultString(x);
}
@@ -583,13 +582,10 @@
// Returns if the given x is a primitive value - not an object or a
// function.
function IsPrimitive(x) {
- if (!IS_SPEC_OBJECT_OR_NULL(x)) {
- return true;
- } else {
- // Even though the type of null is "object", null is still
- // considered a primitive value.
- return IS_NULL(x);
- }
+ // Even though the type of null is "object", null is still
+ // considered a primitive value. IS_SPEC_OBJECT handles this correctly
+ // (i.e., it will return false if x is null).
+ return !IS_SPEC_OBJECT(x);
}
=======================================
--- /branches/2.2/src/v8natives.js Sun Aug 8 02:52:35 2010
+++ /branches/2.2/src/v8natives.js Mon Aug 9 23:39:13 2010
@@ -225,16 +225,14 @@
// ECMA-262 - 15.2.4.6
function ObjectIsPrototypeOf(V) {
- if (!IS_SPEC_OBJECT_OR_NULL(V) && !IS_UNDETECTABLE(V)) return false;
+ if (!IS_SPEC_OBJECT(V)) return false;
return %IsInPrototypeChain(this, V);
}
// ECMA-262 - 15.2.4.6
function ObjectPropertyIsEnumerable(V) {
- if (this == null) return false;
- if (!IS_SPEC_OBJECT_OR_NULL(this)) return false;
- return %IsPropertyEnumerable(this, ToString(V));
+ return %IsPropertyEnumerable(ToObject(this), ToString(V));
}
@@ -279,8 +277,7 @@
function ObjectKeys(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj))
+ if (!IS_SPEC_OBJECT(obj))
throw MakeTypeError("obj_ctor_property_non_object", ["keys"]);
return %LocalKeys(obj);
}
@@ -329,7 +326,7 @@
// ES5 8.10.5.
function ToPropertyDescriptor(obj) {
- if (!IS_SPEC_OBJECT_OR_NULL(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("property_desc_object", [obj]);
}
var desc = new PropertyDescriptor();
@@ -626,8 +623,7 @@
// ES5 section 15.2.3.2.
function ObjectGetPrototypeOf(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj))
+ if (!IS_SPEC_OBJECT(obj))
throw MakeTypeError("obj_ctor_property_non_object",
["getPrototypeOf"]);
return obj.__proto__;
}
@@ -635,8 +631,7 @@
// ES5 section 15.2.3.3
function ObjectGetOwnPropertyDescriptor(obj, p) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj))
+ if (!IS_SPEC_OBJECT(obj))
throw MakeTypeError("obj_ctor_property_non_object",
["getOwnPropertyDescriptor"]);
var desc = GetOwnProperty(obj, p);
return FromPropertyDescriptor(desc);
@@ -645,8 +640,7 @@
// ES5 section 15.2.3.4.
function ObjectGetOwnPropertyNames(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj))
+ if (!IS_SPEC_OBJECT(obj))
throw MakeTypeError("obj_ctor_property_non_object",
["getOwnPropertyNames"]);
// Find all the indexed properties.
@@ -698,7 +692,7 @@
// ES5 section 15.2.3.5.
function ObjectCreate(proto, properties) {
- if (!IS_SPEC_OBJECT_OR_NULL(proto)) {
+ if (!IS_SPEC_OBJECT(proto) && proto !== null) {
throw MakeTypeError("proto_object_or_null", [proto]);
}
var obj = new $Object();
@@ -710,8 +704,7 @@
// ES5 section 15.2.3.6.
function ObjectDefineProperty(obj, p, attributes) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object",
["defineProperty"]);
}
var name = ToString(p);
@@ -723,8 +716,7 @@
// ES5 section 15.2.3.7.
function ObjectDefineProperties(obj, properties) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj))
+ if (!IS_SPEC_OBJECT(obj))
throw MakeTypeError("obj_ctor_property_non_object",
["defineProperties"]);
var props = ToObject(properties);
var key_values = [];
@@ -747,8 +739,7 @@
// ES5 section 15.2.3.8.
function ObjectSeal(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object", ["seal"]);
}
var names = ObjectGetOwnPropertyNames(obj);
@@ -764,8 +755,7 @@
// ES5 section 15.2.3.9.
function ObjectFreeze(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object", ["freeze"]);
}
var names = ObjectGetOwnPropertyNames(obj);
@@ -782,8 +772,7 @@
// ES5 section 15.2.3.10
function ObjectPreventExtension(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object",
["preventExtension"]);
}
%PreventExtensions(obj);
@@ -793,8 +782,7 @@
// ES5 section 15.2.3.11
function ObjectIsSealed(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object", ["isSealed"]);
}
var names = ObjectGetOwnPropertyNames(obj);
@@ -812,8 +800,7 @@
// ES5 section 15.2.3.12
function ObjectIsFrozen(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object", ["isFrozen"]);
}
var names = ObjectGetOwnPropertyNames(obj);
@@ -832,8 +819,7 @@
// ES5 section 15.2.3.13
function ObjectIsExtensible(obj) {
- if ((!IS_SPEC_OBJECT_OR_NULL(obj) || IS_NULL_OR_UNDEFINED(obj)) &&
- !IS_UNDETECTABLE(obj)) {
+ if (!IS_SPEC_OBJECT(obj)) {
throw MakeTypeError("obj_ctor_property_non_object",
["preventExtension"]);
}
return %IsExtensible(obj);
=======================================
--- /branches/2.2/src/version.cc Sun Aug 8 02:52:35 2010
+++ /branches/2.2/src/version.cc Mon Aug 9 23:39:13 2010
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 2
#define MINOR_VERSION 2
#define BUILD_NUMBER 24
-#define PATCH_LEVEL 13
+#define PATCH_LEVEL 14
#define CANDIDATE_VERSION false
// Define SONAME to have the SCons build the put a specific SONAME into the
=======================================
--- /branches/2.2/src/x64/codegen-x64.cc Thu Jul 15 02:58:47 2010
+++ /branches/2.2/src/x64/codegen-x64.cc Mon Aug 9 23:39:13 2010
@@ -5678,6 +5678,25 @@
obj.Unuse();
destination()->Split(below_equal);
}
+
+
+void CodeGenerator::GenerateIsSpecObject(ZoneList<Expression*>* args) {
+ // This generates a fast version of:
+ // (typeof(arg) === 'object' || %_ClassOf(arg) == 'RegExp' ||
+ // typeof(arg) == function).
+ // It includes undetectable objects (as opposed to IsObject).
+ ASSERT(args->length() == 1);
+ Load(args->at(0));
+ Result value = frame_->Pop();
+ value.ToRegister();
+ ASSERT(value.is_valid());
+ Condition is_smi = masm_->CheckSmi(value.reg());
+ destination()->false_target()->Branch(is_smi);
+ // Check that this is an object.
+ __ CmpObjectType(value.reg(), FIRST_JS_OBJECT_TYPE, kScratchRegister);
+ value.Unuse();
+ destination()->Split(above_equal);
+}
void CodeGenerator::GenerateIsFunction(ZoneList<Expression*>* args) {
=======================================
--- /branches/2.2/src/x64/codegen-x64.h Mon Jul 5 04:01:40 2010
+++ /branches/2.2/src/x64/codegen-x64.h Mon Aug 9 23:39:13 2010
@@ -578,6 +578,7 @@
void GenerateIsArray(ZoneList<Expression*>* args);
void GenerateIsRegExp(ZoneList<Expression*>* args);
void GenerateIsObject(ZoneList<Expression*>* args);
+ void GenerateIsSpecObject(ZoneList<Expression*>* args);
void GenerateIsFunction(ZoneList<Expression*>* args);
void GenerateIsUndetectableObject(ZoneList<Expression*>* args);
=======================================
--- /branches/2.2/src/x64/full-codegen-x64.cc Tue Jul 13 13:58:03 2010
+++ /branches/2.2/src/x64/full-codegen-x64.cc Mon Aug 9 23:39:13 2010
@@ -1989,6 +1989,25 @@
Apply(context_, if_true, if_false);
}
+
+
+void FullCodeGenerator::EmitIsSpecObject(ZoneList<Expression*>* args) {
+ ASSERT(args->length() == 1);
+
+ VisitForValue(args->at(0), kAccumulator);
+
+ Label materialize_true, materialize_false;
+ Label* if_true = NULL;
+ Label* if_false = NULL;
+ PrepareTest(&materialize_true, &materialize_false, &if_true, &if_false);
+
+ __ JumpIfSmi(rax, if_false);
+ __ CmpObjectType(rax, FIRST_JS_OBJECT_TYPE, rbx);
+ __ j(above_equal, if_true);
+ __ jmp(if_false);
+
+ Apply(context_, if_true, if_false);
+}
void FullCodeGenerator::EmitIsUndetectableObject(ZoneList<Expression*>*
args) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev