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

Unified Diff: src/codegen-ia32.cc

Issue 73076: Fix crash bug when loading const variable in the presence of eval.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codegen-arm.cc ('k') | test/mjsunit/const-declaration.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 1710)
+++ src/codegen-ia32.cc (working copy)
@@ -3286,6 +3286,11 @@
ContextSlotOperandCheckExtensions(potential_slot,
value,
&slow));
+ if (potential_slot->var()->mode() == Variable::CONST) {
+ __ cmp(value.reg(), Factory::the_hole_value());
+ done.Branch(not_equal, &value);
+ __ mov(value.reg(), Factory::undefined_value());
+ }
// There is always control flow to slow from
Kevin Millikin (Chromium) 2009/04/15 10:42:54 This comment isn't explicit enough. Could you add
// ContextSlotOperandCheckExtensions.
done.Jump(&value);
« no previous file with comments | « src/codegen-arm.cc ('k') | test/mjsunit/const-declaration.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698