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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 7248077: Use the information from the last recorded safepoint for the padding after the deferrred code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 | « no previous file | src/ia32/lithium-codegen-ia32.h » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 if (current_instruction_ < instructions_->length() - 1) { 250 if (current_instruction_ < instructions_->length() - 1) {
251 return instructions_->at(current_instruction_ + 1); 251 return instructions_->at(current_instruction_ + 1);
252 } else { 252 } else {
253 return NULL; 253 return NULL;
254 } 254 }
255 } 255 }
256 256
257 257
258 bool LCodeGen::GenerateDeferredCode() { 258 bool LCodeGen::GenerateDeferredCode() {
259 ASSERT(is_generating()); 259 ASSERT(is_generating());
260 Label last_jump;
261 if (deferred_.length() > 0) { 260 if (deferred_.length() > 0) {
262 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 261 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
263 LDeferredCode* code = deferred_[i]; 262 LDeferredCode* code = deferred_[i];
264 __ bind(code->entry()); 263 __ bind(code->entry());
265 code->Generate(); 264 code->Generate();
266 #ifdef DEBUG
267 if (i == deferred_.length() - 1) {
268 __ bind(&last_jump);
269 }
270 #endif
271 __ jmp(code->exit()); 265 __ jmp(code->exit());
272 } 266 }
273 267
274 // Reserve some space to ensure that the last piece of deferred code 268 // Pad code to ensure that the last piece of deferred code have
275 // have room for lazy bailout. 269 // room for lazy bailout.
276 __ nop(); 270 while ((masm()->pc_offset() - LastSafepointEnd())
277 __ nop(); 271 < Deoptimizer::patch_size()) {
278 272 __ nop();
279 int code_generated = 273 }
280 masm_->InstructionsGeneratedSince(&last_jump) * Assembler::kInstrSize;
281 ASSERT(Deoptimizer::patch_size() <= code_generated);
282 USE(code_generated);
283 } 274 }
284 275
285 // Force constant pool emission at the end of the deferred code to make 276 // Force constant pool emission at the end of the deferred code to make
286 // sure that no constant pools are emitted after. 277 // sure that no constant pools are emitted after.
287 masm()->CheckConstPool(true, false); 278 masm()->CheckConstPool(true, false);
288 279
289 return !is_aborted(); 280 return !is_aborted();
290 } 281 }
291 282
292 283
(...skipping 4108 matching lines...) Expand 10 before | Expand all | Expand 10 after
4401 ASSERT(osr_pc_offset_ == -1); 4392 ASSERT(osr_pc_offset_ == -1);
4402 osr_pc_offset_ = masm()->pc_offset(); 4393 osr_pc_offset_ = masm()->pc_offset();
4403 } 4394 }
4404 4395
4405 4396
4406 4397
4407 4398
4408 #undef __ 4399 #undef __
4409 4400
4410 } } // namespace v8::internal 4401 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.h » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698