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

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

Issue 9466050: MIPS: Profiler experiments: Fix debugger in the presence of self-optimization headers (Closed)
Patch Set: Created 8 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
« 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 private: 113 private:
114 MacroAssembler* masm_; 114 MacroAssembler* masm_;
115 Label patch_site_; 115 Label patch_site_;
116 #ifdef DEBUG 116 #ifdef DEBUG
117 bool info_emitted_; 117 bool info_emitted_;
118 #endif 118 #endif
119 }; 119 };
120 120
121 121
122 int FullCodeGenerator::self_optimization_header_size() { 122 int FullCodeGenerator::self_optimization_header_size() {
123 return 0; // TODO(jkummerow): determine correct value. 123 return 11 * Instruction::kInstrSize;
124 } 124 }
125 125
126 126
127 // Generate code for a JS function. On entry to the function the receiver 127 // Generate code for a JS function. On entry to the function the receiver
128 // and arguments have been pushed on the stack left to right. The actual 128 // and arguments have been pushed on the stack left to right. The actual
129 // argument count matches the formal parameter count expected by the 129 // argument count matches the formal parameter count expected by the
130 // function. 130 // function.
131 // 131 //
132 // The live registers are: 132 // The live registers are:
133 // o a1: the JS function object being called (i.e. ourselves) 133 // o a1: the JS function object being called (i.e. ourselves)
(...skipping 23 matching lines...) Expand all
157 Smi::FromInt(Compiler::kCallsUntilPrimitiveOpt)); 157 Smi::FromInt(Compiler::kCallsUntilPrimitiveOpt));
158 JSGlobalPropertyCell* cell; 158 JSGlobalPropertyCell* cell;
159 if (maybe_cell->To(&cell)) { 159 if (maybe_cell->To(&cell)) {
160 __ li(a2, Handle<JSGlobalPropertyCell>(cell)); 160 __ li(a2, Handle<JSGlobalPropertyCell>(cell));
161 __ lw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); 161 __ lw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset));
162 __ Subu(a3, a3, Operand(Smi::FromInt(1))); 162 __ Subu(a3, a3, Operand(Smi::FromInt(1)));
163 __ sw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset)); 163 __ sw(a3, FieldMemOperand(a2, JSGlobalPropertyCell::kValueOffset));
164 Handle<Code> compile_stub( 164 Handle<Code> compile_stub(
165 isolate()->builtins()->builtin(Builtins::kLazyRecompile)); 165 isolate()->builtins()->builtin(Builtins::kLazyRecompile));
166 __ Jump(compile_stub, RelocInfo::CODE_TARGET, eq, a3, Operand(zero_reg)); 166 __ Jump(compile_stub, RelocInfo::CODE_TARGET, eq, a3, Operand(zero_reg));
167 ASSERT(masm_->pc_offset() == self_optimization_header_size()); 167 ASSERT_EQ(masm_->pc_offset(), self_optimization_header_size());
168 } 168 }
169 } 169 }
170 170
171 #ifdef DEBUG 171 #ifdef DEBUG
172 if (strlen(FLAG_stop_at) > 0 && 172 if (strlen(FLAG_stop_at) > 0 &&
173 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 173 info->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
174 __ stop("stop-at"); 174 __ stop("stop-at");
175 } 175 }
176 #endif 176 #endif
177 177
(...skipping 4286 matching lines...) Expand 10 before | Expand all | Expand 10 after
4464 *context_length = 0; 4464 *context_length = 0;
4465 return previous_; 4465 return previous_;
4466 } 4466 }
4467 4467
4468 4468
4469 #undef __ 4469 #undef __
4470 4470
4471 } } // namespace v8::internal 4471 } } // namespace v8::internal
4472 4472
4473 #endif // V8_TARGET_ARCH_MIPS 4473 #endif // V8_TARGET_ARCH_MIPS
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