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

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

Issue 6577036: [Isolates] Merge from bleeding_edge to isolates, revisions 6100-6300. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/arm/codegen-arm.cc ('k') | src/arm/full-codegen-arm.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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Invalidate the relocation information, as it will become invalid by the 48 // Invalidate the relocation information, as it will become invalid by the
49 // code patching below, and is not needed any more. 49 // code patching below, and is not needed any more.
50 code->InvalidateRelocation(); 50 code->InvalidateRelocation();
51 51
52 // For each return after a safepoint insert an absolute call to the 52 // For each return after a safepoint insert an absolute call to the
53 // corresponding deoptimization entry. 53 // corresponding deoptimization entry.
54 unsigned last_pc_offset = 0; 54 unsigned last_pc_offset = 0;
55 SafepointTable table(function->code()); 55 SafepointTable table(function->code());
56 for (unsigned i = 0; i < table.length(); i++) { 56 for (unsigned i = 0; i < table.length(); i++) {
57 unsigned pc_offset = table.GetPcOffset(i); 57 unsigned pc_offset = table.GetPcOffset(i);
58 int deoptimization_index = table.GetDeoptimizationIndex(i); 58 SafepointEntry safepoint_entry = table.GetEntry(i);
59 int gap_code_size = table.GetGapCodeSize(i); 59 int deoptimization_index = safepoint_entry.deoptimization_index();
60 int gap_code_size = safepoint_entry.gap_code_size();
60 // Check that we did not shoot past next safepoint. 61 // Check that we did not shoot past next safepoint.
61 // TODO(srdjan): How do we guarantee that safepoint code does not 62 // TODO(srdjan): How do we guarantee that safepoint code does not
62 // overlap other safepoint patching code? 63 // overlap other safepoint patching code?
63 CHECK(pc_offset >= last_pc_offset); 64 CHECK(pc_offset >= last_pc_offset);
64 #ifdef DEBUG 65 #ifdef DEBUG
65 // Destroy the code which is not supposed to be run again. 66 // Destroy the code which is not supposed to be run again.
66 int instructions = (pc_offset - last_pc_offset) / Assembler::kInstrSize; 67 int instructions = (pc_offset - last_pc_offset) / Assembler::kInstrSize;
67 CodePatcher destroyer(code->instruction_start() + last_pc_offset, 68 CodePatcher destroyer(code->instruction_start() + last_pc_offset,
68 instructions); 69 instructions);
69 for (int x = 0; x < instructions; x++) { 70 for (int x = 0; x < instructions; x++) {
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 __ push(ip); 498 __ push(ip);
498 __ b(&done); 499 __ b(&done);
499 ASSERT(masm()->pc_offset() - start == table_entry_size_); 500 ASSERT(masm()->pc_offset() - start == table_entry_size_);
500 } 501 }
501 __ bind(&done); 502 __ bind(&done);
502 } 503 }
503 504
504 #undef __ 505 #undef __
505 506
506 } } // namespace v8::internal 507 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698