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

Side by Side Diff: runtime/vm/assembler_arm.cc

Issue 22389004: Allows compiler bailout to handle errors of any type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « no previous file | runtime/vm/assembler_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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 return Utils::IsInt(Utils::CountOneBits(kBranchOffsetMask), offset); 1724 return Utils::IsInt(Utils::CountOneBits(kBranchOffsetMask), offset);
1725 } 1725 }
1726 1726
1727 1727
1728 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t inst) { 1728 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t inst) {
1729 // The offset is off by 8 due to the way the ARM CPUs read PC. 1729 // The offset is off by 8 due to the way the ARM CPUs read PC.
1730 offset -= Instr::kPCReadOffset; 1730 offset -= Instr::kPCReadOffset;
1731 1731
1732 if (!CanEncodeBranchOffset(offset)) { 1732 if (!CanEncodeBranchOffset(offset)) {
1733 ASSERT(!use_far_branches()); 1733 ASSERT(!use_far_branches());
1734 const Error& error = Error::Handle(LanguageError::New( 1734 Isolate::Current()->long_jump_base()->Jump(
1735 String::Handle(String::New("Branch offset overflow")))); 1735 1, Object::branch_offset_error());
1736 Isolate::Current()->long_jump_base()->Jump(1, error);
1737 } 1736 }
1738 1737
1739 // Properly preserve only the bits supported in the instruction. 1738 // Properly preserve only the bits supported in the instruction.
1740 offset >>= 2; 1739 offset >>= 2;
1741 offset &= kBranchOffsetMask; 1740 offset &= kBranchOffsetMask;
1742 return (inst & ~kBranchOffsetMask) | offset; 1741 return (inst & ~kBranchOffsetMask) | offset;
1743 } 1742 }
1744 1743
1745 1744
1746 int Assembler::DecodeBranchOffset(int32_t inst) { 1745 int Assembler::DecodeBranchOffset(int32_t inst) {
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 2729
2731 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2730 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2732 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2731 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2733 return fpu_reg_names[reg]; 2732 return fpu_reg_names[reg];
2734 } 2733 }
2735 2734
2736 } // namespace dart 2735 } // namespace dart
2737 2736
2738 #endif // defined TARGET_ARCH_ARM 2737 #endif // defined TARGET_ARCH_ARM
2739 2738
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698