}
-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
- Label success;
- // Check that the object is a boolean.
- __ LoadRoot(ip, Heap::kTrueValueRootIndex);
- __ cmp(object, ip);
- __ b(eq, &success);
- __ LoadRoot(ip, Heap::kFalseValueRootIndex);
- __ cmp(object, ip);
- __ b(ne, miss);
- __ bind(&success);
-}
-
-
Handle<Code> StoreStubCompiler::CompileStoreCallback(
Handle<JSObject> object,
Handle<JSObject> holder,
}
-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
- UseScratchRegisterScope temps(masm());
- // Check that the object is a boolean.
- Register true_root = temps.AcquireX();
- Register false_root = temps.AcquireX();
- ASSERT(!AreAliased(object, true_root, false_root));
- __ LoadTrueFalseRoots(true_root, false_root);
- __ Cmp(object, true_root);
- __ Ccmp(object, false_root, ZFlag, ne);
- __ B(ne, miss);
-}
-
-
Handle<Code> StoreStubCompiler::CompileStoreCallback(
Handle<JSObject> object,
Handle<JSObject> holder,
}
-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
- Label success;
- // Check that the object is a boolean.
- __ cmp(object, factory()->true_value());
- __ j(equal, &success);
- __ cmp(object, factory()->false_value());
- __ j(not_equal, miss);
- __ bind(&success);
-}
-
-
Handle<Code> StoreStubCompiler::CompileStoreCallback(
Handle<JSObject> object,
Handle<JSObject> holder,
}
-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
- Label success;
- // Check that the object is a boolean.
- __ LoadRoot(at, Heap::kTrueValueRootIndex);
- __ Branch(&success, eq, object, Operand(at));
- __ LoadRoot(at, Heap::kFalseValueRootIndex);
- __ Branch(miss, ne, object, Operand(at));
- __ bind(&success);
-}
-
-
Handle<Code> StoreStubCompiler::CompileStoreCallback(
Handle<JSObject> object,
Handle<JSObject> holder,
} else if (type->Is(HeapType::Number())) {
function_index = Context::NUMBER_FUNCTION_INDEX;
} else if (type->Is(HeapType::Boolean())) {
- // Booleans use the generic oddball map, so an additional check is needed to
- // ensure the receiver is really a boolean.
- GenerateBooleanCheck(object_reg, miss);
function_index = Context::BOOLEAN_FUNCTION_INDEX;
} else {
check_type = SKIP_RECEIVER;
Label* miss,
PrototypeCheckType check = CHECK_ALL_MAPS);
- void GenerateBooleanCheck(Register object, Label* miss);
-
static void GenerateFastApiCall(MacroAssembler* masm,
const CallOptimization& optimization,
Handle<Map> receiver_map,
}
-void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) {
- Label success;
- // Check that the object is a boolean.
- __ Cmp(object, factory()->true_value());
- __ j(equal, &success);
- __ Cmp(object, factory()->false_value());
- __ j(not_equal, miss);
- __ bind(&success);
-}
-
-
Handle<Code> StoreStubCompiler::CompileStoreCallback(
Handle<JSObject> object,
Handle<JSObject> holder,