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

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

Issue 3117006: Handle overwriting valueOf on String objects correctly when adding... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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') | test/mjsunit/regress/regress-760-1.js » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 Label ok; 1971 Label ok;
1972 Condition is_smi = CheckSmi(object); 1972 Condition is_smi = CheckSmi(object);
1973 j(is_smi, &ok); 1973 j(is_smi, &ok);
1974 Cmp(FieldOperand(object, HeapObject::kMapOffset), 1974 Cmp(FieldOperand(object, HeapObject::kMapOffset),
1975 Factory::heap_number_map()); 1975 Factory::heap_number_map());
1976 Assert(equal, "Operand not a number"); 1976 Assert(equal, "Operand not a number");
1977 bind(&ok); 1977 bind(&ok);
1978 } 1978 }
1979 1979
1980 1980
1981 void MacroAssembler::AbortIfSmi(Register object) {
1982 Label ok;
1983 Condition is_smi = CheckSmi(object);
1984 Assert(NegateCondition(is_smi), "Operand is a smi");
1985 }
1986
1987
1981 void MacroAssembler::AbortIfNotSmi(Register object) { 1988 void MacroAssembler::AbortIfNotSmi(Register object) {
1982 Label ok; 1989 Label ok;
1983 Condition is_smi = CheckSmi(object); 1990 Condition is_smi = CheckSmi(object);
1984 Assert(is_smi, "Operand not a smi"); 1991 Assert(is_smi, "Operand is not a smi");
1985 } 1992 }
1986 1993
1987 1994
1988 void MacroAssembler::AbortIfNotRootValue(Register src, 1995 void MacroAssembler::AbortIfNotRootValue(Register src,
1989 Heap::RootListIndex root_value_index, 1996 Heap::RootListIndex root_value_index,
1990 const char* message) { 1997 const char* message) {
1991 ASSERT(!src.is(kScratchRegister)); 1998 ASSERT(!src.is(kScratchRegister));
1992 LoadRoot(kScratchRegister, root_value_index); 1999 LoadRoot(kScratchRegister, root_value_index);
1993 cmpq(src, kScratchRegister); 2000 cmpq(src, kScratchRegister);
1994 Check(equal, message); 2001 Check(equal, message);
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 CPU::FlushICache(address_, size_); 2955 CPU::FlushICache(address_, size_);
2949 2956
2950 // Check that the code was patched as expected. 2957 // Check that the code was patched as expected.
2951 ASSERT(masm_.pc_ == address_ + size_); 2958 ASSERT(masm_.pc_ == address_ + size_);
2952 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2959 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2953 } 2960 }
2954 2961
2955 } } // namespace v8::internal 2962 } } // namespace v8::internal
2956 2963
2957 #endif // V8_TARGET_ARCH_X64 2964 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/regress/regress-760-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698