Add missing SMI checks to fix reliability bots

R=ager@chromium.org
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
danno@chromium.org 2011-05-23 11:40:36 +00:00
parent 53165dbed0
commit a86e0b7708
3 changed files with 24 additions and 0 deletions

View File

@ -3098,6 +3098,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
// -- r0 : key
// -- r1 : receiver
// -----------------------------------
Label miss;
__ JumpIfSmi(r1, &miss);
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
Code* stub;
if (!maybe_stub->To(&stub)) return maybe_stub;
@ -3107,6 +3110,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
Handle<Code>(stub),
DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);
@ -3192,6 +3196,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
// -- lr : return address
// -- r3 : scratch
// -----------------------------------
Label miss;
__ JumpIfSmi(r1, &miss);
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
MaybeObject* maybe_stub =
KeyedStoreFastElementStub(is_js_array).TryGetCode();
@ -3203,6 +3210,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
Handle<Code>(stub),
DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET);

View File

@ -2671,6 +2671,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
Label miss;
__ JumpIfSmi(edx, &miss);
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
MaybeObject* maybe_stub =
KeyedStoreFastElementStub(is_js_array).TryGetCode();
@ -2681,6 +2684,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
Handle<Code>(stub),
DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
__ jmp(ic, RelocInfo::CODE_TARGET);
@ -3133,6 +3137,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
Label miss;
__ JumpIfSmi(edx, &miss);
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
Code* stub;
if (!maybe_stub->To(&stub)) return maybe_stub;
@ -3141,6 +3148,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
Handle<Code>(stub),
DO_SMI_CHECK);
__ bind(&miss);
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
// Return the generated code.

View File

@ -2501,6 +2501,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
// -- rdx : receiver
// -- rsp[0] : return address
// -----------------------------------
Label miss;
__ JumpIfSmi(rdx, &miss);
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
MaybeObject* maybe_stub =
KeyedStoreFastElementStub(is_js_array).TryGetCode();
@ -2511,6 +2514,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
Handle<Code>(stub),
DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
__ jmp(ic, RelocInfo::CODE_TARGET);
@ -2959,6 +2963,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
// -- rdx : receiver
// -- rsp[0] : return address
// -----------------------------------
Label miss;
__ JumpIfSmi(rdx, &miss);
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
Code* stub;
if (!maybe_stub->To(&stub)) return maybe_stub;
@ -2967,6 +2974,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
Handle<Code>(stub),
DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
__ jmp(ic, RelocInfo::CODE_TARGET);