OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3760 } | 3760 } |
3761 AddInstruction(new HBoundsCheck(key, length)); | 3761 AddInstruction(new HBoundsCheck(key, length)); |
3762 return new HStoreKeyedFastElement(elements, key, val); | 3762 return new HStoreKeyedFastElement(elements, key, val); |
3763 } | 3763 } |
3764 | 3764 |
3765 | 3765 |
3766 HInstruction* HGraphBuilder::BuildStoreKeyedPixelArrayElement( | 3766 HInstruction* HGraphBuilder::BuildStoreKeyedPixelArrayElement( |
3767 HValue* object, | 3767 HValue* object, |
3768 HValue* key, | 3768 HValue* key, |
3769 HValue* val, | 3769 HValue* val, |
3770 XExpression* expr) { | 3770 Expression* expr) { |
3771 ASSERT(expr->IsMonomorphic()); | 3771 ASSERT(expr->IsMonomorphic()); |
3772 AddInstruction(new HCheckNonSmi(object)); | 3772 AddInstruction(new HCheckNonSmi(object)); |
3773 Handle<Map> map = expr->GetMonomorphicReceiverType(); | 3773 Handle<Map> map = expr->GetMonomorphicReceiverType(); |
3774 ASSERT(!map->has_fast_elements()); | 3774 ASSERT(!map->has_fast_elements()); |
3775 ASSERT(map->has_pixel_array_elements()); | 3775 ASSERT(map->has_pixel_array_elements()); |
3776 AddInstruction(new HCheckMap(object, map)); | 3776 AddInstruction(new HCheckMap(object, map)); |
3777 HLoadElements* elements = new HLoadElements(object); | 3777 HLoadElements* elements = new HLoadElements(object); |
3778 AddInstruction(elements); | 3778 AddInstruction(elements); |
3779 HInstruction* length = AddInstruction(new HPixelArrayLength(elements)); | 3779 HInstruction* length = AddInstruction(new HPixelArrayLength(elements)); |
3780 AddInstruction(new HBoundsCheck(key, length)); | 3780 AddInstruction(new HBoundsCheck(key, length)); |
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6013 } | 6013 } |
6014 } | 6014 } |
6015 | 6015 |
6016 #ifdef DEBUG | 6016 #ifdef DEBUG |
6017 if (graph_ != NULL) graph_->Verify(); | 6017 if (graph_ != NULL) graph_->Verify(); |
6018 if (allocator_ != NULL) allocator_->Verify(); | 6018 if (allocator_ != NULL) allocator_->Verify(); |
6019 #endif | 6019 #endif |
6020 } | 6020 } |
6021 | 6021 |
6022 } } // namespace v8::internal | 6022 } } // namespace v8::internal |
OLD | NEW |