Commit a86e0b77 authored by danno@chromium.org's avatar danno@chromium.org

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
parent 53165dbe
...@@ -3098,6 +3098,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { ...@@ -3098,6 +3098,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
// -- r0 : key // -- r0 : key
// -- r1 : receiver // -- r1 : receiver
// ----------------------------------- // -----------------------------------
Label miss;
__ JumpIfSmi(r1, &miss);
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode(); MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
Code* stub; Code* stub;
if (!maybe_stub->To(&stub)) return maybe_stub; if (!maybe_stub->To(&stub)) return maybe_stub;
...@@ -3107,6 +3110,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { ...@@ -3107,6 +3110,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
Handle<Code>(stub), Handle<Code>(stub),
DO_SMI_CHECK); DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET); __ Jump(ic, RelocInfo::CODE_TARGET);
...@@ -3192,6 +3196,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( ...@@ -3192,6 +3196,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
// -- lr : return address // -- lr : return address
// -- r3 : scratch // -- r3 : scratch
// ----------------------------------- // -----------------------------------
Label miss;
__ JumpIfSmi(r1, &miss);
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
MaybeObject* maybe_stub = MaybeObject* maybe_stub =
KeyedStoreFastElementStub(is_js_array).TryGetCode(); KeyedStoreFastElementStub(is_js_array).TryGetCode();
...@@ -3203,6 +3210,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( ...@@ -3203,6 +3210,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
Handle<Code>(stub), Handle<Code>(stub),
DO_SMI_CHECK); DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
__ Jump(ic, RelocInfo::CODE_TARGET); __ Jump(ic, RelocInfo::CODE_TARGET);
......
...@@ -2671,6 +2671,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( ...@@ -2671,6 +2671,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
// -- edx : receiver // -- edx : receiver
// -- esp[0] : return address // -- esp[0] : return address
// ----------------------------------- // -----------------------------------
Label miss;
__ JumpIfSmi(edx, &miss);
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
MaybeObject* maybe_stub = MaybeObject* maybe_stub =
KeyedStoreFastElementStub(is_js_array).TryGetCode(); KeyedStoreFastElementStub(is_js_array).TryGetCode();
...@@ -2681,6 +2684,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( ...@@ -2681,6 +2684,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
Handle<Code>(stub), Handle<Code>(stub),
DO_SMI_CHECK); DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
__ jmp(ic, RelocInfo::CODE_TARGET); __ jmp(ic, RelocInfo::CODE_TARGET);
...@@ -3133,6 +3137,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { ...@@ -3133,6 +3137,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
// -- edx : receiver // -- edx : receiver
// -- esp[0] : return address // -- esp[0] : return address
// ----------------------------------- // -----------------------------------
Label miss;
__ JumpIfSmi(edx, &miss);
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode(); MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
Code* stub; Code* stub;
if (!maybe_stub->To(&stub)) return maybe_stub; if (!maybe_stub->To(&stub)) return maybe_stub;
...@@ -3141,6 +3148,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { ...@@ -3141,6 +3148,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
Handle<Code>(stub), Handle<Code>(stub),
DO_SMI_CHECK); DO_SMI_CHECK);
__ bind(&miss);
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);
// Return the generated code. // Return the generated code.
......
...@@ -2501,6 +2501,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( ...@@ -2501,6 +2501,9 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
// -- rdx : receiver // -- rdx : receiver
// -- rsp[0] : return address // -- rsp[0] : return address
// ----------------------------------- // -----------------------------------
Label miss;
__ JumpIfSmi(rdx, &miss);
bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
MaybeObject* maybe_stub = MaybeObject* maybe_stub =
KeyedStoreFastElementStub(is_js_array).TryGetCode(); KeyedStoreFastElementStub(is_js_array).TryGetCode();
...@@ -2511,6 +2514,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( ...@@ -2511,6 +2514,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
Handle<Code>(stub), Handle<Code>(stub),
DO_SMI_CHECK); DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
__ jmp(ic, RelocInfo::CODE_TARGET); __ jmp(ic, RelocInfo::CODE_TARGET);
...@@ -2959,6 +2963,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { ...@@ -2959,6 +2963,9 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
// -- rdx : receiver // -- rdx : receiver
// -- rsp[0] : return address // -- rsp[0] : return address
// ----------------------------------- // -----------------------------------
Label miss;
__ JumpIfSmi(rdx, &miss);
MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode(); MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
Code* stub; Code* stub;
if (!maybe_stub->To(&stub)) return maybe_stub; if (!maybe_stub->To(&stub)) return maybe_stub;
...@@ -2967,6 +2974,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { ...@@ -2967,6 +2974,7 @@ MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
Handle<Code>(stub), Handle<Code>(stub),
DO_SMI_CHECK); DO_SMI_CHECK);
__ bind(&miss);
Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss(); Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
__ jmp(ic, RelocInfo::CODE_TARGET); __ jmp(ic, RelocInfo::CODE_TARGET);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment