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

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

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/ia32/assembler-ia32.h ('k') | src/ia32/assembler-ia32-inl.h » ('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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 } 1452 }
1453 1453
1454 1454
1455 void Assembler::call(Handle<Code> code, 1455 void Assembler::call(Handle<Code> code,
1456 RelocInfo::Mode rmode, 1456 RelocInfo::Mode rmode,
1457 TypeFeedbackId ast_id) { 1457 TypeFeedbackId ast_id) {
1458 positions_recorder()->WriteRecordedPositions(); 1458 positions_recorder()->WriteRecordedPositions();
1459 EnsureSpace ensure_space(this); 1459 EnsureSpace ensure_space(this);
1460 ASSERT(RelocInfo::IsCodeTarget(rmode)); 1460 ASSERT(RelocInfo::IsCodeTarget(rmode));
1461 EMIT(0xE8); 1461 EMIT(0xE8);
1462 emit(reinterpret_cast<intptr_t>(code.location()), rmode, ast_id); 1462 emit(code, rmode, ast_id);
1463 } 1463 }
1464 1464
1465 1465
1466 void Assembler::jmp(Label* L, Label::Distance distance) { 1466 void Assembler::jmp(Label* L, Label::Distance distance) {
1467 EnsureSpace ensure_space(this); 1467 EnsureSpace ensure_space(this);
1468 if (L->is_bound()) { 1468 if (L->is_bound()) {
1469 const int short_size = 2; 1469 const int short_size = 2;
1470 const int long_size = 5; 1470 const int long_size = 5;
1471 int offs = L->pos() - pc_offset(); 1471 int offs = L->pos() - pc_offset();
1472 ASSERT(offs <= 0); 1472 ASSERT(offs <= 0);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 EnsureSpace ensure_space(this); 1506 EnsureSpace ensure_space(this);
1507 EMIT(0xFF); 1507 EMIT(0xFF);
1508 emit_operand(esp, adr); 1508 emit_operand(esp, adr);
1509 } 1509 }
1510 1510
1511 1511
1512 void Assembler::jmp(Handle<Code> code, RelocInfo::Mode rmode) { 1512 void Assembler::jmp(Handle<Code> code, RelocInfo::Mode rmode) {
1513 EnsureSpace ensure_space(this); 1513 EnsureSpace ensure_space(this);
1514 ASSERT(RelocInfo::IsCodeTarget(rmode)); 1514 ASSERT(RelocInfo::IsCodeTarget(rmode));
1515 EMIT(0xE9); 1515 EMIT(0xE9);
1516 emit(reinterpret_cast<intptr_t>(code.location()), rmode); 1516 emit(code, rmode);
1517 } 1517 }
1518 1518
1519 1519
1520 void Assembler::j(Condition cc, Label* L, Label::Distance distance) { 1520 void Assembler::j(Condition cc, Label* L, Label::Distance distance) {
1521 EnsureSpace ensure_space(this); 1521 EnsureSpace ensure_space(this);
1522 ASSERT(0 <= cc && static_cast<int>(cc) < 16); 1522 ASSERT(0 <= cc && static_cast<int>(cc) < 16);
1523 if (L->is_bound()) { 1523 if (L->is_bound()) {
1524 const int short_size = 2; 1524 const int short_size = 2;
1525 const int long_size = 6; 1525 const int long_size = 6;
1526 int offs = L->pos() - pc_offset(); 1526 int offs = L->pos() - pc_offset();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 emit(entry - (pc_ + sizeof(int32_t)), rmode); 1561 emit(entry - (pc_ + sizeof(int32_t)), rmode);
1562 } 1562 }
1563 } 1563 }
1564 1564
1565 1565
1566 void Assembler::j(Condition cc, Handle<Code> code) { 1566 void Assembler::j(Condition cc, Handle<Code> code) {
1567 EnsureSpace ensure_space(this); 1567 EnsureSpace ensure_space(this);
1568 // 0000 1111 1000 tttn #32-bit disp 1568 // 0000 1111 1000 tttn #32-bit disp
1569 EMIT(0x0F); 1569 EMIT(0x0F);
1570 EMIT(0x80 | cc); 1570 EMIT(0x80 | cc);
1571 emit(reinterpret_cast<intptr_t>(code.location()), RelocInfo::CODE_TARGET); 1571 emit(code, RelocInfo::CODE_TARGET);
1572 } 1572 }
1573 1573
1574 1574
1575 // FPU instructions. 1575 // FPU instructions.
1576 1576
1577 void Assembler::fld(int i) { 1577 void Assembler::fld(int i) {
1578 EnsureSpace ensure_space(this); 1578 EnsureSpace ensure_space(this);
1579 emit_farith(0xD9, 0xC0, i); 1579 emit_farith(0xD9, 0xC0, i);
1580 } 1580 }
1581 1581
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2695 fprintf(coverage_log, "%s\n", file_line); 2695 fprintf(coverage_log, "%s\n", file_line);
2696 fflush(coverage_log); 2696 fflush(coverage_log);
2697 } 2697 }
2698 } 2698 }
2699 2699
2700 #endif 2700 #endif
2701 2701
2702 } } // namespace v8::internal 2702 } } // namespace v8::internal
2703 2703
2704 #endif // V8_TARGET_ARCH_IA32 2704 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698