OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 bool BuildOffsetAdd(HBoundsCheck* check, | 254 bool BuildOffsetAdd(HBoundsCheck* check, |
255 HInstruction** add, | 255 HInstruction** add, |
256 HConstant** constant, | 256 HConstant** constant, |
257 HValue* original_value, | 257 HValue* original_value, |
258 Representation representation, | 258 Representation representation, |
259 int32_t new_offset) { | 259 int32_t new_offset) { |
260 HValue* index_context = IndexContext(*add, check); | 260 HValue* index_context = IndexContext(*add, check); |
261 if (index_context == NULL) return false; | 261 if (index_context == NULL) return false; |
262 | 262 |
263 Zone* zone = BasicBlock()->zone(); | 263 Zone* zone = BasicBlock()->zone(); |
264 HConstant* new_constant = HConstant::New( | 264 HConstant* new_constant = HConstant::New(zone, index_context, |
265 zone, index_context, new_offset); | 265 new_offset, representation); |
266 if (*add == NULL) { | 266 if (*add == NULL) { |
267 new_constant->InsertBefore(check); | 267 new_constant->InsertBefore(check); |
268 (*add) = HAdd::New(zone, index_context, original_value, new_constant); | 268 (*add) = HAdd::New(zone, index_context, original_value, new_constant); |
269 (*add)->AssumeRepresentation(representation); | 269 (*add)->AssumeRepresentation(representation); |
270 (*add)->InsertBefore(check); | 270 (*add)->InsertBefore(check); |
271 } else { | 271 } else { |
272 new_constant->InsertBefore(*add); | 272 new_constant->InsertBefore(*add); |
273 (*constant)->DeleteAndReplaceWith(new_constant); | 273 (*constant)->DeleteAndReplaceWith(new_constant); |
274 } | 274 } |
275 *constant = new_constant; | 275 *constant = new_constant; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 data->RemoveZeroOperations(); | 385 data->RemoveZeroOperations(); |
386 if (data->FatherInDominatorTree()) { | 386 if (data->FatherInDominatorTree()) { |
387 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); | 387 table_.Insert(data->Key(), data->FatherInDominatorTree(), zone()); |
388 } else { | 388 } else { |
389 table_.Delete(data->Key()); | 389 table_.Delete(data->Key()); |
390 } | 390 } |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
394 } } // namespace v8::internal | 394 } } // namespace v8::internal |
OLD | NEW |