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

Side by Side Diff: src/x64/stub-cache-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 // ----------- S t a t e ------------- 1170 // ----------- S t a t e -------------
1171 // -- rcx : name 1171 // -- rcx : name
1172 // -- rsp[0] : return address 1172 // -- rsp[0] : return address
1173 // -- rsp[8] : receiver 1173 // -- rsp[8] : receiver
1174 // ----------------------------------- 1174 // -----------------------------------
1175 Label miss; 1175 Label miss;
1176 1176
1177 // Load receiver. 1177 // Load receiver.
1178 __ movq(rax, Operand(rsp, kPointerSize)); 1178 __ movq(rax, Operand(rsp, kPointerSize));
1179 1179
1180 // Chech that receiver is not a smi.
1181 __ JumpIfSmi(rax, &miss);
1182
1180 // Check the maps of the full prototype chain. Also check that 1183 // Check the maps of the full prototype chain. Also check that
1181 // global property cells up to (but not including) the last object 1184 // global property cells up to (but not including) the last object
1182 // in the prototype chain are empty. 1185 // in the prototype chain are empty.
1183 CheckPrototypes(object, rax, last, rbx, rdx, name, &miss); 1186 CheckPrototypes(object, rax, last, rbx, rdx, name, &miss);
1184 1187
1185 // If the last object in the prototype chain is a global object, 1188 // If the last object in the prototype chain is a global object,
1186 // check that the global property cell is empty. 1189 // check that the global property cell is empty.
1187 if (last->IsGlobalObject()) { 1190 if (last->IsGlobalObject()) {
1188 Object* cell = GenerateCheckPropertyCell(masm(), 1191 Object* cell = GenerateCheckPropertyCell(masm(),
1189 GlobalObject::cast(last), 1192 GlobalObject::cast(last),
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 2022 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
2020 2023
2021 // Return the generated code. 2024 // Return the generated code.
2022 return GetCode(); 2025 return GetCode();
2023 } 2026 }
2024 2027
2025 2028
2026 #undef __ 2029 #undef __
2027 2030
2028 } } // namespace v8::internal 2031 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698