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

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

Issue 8337012: Fix bug in instanceof of bound functions on ARM. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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') | 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 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after
3667 } 3667 }
3668 3668
3669 3669
3670 // --------------------------------------------------------------------------- 3670 // ---------------------------------------------------------------------------
3671 // Support functions. 3671 // Support functions.
3672 3672
3673 3673
3674 void MacroAssembler::TryGetFunctionPrototype(Register function, 3674 void MacroAssembler::TryGetFunctionPrototype(Register function,
3675 Register result, 3675 Register result,
3676 Register scratch, 3676 Register scratch,
3677 Label* miss) { 3677 Label* miss,
3678 bool miss_on_bound_function) {
3678 // Check that the receiver isn't a smi. 3679 // Check that the receiver isn't a smi.
3679 JumpIfSmi(function, miss); 3680 JumpIfSmi(function, miss);
3680 3681
3681 // Check that the function really is a function. Load map into result reg. 3682 // Check that the function really is a function. Load map into result reg.
3682 GetObjectType(function, result, scratch); 3683 GetObjectType(function, result, scratch);
3683 Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE)); 3684 Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE));
3684 3685
3686 if (miss_on_bound_function) {
3687 lw(scratch,
3688 FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset));
3689 lw(scratch,
3690 FieldMemOperand(scratch, SharedFunctionInfo::kCompilerHintsOffset));
3691 And(scratch, scratch,
3692 Operand(Smi::FromInt(1 << SharedFunctionInfo::kBoundFunction)));
3693 Branch(miss, ne, scratch, Operand(zero_reg));
3694 }
3695
3685 // Make sure that the function has an instance prototype. 3696 // Make sure that the function has an instance prototype.
3686 Label non_instance; 3697 Label non_instance;
3687 lbu(scratch, FieldMemOperand(result, Map::kBitFieldOffset)); 3698 lbu(scratch, FieldMemOperand(result, Map::kBitFieldOffset));
3688 And(scratch, scratch, Operand(1 << Map::kHasNonInstancePrototype)); 3699 And(scratch, scratch, Operand(1 << Map::kHasNonInstancePrototype));
3689 Branch(&non_instance, ne, scratch, Operand(zero_reg)); 3700 Branch(&non_instance, ne, scratch, Operand(zero_reg));
3690 3701
3691 // Get the prototype or initial map from the function. 3702 // Get the prototype or initial map from the function.
3692 lw(result, 3703 lw(result,
3693 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 3704 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
3694 3705
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
5124 opcode == BGTZL); 5135 opcode == BGTZL);
5125 opcode = (cond == eq) ? BEQ : BNE; 5136 opcode = (cond == eq) ? BEQ : BNE;
5126 instr = (instr & ~kOpcodeMask) | opcode; 5137 instr = (instr & ~kOpcodeMask) | opcode;
5127 masm_.emit(instr); 5138 masm_.emit(instr);
5128 } 5139 }
5129 5140
5130 5141
5131 } } // namespace v8::internal 5142 } } // namespace v8::internal
5132 5143
5133 #endif // V8_TARGET_ARCH_MIPS 5144 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698