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

Side by Side Diff: src/execution.cc

Issue 1326463002: Version 4.6.85.9 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.6
Patch Set: Created 5 years, 3 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 | « src/execution.h ('k') | src/mips/simulator-mips.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/execution.h" 5 #include "src/execution.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 // If the Object doesn't have an instance-call handler we should 336 // If the Object doesn't have an instance-call handler we should
337 // throw a non-callable exception. 337 // throw a non-callable exception.
338 THROW_NEW_ERROR(isolate, 338 THROW_NEW_ERROR(isolate,
339 NewTypeError(MessageTemplate::kCalledNonCallable, object), 339 NewTypeError(MessageTemplate::kCalledNonCallable, object),
340 Object); 340 Object);
341 } 341 }
342 342
343 343
344 void StackGuard::EnableInterrupts() {
345 ExecutionAccess access(isolate_);
346 if (has_pending_interrupts(access)) {
347 set_interrupt_limits(access);
348 }
349 }
350
351
352 void StackGuard::SetStackLimit(uintptr_t limit) { 344 void StackGuard::SetStackLimit(uintptr_t limit) {
353 ExecutionAccess access(isolate_); 345 ExecutionAccess access(isolate_);
354 // If the current limits are special (e.g. due to a pending interrupt) then 346 // If the current limits are special (e.g. due to a pending interrupt) then
355 // leave them alone. 347 // leave them alone.
356 uintptr_t jslimit = SimulatorStack::JsLimitFromCLimit(isolate_, limit); 348 uintptr_t jslimit = SimulatorStack::JsLimitFromCLimit(isolate_, limit);
357 if (thread_local_.jslimit() == thread_local_.real_jslimit_) { 349 if (thread_local_.jslimit() == thread_local_.real_jslimit_) {
358 thread_local_.set_jslimit(jslimit); 350 thread_local_.set_jslimit(jslimit);
359 } 351 }
360 if (thread_local_.climit() == thread_local_.real_climit_) { 352 if (thread_local_.climit() == thread_local_.real_climit_) {
361 thread_local_.set_climit(limit); 353 thread_local_.set_climit(limit);
362 } 354 }
363 thread_local_.real_climit_ = limit; 355 thread_local_.real_climit_ = limit;
364 thread_local_.real_jslimit_ = jslimit; 356 thread_local_.real_jslimit_ = jslimit;
365 } 357 }
366 358
367 359
360 void StackGuard::AdjustStackLimitForSimulator() {
361 ExecutionAccess access(isolate_);
362 uintptr_t climit = thread_local_.real_climit_;
363 // If the current limits are special (e.g. due to a pending interrupt) then
364 // leave them alone.
365 uintptr_t jslimit = SimulatorStack::JsLimitFromCLimit(isolate_, climit);
366 if (thread_local_.jslimit() == thread_local_.real_jslimit_) {
367 thread_local_.set_jslimit(jslimit);
368 isolate_->heap()->SetStackLimits();
369 }
370 }
371
372
373 void StackGuard::EnableInterrupts() {
374 ExecutionAccess access(isolate_);
375 if (has_pending_interrupts(access)) {
376 set_interrupt_limits(access);
377 }
378 }
379
380
368 void StackGuard::DisableInterrupts() { 381 void StackGuard::DisableInterrupts() {
369 ExecutionAccess access(isolate_); 382 ExecutionAccess access(isolate_);
370 reset_limits(access); 383 reset_limits(access);
371 } 384 }
372 385
373 386
374 void StackGuard::PushPostponeInterruptsScope(PostponeInterruptsScope* scope) { 387 void StackGuard::PushPostponeInterruptsScope(PostponeInterruptsScope* scope) {
375 ExecutionAccess access(isolate_); 388 ExecutionAccess access(isolate_);
376 // Intercept already requested interrupts. 389 // Intercept already requested interrupts.
377 int intercepted = thread_local_.interrupt_flags_ & scope->intercept_mask_; 390 int intercepted = thread_local_.interrupt_flags_ & scope->intercept_mask_;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 672
660 isolate_->counters()->stack_interrupts()->Increment(); 673 isolate_->counters()->stack_interrupts()->Increment();
661 isolate_->counters()->runtime_profiler_ticks()->Increment(); 674 isolate_->counters()->runtime_profiler_ticks()->Increment();
662 isolate_->runtime_profiler()->OptimizeNow(); 675 isolate_->runtime_profiler()->OptimizeNow();
663 676
664 return isolate_->heap()->undefined_value(); 677 return isolate_->heap()->undefined_value();
665 } 678 }
666 679
667 } // namespace internal 680 } // namespace internal
668 } // namespace v8 681 } // namespace v8
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/mips/simulator-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698