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

Side by Side Diff: src/deoptimizer.h

Issue 6343005: Move stack check patching to the architecture dependent deoptimizer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 11 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/arm/deoptimizer-arm.cc ('k') | src/ia32/deoptimizer-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 static void DeoptimizeGlobalObject(JSObject* object); 121 static void DeoptimizeGlobalObject(JSObject* object);
122 122
123 static void VisitAllOptimizedFunctionsForContext( 123 static void VisitAllOptimizedFunctionsForContext(
124 Context* context, OptimizedFunctionVisitor* visitor); 124 Context* context, OptimizedFunctionVisitor* visitor);
125 125
126 static void VisitAllOptimizedFunctionsForGlobalObject( 126 static void VisitAllOptimizedFunctionsForGlobalObject(
127 JSObject* object, OptimizedFunctionVisitor* visitor); 127 JSObject* object, OptimizedFunctionVisitor* visitor);
128 128
129 static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor); 129 static void VisitAllOptimizedFunctions(OptimizedFunctionVisitor* visitor);
130 130
131 // Given the relocation info of a call to the stack check stub, patch the 131 // Patch all stack guard checks in the unoptimized code to
132 // code so as to go unconditionally to the on-stack replacement builtin 132 // unconditionally call replacement_code.
133 // instead. 133 static void PatchStackCheckCode(Code* unoptimized_code,
134 static void PatchStackCheckCode(RelocInfo* rinfo, Code* replacement_code); 134 Code* check_code,
135 Code* replacement_code);
135 136
136 // Given the relocation info of a call to the on-stack replacement 137 // Change all patched stack guard checks in the unoptimized code
137 // builtin, patch the code back to the original stack check code. 138 // back to a normal stack guard check.
138 static void RevertStackCheckCode(RelocInfo* rinfo, Code* check_code); 139 static void RevertStackCheckCode(Code* unoptimized_code,
140 Code* check_code,
141 Code* replacement_code);
139 142
140 ~Deoptimizer(); 143 ~Deoptimizer();
141 144
142 void InsertHeapNumberValues(int index, JavaScriptFrame* frame); 145 void InsertHeapNumberValues(int index, JavaScriptFrame* frame);
143 146
144 static void ComputeOutputFrames(Deoptimizer* deoptimizer); 147 static void ComputeOutputFrames(Deoptimizer* deoptimizer);
145 148
146 static Address GetDeoptimizationEntry(int id, BailoutType type); 149 static Address GetDeoptimizationEntry(int id, BailoutType type);
147 static int GetDeoptimizationId(Address addr, BailoutType type); 150 static int GetDeoptimizationId(Address addr, BailoutType type);
148 static int GetOutputInfo(DeoptimizationOutputData* data, 151 static int GetOutputInfo(DeoptimizationOutputData* data,
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 Handle<Code> code_; 505 Handle<Code> code_;
503 506
504 // Next pointer for linked list. 507 // Next pointer for linked list.
505 DeoptimizingCodeListNode* next_; 508 DeoptimizingCodeListNode* next_;
506 }; 509 };
507 510
508 511
509 } } // namespace v8::internal 512 } } // namespace v8::internal
510 513
511 #endif // V8_DEOPTIMIZER_H_ 514 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698