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

Side by Side Diff: src/ia32/assembler-ia32.h

Issue 14403015: Disallow dereferencing deferred handles when generating optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 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 | « src/hydrogen-instructions.cc ('k') | src/ia32/assembler-ia32.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) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 405
406 static Operand StaticArray(Register index, 406 static Operand StaticArray(Register index,
407 ScaleFactor scale, 407 ScaleFactor scale,
408 const ExternalReference& arr) { 408 const ExternalReference& arr) {
409 return Operand(index, scale, reinterpret_cast<int32_t>(arr.address()), 409 return Operand(index, scale, reinterpret_cast<int32_t>(arr.address()),
410 RelocInfo::EXTERNAL_REFERENCE); 410 RelocInfo::EXTERNAL_REFERENCE);
411 } 411 }
412 412
413 static Operand Cell(Handle<JSGlobalPropertyCell> cell) { 413 static Operand Cell(Handle<JSGlobalPropertyCell> cell) {
414 ALLOW_HANDLE_DEREF(Isolate::Current(), "embedding raw address");
414 return Operand(reinterpret_cast<int32_t>(cell.location()), 415 return Operand(reinterpret_cast<int32_t>(cell.location()),
415 RelocInfo::GLOBAL_PROPERTY_CELL); 416 RelocInfo::GLOBAL_PROPERTY_CELL);
416 } 417 }
417 418
418 // Returns true if this Operand is a wrapper for the specified register. 419 // Returns true if this Operand is a wrapper for the specified register.
419 bool is_reg(Register reg) const; 420 bool is_reg(Register reg) const;
420 421
421 // Returns true if this Operand is a wrapper for one register. 422 // Returns true if this Operand is a wrapper for one register.
422 bool is_reg_only() const; 423 bool is_reg_only() const;
423 424
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 1143 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
1143 } 1144 }
1144 1145
1145 // code emission 1146 // code emission
1146 void GrowBuffer(); 1147 void GrowBuffer();
1147 inline void emit(uint32_t x); 1148 inline void emit(uint32_t x);
1148 inline void emit(Handle<Object> handle); 1149 inline void emit(Handle<Object> handle);
1149 inline void emit(uint32_t x, 1150 inline void emit(uint32_t x,
1150 RelocInfo::Mode rmode, 1151 RelocInfo::Mode rmode,
1151 TypeFeedbackId id = TypeFeedbackId::None()); 1152 TypeFeedbackId id = TypeFeedbackId::None());
1153 inline void emit(Handle<Code> code,
1154 RelocInfo::Mode rmode,
1155 TypeFeedbackId id = TypeFeedbackId::None());
1152 inline void emit(const Immediate& x); 1156 inline void emit(const Immediate& x);
1153 inline void emit_w(const Immediate& x); 1157 inline void emit_w(const Immediate& x);
1154 1158
1155 // Emit the code-object-relative offset of the label's position 1159 // Emit the code-object-relative offset of the label's position
1156 inline void emit_code_relative_offset(Label* label); 1160 inline void emit_code_relative_offset(Label* label);
1157 1161
1158 // instruction generation 1162 // instruction generation
1159 void emit_arith_b(int op1, int op2, Register dst, int imm8); 1163 void emit_arith_b(int op1, int op2, Register dst, int imm8);
1160 1164
1161 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81) 1165 // Emit a basic arithmetic instruction (i.e. first byte of the family is 0x81)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 private: 1219 private:
1216 Assembler* assembler_; 1220 Assembler* assembler_;
1217 #ifdef DEBUG 1221 #ifdef DEBUG
1218 int space_before_; 1222 int space_before_;
1219 #endif 1223 #endif
1220 }; 1224 };
1221 1225
1222 } } // namespace v8::internal 1226 } } // namespace v8::internal
1223 1227
1224 #endif // V8_IA32_ASSEMBLER_IA32_H_ 1228 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698