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

Side by Side Diff: src/hydrogen.cc

Issue 15941005: Merged r14732, r14746, r14757 into 3.18 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.18
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 10745 matching lines...) Expand 10 before | Expand all | Expand 10 after
10756 10756
10757 BuildInitializeElements(object_elements, kind, object_elements_length); 10757 BuildInitializeElements(object_elements, kind, object_elements_length);
10758 10758
10759 // Copy elements backing store content. 10759 // Copy elements backing store content.
10760 if (elements->IsFixedDoubleArray()) { 10760 if (elements->IsFixedDoubleArray()) {
10761 for (int i = 0; i < elements_length; i++) { 10761 for (int i = 0; i < elements_length; i++) {
10762 HValue* key_constant = 10762 HValue* key_constant =
10763 AddInstruction(new(zone) HConstant(i, Representation::Integer32())); 10763 AddInstruction(new(zone) HConstant(i, Representation::Integer32()));
10764 HInstruction* value_instruction = 10764 HInstruction* value_instruction =
10765 AddInstruction(new(zone) HLoadKeyed( 10765 AddInstruction(new(zone) HLoadKeyed(
10766 boilerplate_elements, key_constant, NULL, kind)); 10766 boilerplate_elements, key_constant, NULL, kind,
10767 AddInstruction(new(zone) HStoreKeyed( 10767 ALLOW_RETURN_HOLE));
10768 HInstruction* store = AddInstruction(new(zone) HStoreKeyed(
10768 object_elements, key_constant, value_instruction, kind)); 10769 object_elements, key_constant, value_instruction, kind));
10770 store->ClearFlag(HValue::kDeoptimizeOnUndefined);
10769 } 10771 }
10770 } else if (elements->IsFixedArray()) { 10772 } else if (elements->IsFixedArray()) {
10771 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements); 10773 Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements);
10772 Handle<FixedArray> original_fast_elements = 10774 Handle<FixedArray> original_fast_elements =
10773 Handle<FixedArray>::cast(original_elements); 10775 Handle<FixedArray>::cast(original_elements);
10774 for (int i = 0; i < elements_length; i++) { 10776 for (int i = 0; i < elements_length; i++) {
10775 Handle<Object> value(fast_elements->get(i), isolate()); 10777 Handle<Object> value(fast_elements->get(i), isolate());
10776 HValue* key_constant = 10778 HValue* key_constant =
10777 AddInstruction(new(zone) HConstant(i, Representation::Integer32())); 10779 AddInstruction(new(zone) HConstant(i, Representation::Integer32()));
10778 if (value->IsJSObject()) { 10780 if (value->IsJSObject()) {
10779 Handle<JSObject> value_object = Handle<JSObject>::cast(value); 10781 Handle<JSObject> value_object = Handle<JSObject>::cast(value);
10780 Handle<JSObject> original_value_object = Handle<JSObject>::cast( 10782 Handle<JSObject> original_value_object = Handle<JSObject>::cast(
10781 Handle<Object>(original_fast_elements->get(i), isolate())); 10783 Handle<Object>(original_fast_elements->get(i), isolate()));
10782 HInstruction* value_instruction = 10784 HInstruction* value_instruction =
10783 AddInstruction(new(zone) HInnerAllocatedObject(target, *offset)); 10785 AddInstruction(new(zone) HInnerAllocatedObject(target, *offset));
10784 AddInstruction(new(zone) HStoreKeyed( 10786 AddInstruction(new(zone) HStoreKeyed(
10785 object_elements, key_constant, value_instruction, kind)); 10787 object_elements, key_constant, value_instruction, kind));
10786 BuildEmitDeepCopy(value_object, original_value_object, target, 10788 BuildEmitDeepCopy(value_object, original_value_object, target,
10787 offset, DONT_TRACK_ALLOCATION_SITE); 10789 offset, DONT_TRACK_ALLOCATION_SITE);
10788 } else { 10790 } else {
10789 HInstruction* value_instruction = 10791 HInstruction* value_instruction =
10790 AddInstruction(new(zone) HLoadKeyed( 10792 AddInstruction(new(zone) HLoadKeyed(
10791 boilerplate_elements, key_constant, NULL, kind)); 10793 boilerplate_elements, key_constant, NULL, kind,
10794 ALLOW_RETURN_HOLE));
10792 AddInstruction(new(zone) HStoreKeyed( 10795 AddInstruction(new(zone) HStoreKeyed(
10793 object_elements, key_constant, value_instruction, kind)); 10796 object_elements, key_constant, value_instruction, kind));
10794 } 10797 }
10795 } 10798 }
10796 } else { 10799 } else {
10797 UNREACHABLE(); 10800 UNREACHABLE();
10798 } 10801 }
10799 } 10802 }
10800 } 10803 }
10801 10804
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
12222 } 12225 }
12223 } 12226 }
12224 12227
12225 #ifdef DEBUG 12228 #ifdef DEBUG
12226 if (graph_ != NULL) graph_->Verify(false); // No full verify. 12229 if (graph_ != NULL) graph_->Verify(false); // No full verify.
12227 if (allocator_ != NULL) allocator_->Verify(); 12230 if (allocator_ != NULL) allocator_->Verify();
12228 #endif 12231 #endif
12229 } 12232 }
12230 12233
12231 } } // namespace v8::internal 12234 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698