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

Unified Diff: src/hydrogen.cc

Issue 11088026: Make sure that the context argument of HAdd is never NULL. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 8e9fe00034964da47b342582dec75cea8cedc16a..ff363e461569983d1791ddc5ab9112f5620a5f3b 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3567,7 +3567,8 @@ class BoundsCheckBbData: public ZoneObject {
HConstant(new_offset, Representation::Integer32());
if (*add == NULL) {
new_constant->InsertBefore(check);
- *add = new(BasicBlock()->zone()) HAdd(NULL,
+ HValue* context = HBinaryOperation::cast(check->index())->context();
Jakob Kummerow 2012/10/09 13:49:22 I'd appreciate a comment here why check->index() i
+ *add = new(BasicBlock()->zone()) HAdd(context,
original_value,
new_constant);
(*add)->AssumeRepresentation(representation);
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698