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

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 146703008: A64: Add more descriptive messages to aborts (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: 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 | « no previous file | src/a64/macro-assembler-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 LConstantOperand* const_op = LConstantOperand::cast(op); 1166 LConstantOperand* const_op = LConstantOperand::cast(op);
1167 HConstant* constant = chunk()->LookupConstant(const_op); 1167 HConstant* constant = chunk()->LookupConstant(const_op);
1168 Representation r = chunk_->LookupLiteralRepresentation(const_op); 1168 Representation r = chunk_->LookupLiteralRepresentation(const_op);
1169 if (r.IsInteger32()) { 1169 if (r.IsInteger32()) {
1170 ASSERT(constant->HasInteger32Value()); 1170 ASSERT(constant->HasInteger32Value());
1171 return Operand(signedness == SIGNED_INT32 1171 return Operand(signedness == SIGNED_INT32
1172 ? constant->Integer32Value() 1172 ? constant->Integer32Value()
1173 : static_cast<uint32_t>(constant->Integer32Value())); 1173 : static_cast<uint32_t>(constant->Integer32Value()));
1174 } else { 1174 } else {
1175 // Other constants not implemented. 1175 // Other constants not implemented.
1176 // TODO(all): Add this error code to objects.h. 1176 Abort(kToOperand32UnsupportedImmediate);
1177 // Abort(kToOperand32UnsupportedImmediate);
1178 Abort(kUnknown);
1179 } 1177 }
1180 } 1178 }
1181 // Other cases are not implemented. 1179 // Other cases are not implemented.
1182 UNREACHABLE(); 1180 UNREACHABLE();
1183 return Operand(0); 1181 return Operand(0);
1184 } 1182 }
1185 1183
1186 1184
1187 MemOperand LCodeGen::ToMemOperand(LOperand* op) const { 1185 MemOperand LCodeGen::ToMemOperand(LOperand* op) const {
1188 ASSERT(op != NULL); 1186 ASSERT(op != NULL);
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 case Token::BIT_XOR: __ Eor(result, left, right); break; 1662 case Token::BIT_XOR: __ Eor(result, left, right); break;
1665 default: 1663 default:
1666 UNREACHABLE(); 1664 UNREACHABLE();
1667 break; 1665 break;
1668 } 1666 }
1669 } 1667 }
1670 1668
1671 1669
1672 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) { 1670 void LCodeGen::ApplyCheckIf(Condition cc, LBoundsCheck* check) {
1673 if (FLAG_debug_code && check->hydrogen()->skip_check()) { 1671 if (FLAG_debug_code && check->hydrogen()->skip_check()) {
1674 // TODO(all): Add this error code to objects.h. 1672 __ Assert(InvertCondition(cc), kEliminatedBoundsCheckFailed);
1675 // __ Assert(InvertCondition(cc), kEliminatedBoundsCheckFailed);
1676 __ Assert(InvertCondition(cc), kUnknown);
1677 } else { 1673 } else {
1678 DeoptimizeIf(cc, check->environment()); 1674 DeoptimizeIf(cc, check->environment());
1679 } 1675 }
1680 } 1676 }
1681 1677
1682 1678
1683 void LCodeGen::DoBoundsCheck(LBoundsCheck *instr) { 1679 void LCodeGen::DoBoundsCheck(LBoundsCheck *instr) {
1684 if (instr->hydrogen()->skip_check()) return; 1680 if (instr->hydrogen()->skip_check()) return;
1685 1681
1686 Register length = ToRegister(instr->length()); 1682 Register length = ToRegister(instr->length());
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 // If necessary, load the function object. 1862 // If necessary, load the function object.
1867 if (function_reg.IsNone()) { 1863 if (function_reg.IsNone()) {
1868 function_reg = x1; 1864 function_reg = x1;
1869 __ LoadHeapObject(function_reg, function); 1865 __ LoadHeapObject(function_reg, function);
1870 } 1866 }
1871 1867
1872 if (FLAG_debug_code) { 1868 if (FLAG_debug_code) {
1873 Label is_not_smi; 1869 Label is_not_smi;
1874 // Try to confirm that function_reg (x1) is a tagged pointer. 1870 // Try to confirm that function_reg (x1) is a tagged pointer.
1875 __ JumpIfNotSmi(function_reg, &is_not_smi); 1871 __ JumpIfNotSmi(function_reg, &is_not_smi);
1876 // TODO(all): Add this error code to objects.h. 1872 __ Abort(kExpectedFunctionObject);
1877 // __ Abort(kExpectedFunctionObject);
1878 __ Abort(kUnknown);
1879 __ Bind(&is_not_smi); 1873 __ Bind(&is_not_smi);
1880 } 1874 }
1881 1875
1882 if (can_invoke_directly) { 1876 if (can_invoke_directly) {
1883 // Change context. 1877 // Change context.
1884 __ Ldr(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset)); 1878 __ Ldr(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset));
1885 1879
1886 // Set the arguments count if adaption is not needed. Assumes that x0 is 1880 // Set the arguments count if adaption is not needed. Assumes that x0 is
1887 // available to write to at this point. 1881 // available to write to at this point.
1888 if (dont_adapt_arguments) { 1882 if (dont_adapt_arguments) {
(...skipping 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after
4336 __ Bind(&slow); 4330 __ Bind(&slow);
4337 4331
4338 // Check that the dst register contains new space allocation top, which is a 4332 // Check that the dst register contains new space allocation top, which is a
4339 // valid address for the GC. 4333 // valid address for the GC.
4340 if (FLAG_debug_code) { 4334 if (FLAG_debug_code) {
4341 ExternalReference new_space_allocation_top = 4335 ExternalReference new_space_allocation_top =
4342 ExternalReference::new_space_allocation_top_address(isolate()); 4336 ExternalReference::new_space_allocation_top_address(isolate());
4343 __ Mov(scratch1, Operand(new_space_allocation_top)); 4337 __ Mov(scratch1, Operand(new_space_allocation_top));
4344 __ Ldr(scratch1, MemOperand(scratch1)); 4338 __ Ldr(scratch1, MemOperand(scratch1));
4345 __ Cmp(dst, scratch1); 4339 __ Cmp(dst, scratch1);
4346 // TODO(all): Add this error code to objects.h. 4340 __ Check(eq, kUnexpectedAllocationTop);
4347 // __ Check(eq, kRegisterDstDoesNotContainAllocationTop);
4348 __ Check(eq, kUnknown);
4349 } 4341 }
4350 4342
4351 { 4343 {
4352 // Preserve the value of all registers. 4344 // Preserve the value of all registers.
4353 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); 4345 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
4354 4346
4355 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr); 4347 CallRuntimeFromDeferred(Runtime::kAllocateHeapNumber, 0, instr);
4356 __ StoreToSafepointRegisterSlot(x0, dst); 4348 __ StoreToSafepointRegisterSlot(x0, dst);
4357 } 4349 }
4358 4350
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
4473 4465
4474 4466
4475 void LCodeGen::DoParameter(LParameter* instr) { 4467 void LCodeGen::DoParameter(LParameter* instr) {
4476 // Nothing to do. 4468 // Nothing to do.
4477 } 4469 }
4478 4470
4479 4471
4480 void LCodeGen::DoPushArgument(LPushArgument* instr) { 4472 void LCodeGen::DoPushArgument(LPushArgument* instr) {
4481 LOperand* argument = instr->value(); 4473 LOperand* argument = instr->value();
4482 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { 4474 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) {
4483 // TODO(all): Add this error code to objects.h. 4475 Abort(kDoPushArgumentNotImplementedForDoubleType);
4484 // Abort(kDoPushArgumentNotImplementedForDoubleTypes);
4485 Abort(kUnknown);
4486 } else { 4476 } else {
4487 __ Push(ToRegister(argument)); 4477 __ Push(ToRegister(argument));
4488 } 4478 }
4489 } 4479 }
4490 4480
4491 4481
4492 void LCodeGen::DoReturn(LReturn* instr) { 4482 void LCodeGen::DoReturn(LReturn* instr) {
4493 if (FLAG_trace && info()->IsOptimizing()) { 4483 if (FLAG_trace && info()->IsOptimizing()) {
4494 // Push the return value on the stack as the parameter. 4484 // Push the return value on the stack as the parameter.
4495 // Runtime::TraceExit returns its parameter in x0. 4485 // Runtime::TraceExit returns its parameter in x0.
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
5603 __ Bind(&out_of_object); 5593 __ Bind(&out_of_object);
5604 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5594 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5605 // Index is equal to negated out of object property index plus 1. 5595 // Index is equal to negated out of object property index plus 1.
5606 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5596 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5607 __ Ldr(result, FieldMemOperand(result, 5597 __ Ldr(result, FieldMemOperand(result,
5608 FixedArray::kHeaderSize - kPointerSize)); 5598 FixedArray::kHeaderSize - kPointerSize));
5609 __ Bind(&done); 5599 __ Bind(&done);
5610 } 5600 }
5611 5601
5612 } } // namespace v8::internal 5602 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/a64/macro-assembler-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698