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

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

Issue 139903005: We shouldn't throw under FLAG_debug_code, rather abort. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE + mjsunit.status todo update. Created 6 years, 10 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/full-codegen-x64.cc ('k') | test/mjsunit/mjsunit.status » ('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 4587 matching lines...) Expand 10 before | Expand all | Expand 10 after
4598 #endif 4598 #endif
4599 } 4599 }
4600 4600
4601 4601
4602 void MacroAssembler::EmitSeqStringSetCharCheck(Register string, 4602 void MacroAssembler::EmitSeqStringSetCharCheck(Register string,
4603 Register index, 4603 Register index,
4604 Register value, 4604 Register value,
4605 uint32_t encoding_mask) { 4605 uint32_t encoding_mask) {
4606 Label is_object; 4606 Label is_object;
4607 JumpIfNotSmi(string, &is_object); 4607 JumpIfNotSmi(string, &is_object);
4608 Throw(kNonObject); 4608 Abort(kNonObject);
4609 bind(&is_object); 4609 bind(&is_object);
4610 4610
4611 push(value); 4611 push(value);
4612 movp(value, FieldOperand(string, HeapObject::kMapOffset)); 4612 movp(value, FieldOperand(string, HeapObject::kMapOffset));
4613 movzxbq(value, FieldOperand(value, Map::kInstanceTypeOffset)); 4613 movzxbq(value, FieldOperand(value, Map::kInstanceTypeOffset));
4614 4614
4615 andb(value, Immediate(kStringRepresentationMask | kStringEncodingMask)); 4615 andb(value, Immediate(kStringRepresentationMask | kStringEncodingMask));
4616 cmpq(value, Immediate(encoding_mask)); 4616 cmpq(value, Immediate(encoding_mask));
4617 pop(value); 4617 pop(value);
4618 ThrowIf(not_equal, kUnexpectedStringType); 4618 Check(equal, kUnexpectedStringType);
4619 4619
4620 // The index is assumed to be untagged coming in, tag it to compare with the 4620 // The index is assumed to be untagged coming in, tag it to compare with the
4621 // string length without using a temp register, it is restored at the end of 4621 // string length without using a temp register, it is restored at the end of
4622 // this function. 4622 // this function.
4623 Integer32ToSmi(index, index); 4623 Integer32ToSmi(index, index);
4624 SmiCompare(index, FieldOperand(string, String::kLengthOffset)); 4624 SmiCompare(index, FieldOperand(string, String::kLengthOffset));
4625 ThrowIf(greater_equal, kIndexIsTooLarge); 4625 Check(less, kIndexIsTooLarge);
4626 4626
4627 SmiCompare(index, Smi::FromInt(0)); 4627 SmiCompare(index, Smi::FromInt(0));
4628 ThrowIf(less, kIndexIsNegative); 4628 Check(greater_equal, kIndexIsNegative);
4629 4629
4630 // Restore the index 4630 // Restore the index
4631 SmiToInteger32(index, index); 4631 SmiToInteger32(index, index);
4632 } 4632 }
4633 4633
4634 4634
4635 void MacroAssembler::PrepareCallCFunction(int num_arguments) { 4635 void MacroAssembler::PrepareCallCFunction(int num_arguments) {
4636 int frame_alignment = OS::ActivationFrameAlignment(); 4636 int frame_alignment = OS::ActivationFrameAlignment();
4637 ASSERT(frame_alignment != 0); 4637 ASSERT(frame_alignment != 0);
4638 ASSERT(num_arguments >= 0); 4638 ASSERT(num_arguments >= 0);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
4993 j(equal, found); 4993 j(equal, found);
4994 movp(current, FieldOperand(current, Map::kPrototypeOffset)); 4994 movp(current, FieldOperand(current, Map::kPrototypeOffset));
4995 CompareRoot(current, Heap::kNullValueRootIndex); 4995 CompareRoot(current, Heap::kNullValueRootIndex);
4996 j(not_equal, &loop_again); 4996 j(not_equal, &loop_again);
4997 } 4997 }
4998 4998
4999 4999
5000 } } // namespace v8::internal 5000 } } // namespace v8::internal
5001 5001
5002 #endif // V8_TARGET_ARCH_X64 5002 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698