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

Side by Side Diff: src/x64/macro-assembler-x64.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/x64/macro-assembler-x64.h ('k') | no next file » | 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 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 CmpInstanceType(map, type); 2551 CmpInstanceType(map, type);
2552 } 2552 }
2553 2553
2554 2554
2555 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) { 2555 void MacroAssembler::CmpInstanceType(Register map, InstanceType type) {
2556 cmpb(FieldOperand(map, Map::kInstanceTypeOffset), 2556 cmpb(FieldOperand(map, Map::kInstanceTypeOffset),
2557 Immediate(static_cast<int8_t>(type))); 2557 Immediate(static_cast<int8_t>(type)));
2558 } 2558 }
2559 2559
2560 2560
2561 void MacroAssembler::CheckFastElements(Register map,
2562 Label* fail,
2563 Label::Distance distance) {
2564 STATIC_ASSERT(JSObject::FAST_ELEMENTS == 0);
2565 cmpb(FieldOperand(map, Map::kBitField2Offset),
2566 Immediate(Map::kMaximumBitField2FastElementValue));
2567 j(above, fail, distance);
2568 }
2569
2570
2561 void MacroAssembler::CheckMap(Register obj, 2571 void MacroAssembler::CheckMap(Register obj,
2562 Handle<Map> map, 2572 Handle<Map> map,
2563 Label* fail, 2573 Label* fail,
2564 SmiCheckType smi_check_type) { 2574 SmiCheckType smi_check_type) {
2565 if (smi_check_type == DO_SMI_CHECK) { 2575 if (smi_check_type == DO_SMI_CHECK) {
2566 JumpIfSmi(obj, fail); 2576 JumpIfSmi(obj, fail);
2567 } 2577 }
2568 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map); 2578 Cmp(FieldOperand(obj, HeapObject::kMapOffset), map);
2569 j(not_equal, fail); 2579 j(not_equal, fail);
2570 } 2580 }
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3738 CPU::FlushICache(address_, size_); 3748 CPU::FlushICache(address_, size_);
3739 3749
3740 // Check that the code was patched as expected. 3750 // Check that the code was patched as expected.
3741 ASSERT(masm_.pc_ == address_ + size_); 3751 ASSERT(masm_.pc_ == address_ + size_);
3742 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 3752 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
3743 } 3753 }
3744 3754
3745 } } // namespace v8::internal 3755 } } // namespace v8::internal
3746 3756
3747 #endif // V8_TARGET_ARCH_X64 3757 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698