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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 6966041: Add complete ElementKind information directly to Map for objects with elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 6 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/ia32/macro-assembler-ia32.h ('k') | src/objects.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 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 CmpInstanceType(map, type); 272 CmpInstanceType(map, type);
273 } 273 }
274 274
275 275
276 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { 276 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
277 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), 277 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
278 static_cast<int8_t>(type)); 278 static_cast<int8_t>(type));
279 } 279 }
280 280
281 281
282 void MacroAssembler::CheckFastElements(Register map,
283 Label* fail,
284 Label::Distance distance) {
285 STATIC_ASSERT(JSObject::FAST_ELEMENTS == 0);
286 cmpb(FieldOperand(map, Map::kBitField2Offset),
287 Map::kMaximumBitField2FastElementValue);
288 j(above, fail, distance);
289 }
290
291
282 void MacroAssembler::CheckMap(Register obj, 292 void MacroAssembler::CheckMap(Register obj,
283 Handle<Map> map, 293 Handle<Map> map,
284 Label* fail, 294 Label* fail,
285 SmiCheckType smi_check_type) { 295 SmiCheckType smi_check_type) {
286 if (smi_check_type == DO_SMI_CHECK) { 296 if (smi_check_type == DO_SMI_CHECK) {
287 JumpIfSmi(obj, fail); 297 JumpIfSmi(obj, fail);
288 } 298 }
289 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); 299 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map));
290 j(not_equal, fail); 300 j(not_equal, fail);
291 } 301 }
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2129 2139
2130 // Check that the code was patched as expected. 2140 // Check that the code was patched as expected.
2131 ASSERT(masm_.pc_ == address_ + size_); 2141 ASSERT(masm_.pc_ == address_ + size_);
2132 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2142 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2133 } 2143 }
2134 2144
2135 2145
2136 } } // namespace v8::internal 2146 } } // namespace v8::internal
2137 2147
2138 #endif // V8_TARGET_ARCH_IA32 2148 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698