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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 10233006: Add missing literal pool guards. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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 | 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 ~JumpPatchSite() { 65 ~JumpPatchSite() {
66 ASSERT(patch_site_.is_bound() == info_emitted_); 66 ASSERT(patch_site_.is_bound() == info_emitted_);
67 } 67 }
68 68
69 // When initially emitting this ensure that a jump is always generated to skip 69 // When initially emitting this ensure that a jump is always generated to skip
70 // the inlined smi code. 70 // the inlined smi code.
71 void EmitJumpIfNotSmi(Register reg, Label* target) { 71 void EmitJumpIfNotSmi(Register reg, Label* target) {
72 ASSERT(!patch_site_.is_bound() && !info_emitted_); 72 ASSERT(!patch_site_.is_bound() && !info_emitted_);
73 Assembler::BlockConstPoolScope block_const_pool(masm_);
73 __ bind(&patch_site_); 74 __ bind(&patch_site_);
74 __ cmp(reg, Operand(reg)); 75 __ cmp(reg, Operand(reg));
75 // Don't use b(al, ...) as that might emit the constant pool right after the 76 // Don't use b(al, ...) as that might emit the constant pool right after the
76 // branch. After patching when the branch is no longer unconditional 77 // branch. After patching when the branch is no longer unconditional
77 // execution can continue into the constant pool. 78 // execution can continue into the constant pool.
78 __ b(eq, target); // Always taken before patched. 79 __ b(eq, target); // Always taken before patched.
79 } 80 }
80 81
81 // When initially emitting this ensure that a jump is never generated to skip 82 // When initially emitting this ensure that a jump is never generated to skip
82 // the inlined smi code. 83 // the inlined smi code.
83 void EmitJumpIfSmi(Register reg, Label* target) { 84 void EmitJumpIfSmi(Register reg, Label* target) {
84 ASSERT(!patch_site_.is_bound() && !info_emitted_); 85 ASSERT(!patch_site_.is_bound() && !info_emitted_);
86 Assembler::BlockConstPoolScope block_const_pool(masm_);
85 __ bind(&patch_site_); 87 __ bind(&patch_site_);
86 __ cmp(reg, Operand(reg)); 88 __ cmp(reg, Operand(reg));
87 __ b(ne, target); // Never taken before patched. 89 __ b(ne, target); // Never taken before patched.
88 } 90 }
89 91
90 void EmitPatchInfo() { 92 void EmitPatchInfo() {
91 if (patch_site_.is_bound()) { 93 if (patch_site_.is_bound()) {
92 int delta_to_patch_site = masm_->InstructionsGeneratedSince(&patch_site_); 94 int delta_to_patch_site = masm_->InstructionsGeneratedSince(&patch_site_);
93 Register reg; 95 Register reg;
94 reg.set_code(delta_to_patch_site / kOff12Mask); 96 reg.set_code(delta_to_patch_site / kOff12Mask);
(...skipping 4536 matching lines...) Expand 10 before | Expand all | Expand 10 after
4631 *context_length = 0; 4633 *context_length = 0;
4632 return previous_; 4634 return previous_;
4633 } 4635 }
4634 4636
4635 4637
4636 #undef __ 4638 #undef __
4637 4639
4638 } } // namespace v8::internal 4640 } } // namespace v8::internal
4639 4641
4640 #endif // V8_TARGET_ARCH_ARM 4642 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698