Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 1673005: Add missing smi check in IC for nonexistent properties.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 Object* LoadStubCompiler::CompileLoadNonexistent(String* name, 1969 Object* LoadStubCompiler::CompileLoadNonexistent(String* name,
1970 JSObject* object, 1970 JSObject* object,
1971 JSObject* last) { 1971 JSObject* last) {
1972 // ----------- S t a t e ------------- 1972 // ----------- S t a t e -------------
1973 // -- eax : receiver 1973 // -- eax : receiver
1974 // -- ecx : name 1974 // -- ecx : name
1975 // -- esp[0] : return address 1975 // -- esp[0] : return address
1976 // ----------------------------------- 1976 // -----------------------------------
1977 Label miss; 1977 Label miss;
1978 1978
1979 // Check that the receiver isn't a smi.
1980 __ test(eax, Immediate(kSmiTagMask));
1981 __ j(zero, &miss, not_taken);
1982
1979 // Check the maps of the full prototype chain. Also check that 1983 // Check the maps of the full prototype chain. Also check that
1980 // global property cells up to (but not including) the last object 1984 // global property cells up to (but not including) the last object
1981 // in the prototype chain are empty. 1985 // in the prototype chain are empty.
1982 CheckPrototypes(object, eax, last, ebx, edx, name, &miss); 1986 CheckPrototypes(object, eax, last, ebx, edx, name, &miss);
1983 1987
1984 // If the last object in the prototype chain is a global object, 1988 // If the last object in the prototype chain is a global object,
1985 // check that the global property cell is empty. 1989 // check that the global property cell is empty.
1986 if (last->IsGlobalObject()) { 1990 if (last->IsGlobalObject()) {
1987 Object* cell = GenerateCheckPropertyCell(masm(), 1991 Object* cell = GenerateCheckPropertyCell(masm(),
1988 GlobalObject::cast(last), 1992 GlobalObject::cast(last),
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 2485 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
2482 2486
2483 // Return the generated code. 2487 // Return the generated code.
2484 return GetCode(); 2488 return GetCode();
2485 } 2489 }
2486 2490
2487 2491
2488 #undef __ 2492 #undef __
2489 2493
2490 } } // namespace v8::internal 2494 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698