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

Side by Side Diff: src/execution.cc

Issue 641643006: Always include full reloc info to stubs for serialization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « src/code-stubs-hydrogen.cc ('k') | src/objects.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/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 16 matching lines...) Expand all
27 27
28 28
29 void StackGuard::reset_limits(const ExecutionAccess& lock) { 29 void StackGuard::reset_limits(const ExecutionAccess& lock) {
30 DCHECK(isolate_ != NULL); 30 DCHECK(isolate_ != NULL);
31 thread_local_.jslimit_ = thread_local_.real_jslimit_; 31 thread_local_.jslimit_ = thread_local_.real_jslimit_;
32 thread_local_.climit_ = thread_local_.real_climit_; 32 thread_local_.climit_ = thread_local_.real_climit_;
33 isolate_->heap()->SetStackLimits(); 33 isolate_->heap()->SetStackLimits();
34 } 34 }
35 35
36 36
37 static PrintDeserializedCodeInfo(Handle<JSFunction> function) {
38 if (function->code() == function->shared()->code() &&
39 function->shared()->deserialized()) {
40 PrintF("Running deserialized script: ");
41 Object* script = function->shared()->script();
42 if (script->IsScript()) {
43 Script::cast(script)->name()->ShortPrint();
44 } else {
45 function->shared()->script()->ShortPrint();
46 }
47 PrintF("\n");
48 }
49 }
50
51
37 MUST_USE_RESULT static MaybeHandle<Object> Invoke( 52 MUST_USE_RESULT static MaybeHandle<Object> Invoke(
38 bool is_construct, 53 bool is_construct,
39 Handle<JSFunction> function, 54 Handle<JSFunction> function,
40 Handle<Object> receiver, 55 Handle<Object> receiver,
41 int argc, 56 int argc,
42 Handle<Object> args[]) { 57 Handle<Object> args[]) {
43 Isolate* isolate = function->GetIsolate(); 58 Isolate* isolate = function->GetIsolate();
44 59
45 // Entering JavaScript. 60 // Entering JavaScript.
46 VMState<JS> state(isolate); 61 VMState<JS> state(isolate);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // allocation of handles without explicit handle scopes. 95 // allocation of handles without explicit handle scopes.
81 SaveContext save(isolate); 96 SaveContext save(isolate);
82 SealHandleScope shs(isolate); 97 SealHandleScope shs(isolate);
83 JSEntryFunction stub_entry = FUNCTION_CAST<JSEntryFunction>(code->entry()); 98 JSEntryFunction stub_entry = FUNCTION_CAST<JSEntryFunction>(code->entry());
84 99
85 // Call the function through the right JS entry stub. 100 // Call the function through the right JS entry stub.
86 byte* function_entry = function->code()->entry(); 101 byte* function_entry = function->code()->entry();
87 JSFunction* func = *function; 102 JSFunction* func = *function;
88 Object* recv = *receiver; 103 Object* recv = *receiver;
89 Object*** argv = reinterpret_cast<Object***>(args); 104 Object*** argv = reinterpret_cast<Object***>(args);
105 if (FLAG_profile_deserialization) PrintDeserializedCodeInfo(function);
90 value = 106 value =
91 CALL_GENERATED_CODE(stub_entry, function_entry, func, recv, argc, argv); 107 CALL_GENERATED_CODE(stub_entry, function_entry, func, recv, argc, argv);
92 } 108 }
93 109
94 #ifdef VERIFY_HEAP 110 #ifdef VERIFY_HEAP
95 value->ObjectVerify(); 111 value->ObjectVerify();
96 #endif 112 #endif
97 113
98 // Update the pending exception flag and return the value. 114 // Update the pending exception flag and return the value.
99 bool has_exception = value->IsException(); 115 bool has_exception = value->IsException();
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 } 716 }
701 717
702 isolate_->counters()->stack_interrupts()->Increment(); 718 isolate_->counters()->stack_interrupts()->Increment();
703 isolate_->counters()->runtime_profiler_ticks()->Increment(); 719 isolate_->counters()->runtime_profiler_ticks()->Increment();
704 isolate_->runtime_profiler()->OptimizeNow(); 720 isolate_->runtime_profiler()->OptimizeNow();
705 721
706 return isolate_->heap()->undefined_value(); 722 return isolate_->heap()->undefined_value();
707 } 723 }
708 724
709 } } // namespace v8::internal 725 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698