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

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

Issue 12561003: MIPS: ES6 symbols: Allow symbols as property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('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 3848 matching lines...) Expand 10 before | Expand all | Expand 10 after
3859 Label* fail) { 3859 Label* fail) {
3860 ASSERT(kNotStringTag != 0); 3860 ASSERT(kNotStringTag != 0);
3861 3861
3862 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 3862 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
3863 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); 3863 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
3864 And(scratch, scratch, Operand(kIsNotStringMask)); 3864 And(scratch, scratch, Operand(kIsNotStringMask));
3865 Branch(fail, ne, scratch, Operand(zero_reg)); 3865 Branch(fail, ne, scratch, Operand(zero_reg));
3866 } 3866 }
3867 3867
3868 3868
3869 void MacroAssembler::IsObjectNameType(Register object,
3870 Register scratch,
3871 Label* fail) {
3872 lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
3873 lbu(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
3874 Branch(fail, hi, scratch, Operand(LAST_NAME_TYPE));
3875 }
3876
3877
3869 // --------------------------------------------------------------------------- 3878 // ---------------------------------------------------------------------------
3870 // Support functions. 3879 // Support functions.
3871 3880
3872 3881
3873 void MacroAssembler::TryGetFunctionPrototype(Register function, 3882 void MacroAssembler::TryGetFunctionPrototype(Register function,
3874 Register result, 3883 Register result,
3875 Register scratch, 3884 Register scratch,
3876 Label* miss, 3885 Label* miss,
3877 bool miss_on_bound_function) { 3886 bool miss_on_bound_function) {
3878 // Check that the receiver isn't a smi. 3887 // Check that the receiver isn't a smi.
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
4890 Check(ne, "Operand is a smi and not a string", t0, Operand(zero_reg)); 4899 Check(ne, "Operand is a smi and not a string", t0, Operand(zero_reg));
4891 push(object); 4900 push(object);
4892 lw(object, FieldMemOperand(object, HeapObject::kMapOffset)); 4901 lw(object, FieldMemOperand(object, HeapObject::kMapOffset));
4893 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset)); 4902 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset));
4894 Check(lo, "Operand is not a string", object, Operand(FIRST_NONSTRING_TYPE)); 4903 Check(lo, "Operand is not a string", object, Operand(FIRST_NONSTRING_TYPE));
4895 pop(object); 4904 pop(object);
4896 } 4905 }
4897 } 4906 }
4898 4907
4899 4908
4909 void MacroAssembler::AssertName(Register object) {
4910 if (emit_debug_code()) {
4911 STATIC_ASSERT(kSmiTag == 0);
4912 And(t0, object, Operand(kSmiTagMask));
4913 Check(ne, "Operand is a smi and not a name", t0, Operand(zero_reg));
4914 push(object);
4915 lw(object, FieldMemOperand(object, HeapObject::kMapOffset));
4916 lbu(object, FieldMemOperand(object, Map::kInstanceTypeOffset));
4917 pop(object);
4918 Check(le, "Operand is not a name", object, Operand(LAST_NAME_TYPE));
4919 }
4920 }
4921
4922
4900 void MacroAssembler::AssertRootValue(Register src, 4923 void MacroAssembler::AssertRootValue(Register src,
4901 Heap::RootListIndex root_value_index, 4924 Heap::RootListIndex root_value_index,
4902 const char* message) { 4925 const char* message) {
4903 if (emit_debug_code()) { 4926 if (emit_debug_code()) {
4904 ASSERT(!src.is(at)); 4927 ASSERT(!src.is(at));
4905 LoadRoot(at, root_value_index); 4928 LoadRoot(at, root_value_index);
4906 Check(eq, message, src, Operand(at)); 4929 Check(eq, message, src, Operand(at));
4907 } 4930 }
4908 } 4931 }
4909 4932
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
5548 opcode == BGTZL); 5571 opcode == BGTZL);
5549 opcode = (cond == eq) ? BEQ : BNE; 5572 opcode = (cond == eq) ? BEQ : BNE;
5550 instr = (instr & ~kOpcodeMask) | opcode; 5573 instr = (instr & ~kOpcodeMask) | opcode;
5551 masm_.emit(instr); 5574 masm_.emit(instr);
5552 } 5575 }
5553 5576
5554 5577
5555 } } // namespace v8::internal 5578 } } // namespace v8::internal
5556 5579
5557 #endif // V8_TARGET_ARCH_MIPS 5580 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698