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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 12049012: Avoid handle dereference during graph optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 11 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 | « src/isolate.cc ('k') | src/x64/lithium-x64.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 4114 matching lines...) Expand 10 before | Expand all | Expand 10 after
4125 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4125 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4126 } 4126 }
4127 4127
4128 4128
4129 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { 4129 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
4130 Register object_reg = ToRegister(instr->object()); 4130 Register object_reg = ToRegister(instr->object());
4131 Register new_map_reg = ToRegister(instr->new_map_temp()); 4131 Register new_map_reg = ToRegister(instr->new_map_temp());
4132 4132
4133 Handle<Map> from_map = instr->original_map(); 4133 Handle<Map> from_map = instr->original_map();
4134 Handle<Map> to_map = instr->transitioned_map(); 4134 Handle<Map> to_map = instr->transitioned_map();
4135 ElementsKind from_kind = from_map->elements_kind(); 4135 ElementsKind from_kind = instr->from_kind();
4136 ElementsKind to_kind = to_map->elements_kind(); 4136 ElementsKind to_kind = instr->to_kind();
4137 4137
4138 Label not_applicable; 4138 Label not_applicable;
4139 __ Cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); 4139 __ Cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map);
4140 __ j(not_equal, &not_applicable); 4140 __ j(not_equal, &not_applicable);
4141 __ movq(new_map_reg, to_map, RelocInfo::EMBEDDED_OBJECT); 4141 __ movq(new_map_reg, to_map, RelocInfo::EMBEDDED_OBJECT);
4142 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { 4142 if (IsSimpleMapChangeTransition(from_kind, to_kind)) {
4143 __ movq(FieldOperand(object_reg, HeapObject::kMapOffset), new_map_reg); 4143 __ movq(FieldOperand(object_reg, HeapObject::kMapOffset), new_map_reg);
4144 // Write barrier. 4144 // Write barrier.
4145 ASSERT_NE(instr->temp(), NULL); 4145 ASSERT_NE(instr->temp(), NULL);
4146 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, 4146 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg,
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
5567 FixedArray::kHeaderSize - kPointerSize)); 5567 FixedArray::kHeaderSize - kPointerSize));
5568 __ bind(&done); 5568 __ bind(&done);
5569 } 5569 }
5570 5570
5571 5571
5572 #undef __ 5572 #undef __
5573 5573
5574 } } // namespace v8::internal 5574 } } // namespace v8::internal
5575 5575
5576 #endif // V8_TARGET_ARCH_X64 5576 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698