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

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

Issue 582683002: Remove deprecated ShouldSelfOptimize machinery. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes after rebasing. Created 6 years, 1 month 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/full-codegen-ia32.cc ('k') | src/mips64/full-codegen-mips64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 __ Branch(&return_label_); 404 __ Branch(&return_label_);
405 } else { 405 } else {
406 __ bind(&return_label_); 406 __ bind(&return_label_);
407 if (FLAG_trace) { 407 if (FLAG_trace) {
408 // Push the return value on the stack as the parameter. 408 // Push the return value on the stack as the parameter.
409 // Runtime::TraceExit returns its parameter in v0. 409 // Runtime::TraceExit returns its parameter in v0.
410 __ push(v0); 410 __ push(v0);
411 __ CallRuntime(Runtime::kTraceExit, 1); 411 __ CallRuntime(Runtime::kTraceExit, 1);
412 } 412 }
413 // Pretend that the exit is a backwards jump to the entry. 413 // Pretend that the exit is a backwards jump to the entry.
414 int weight = 1; 414 int distance = masm_->pc_offset();
415 if (info_->ShouldSelfOptimize()) { 415 int weight =
416 weight = FLAG_interrupt_budget / FLAG_self_opt_count; 416 Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier));
417 } else {
418 int distance = masm_->pc_offset();
419 weight = Min(kMaxBackEdgeWeight,
420 Max(1, distance / kCodeSizeMultiplier));
421 }
422 EmitProfilingCounterDecrement(weight); 417 EmitProfilingCounterDecrement(weight);
423 Label ok; 418 Label ok;
424 __ Branch(&ok, ge, a3, Operand(zero_reg)); 419 __ Branch(&ok, ge, a3, Operand(zero_reg));
425 __ push(v0); 420 __ push(v0);
426 __ Call(isolate()->builtins()->InterruptCheck(), 421 __ Call(isolate()->builtins()->InterruptCheck(),
427 RelocInfo::CODE_TARGET); 422 RelocInfo::CODE_TARGET);
428 __ pop(v0); 423 __ pop(v0);
429 EmitProfilingCounterReset(); 424 EmitProfilingCounterReset();
430 __ bind(&ok); 425 __ bind(&ok);
431 426
(...skipping 4805 matching lines...) Expand 10 before | Expand all | Expand 10 after
5237 Assembler::target_address_at(pc_immediate_load_address)) == 5232 Assembler::target_address_at(pc_immediate_load_address)) ==
5238 reinterpret_cast<uint32_t>( 5233 reinterpret_cast<uint32_t>(
5239 isolate->builtins()->OsrAfterStackCheck()->entry())); 5234 isolate->builtins()->OsrAfterStackCheck()->entry()));
5240 return OSR_AFTER_STACK_CHECK; 5235 return OSR_AFTER_STACK_CHECK;
5241 } 5236 }
5242 5237
5243 5238
5244 } } // namespace v8::internal 5239 } } // namespace v8::internal
5245 5240
5246 #endif // V8_TARGET_ARCH_MIPS 5241 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698