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

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

Issue 5699002: RFC: Switch to ast ids (instead of positions) for type feedback. (Closed)
Patch Set: Cleanup Created 10 years 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Invalidate the relocation information, as it will become invalid by the 49 // Invalidate the relocation information, as it will become invalid by the
50 // code patching below, and is not needed any more. 50 // code patching below, and is not needed any more.
51 code->InvalidateRelocation(); 51 code->InvalidateRelocation();
52 52
53 // For each return after a safepoint insert a absolute call to the 53 // For each return after a safepoint insert a absolute call to the
54 // corresponding deoptimization entry. 54 // corresponding deoptimization entry.
55 unsigned last_pc_offset = 0; 55 unsigned last_pc_offset = 0;
56 SafepointTable table(function->code()); 56 SafepointTable table(function->code());
57 for (unsigned i = 0; i < table.length(); i++) { 57 for (unsigned i = 0; i < table.length(); i++) {
58 unsigned pc_offset = table.GetPcOffset(i); 58 unsigned pc_offset = table.GetPcOffset(i);
59 int deoptimization_index = table.GetDeoptimizationIndex(i); 59 AstId deoptimization_index = table.GetDeoptimizationIndex(i);
60 int gap_code_size = table.GetGapCodeSize(i); 60 int gap_code_size = table.GetGapCodeSize(i);
61 #ifdef DEBUG 61 #ifdef DEBUG
62 // Destroy the code which is not supposed to run again. 62 // Destroy the code which is not supposed to run again.
63 unsigned instructions = pc_offset - last_pc_offset; 63 unsigned instructions = pc_offset - last_pc_offset;
64 CodePatcher destroyer(code->instruction_start() + last_pc_offset, 64 CodePatcher destroyer(code->instruction_start() + last_pc_offset,
65 instructions); 65 instructions);
66 for (unsigned i = 0; i < instructions; i++) { 66 for (unsigned i = 0; i < instructions; i++) {
67 destroyer.masm()->int3(); 67 destroyer.masm()->int3();
68 } 68 }
69 #endif 69 #endif
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 __ jmp(&done); 606 __ jmp(&done);
607 ASSERT(masm()->pc_offset() - start == table_entry_size_); 607 ASSERT(masm()->pc_offset() - start == table_entry_size_);
608 } 608 }
609 __ bind(&done); 609 __ bind(&done);
610 } 610 }
611 611
612 #undef __ 612 #undef __
613 613
614 614
615 } } // namespace v8::internal 615 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698