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

Side by Side Diff: src/mips64/full-codegen-mips64.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 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/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 __ Branch(&return_label_); 400 __ Branch(&return_label_);
401 } else { 401 } else {
402 __ bind(&return_label_); 402 __ bind(&return_label_);
403 if (FLAG_trace) { 403 if (FLAG_trace) {
404 // Push the return value on the stack as the parameter. 404 // Push the return value on the stack as the parameter.
405 // Runtime::TraceExit returns its parameter in v0. 405 // Runtime::TraceExit returns its parameter in v0.
406 __ push(v0); 406 __ push(v0);
407 __ CallRuntime(Runtime::kTraceExit, 1); 407 __ CallRuntime(Runtime::kTraceExit, 1);
408 } 408 }
409 // Pretend that the exit is a backwards jump to the entry. 409 // Pretend that the exit is a backwards jump to the entry.
410 int weight = 1; 410 int distance = masm_->pc_offset();
411 if (info_->ShouldSelfOptimize()) { 411 int weight =
412 weight = FLAG_interrupt_budget / FLAG_self_opt_count; 412 Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier));
413 } else {
414 int distance = masm_->pc_offset();
415 weight = Min(kMaxBackEdgeWeight,
416 Max(1, distance / kCodeSizeMultiplier));
417 }
418 EmitProfilingCounterDecrement(weight); 413 EmitProfilingCounterDecrement(weight);
419 Label ok; 414 Label ok;
420 __ Branch(&ok, ge, a3, Operand(zero_reg)); 415 __ Branch(&ok, ge, a3, Operand(zero_reg));
421 __ push(v0); 416 __ push(v0);
422 __ Call(isolate()->builtins()->InterruptCheck(), 417 __ Call(isolate()->builtins()->InterruptCheck(),
423 RelocInfo::CODE_TARGET); 418 RelocInfo::CODE_TARGET);
424 __ pop(v0); 419 __ pop(v0);
425 EmitProfilingCounterReset(); 420 EmitProfilingCounterReset();
426 __ bind(&ok); 421 __ bind(&ok);
427 422
(...skipping 4813 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 Assembler::target_address_at(pc_immediate_load_address)) == 5236 Assembler::target_address_at(pc_immediate_load_address)) ==
5242 reinterpret_cast<uint64_t>( 5237 reinterpret_cast<uint64_t>(
5243 isolate->builtins()->OsrAfterStackCheck()->entry())); 5238 isolate->builtins()->OsrAfterStackCheck()->entry()));
5244 return OSR_AFTER_STACK_CHECK; 5239 return OSR_AFTER_STACK_CHECK;
5245 } 5240 }
5246 5241
5247 5242
5248 } } // namespace v8::internal 5243 } } // namespace v8::internal
5249 5244
5250 #endif // V8_TARGET_ARCH_MIPS64 5245 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698