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

Side by Side Diff: src/objects.h

Issue 2481433002: [Interpreter] Add IsInterpreted() to JSFunction and use to fix test-heap tests. (Closed)
Patch Set: Rebase Created 4 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
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 7301 matching lines...) Expand 10 before | Expand all | Expand 10 after
7312 // [name]: Function name. 7312 // [name]: Function name.
7313 DECL_ACCESSORS(name, Object) 7313 DECL_ACCESSORS(name, Object)
7314 7314
7315 // [code]: Function code. 7315 // [code]: Function code.
7316 DECL_ACCESSORS(code, Code) 7316 DECL_ACCESSORS(code, Code)
7317 7317
7318 // Get the abstract code associated with the function, which will either be 7318 // Get the abstract code associated with the function, which will either be
7319 // a Code object or a BytecodeArray. 7319 // a Code object or a BytecodeArray.
7320 inline AbstractCode* abstract_code(); 7320 inline AbstractCode* abstract_code();
7321 7321
7322 // Tells whether or not this shared function info is interpreted.
7323 //
7324 // Note: function->IsInterpreted() does not necessarily return the same value
7325 // as function->shared()->IsInterpreted() because the shared function info
7326 // could tier up to baseline via a different function closure. The interpreter
7327 // entry stub will "self-heal" this divergence when the function is executed.
7328 inline bool IsInterpreted() const;
7329
7322 inline void ReplaceCode(Code* code); 7330 inline void ReplaceCode(Code* code);
7323 inline bool HasBaselineCode() const; 7331 inline bool HasBaselineCode() const;
7324 7332
7325 // [optimized_code_map]: Map from native context to optimized code 7333 // [optimized_code_map]: Map from native context to optimized code
7326 // and a shared literals array. 7334 // and a shared literals array.
7327 DECL_ACCESSORS(optimized_code_map, FixedArray) 7335 DECL_ACCESSORS(optimized_code_map, FixedArray)
7328 7336
7329 // Returns entry from optimized code map for specified context and OSR entry. 7337 // Returns entry from optimized code map for specified context and OSR entry.
7330 // Note that {code == nullptr, literals == nullptr} indicates no matching 7338 // Note that {code == nullptr, literals == nullptr} indicates no matching
7331 // entry has been found, whereas {code, literals == nullptr} indicates that 7339 // entry has been found, whereas {code, literals == nullptr} indicates that
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
8346 inline void set_code_no_write_barrier(Code* code); 8354 inline void set_code_no_write_barrier(Code* code);
8347 inline void ReplaceCode(Code* code); 8355 inline void ReplaceCode(Code* code);
8348 8356
8349 // Get the abstract code associated with the function, which will either be 8357 // Get the abstract code associated with the function, which will either be
8350 // a Code object or a BytecodeArray. 8358 // a Code object or a BytecodeArray.
8351 inline AbstractCode* abstract_code(); 8359 inline AbstractCode* abstract_code();
8352 8360
8353 // Tells whether this function inlines the given shared function info. 8361 // Tells whether this function inlines the given shared function info.
8354 bool Inlines(SharedFunctionInfo* candidate); 8362 bool Inlines(SharedFunctionInfo* candidate);
8355 8363
8364 // Tells whether or not this function is interpreted.
8365 //
8366 // Note: function->IsInterpreted() does not necessarily return the same value
8367 // as function->shared()->IsInterpreted() because the shared function info
8368 // could tier up to baseline via a different function closure. The interpreter
8369 // entry stub will "self-heal" this divergence when the function is executed.
8370 inline bool IsInterpreted();
8371
8356 // Tells whether or not this function has been optimized. 8372 // Tells whether or not this function has been optimized.
8357 inline bool IsOptimized(); 8373 inline bool IsOptimized();
8358 8374
8359 // Mark this function for lazy recompilation. The function will be recompiled 8375 // Mark this function for lazy recompilation. The function will be recompiled
8360 // the next time it is executed. 8376 // the next time it is executed.
8361 void MarkForBaseline(); 8377 void MarkForBaseline();
8362 void MarkForOptimization(); 8378 void MarkForOptimization();
8363 void AttemptConcurrentOptimization(); 8379 void AttemptConcurrentOptimization();
8364 8380
8365 // Tells whether or not the function is already marked for lazy recompilation. 8381 // Tells whether or not the function is already marked for lazy recompilation.
(...skipping 3439 matching lines...) Expand 10 before | Expand all | Expand 10 after
11805 } 11821 }
11806 return value; 11822 return value;
11807 } 11823 }
11808 }; 11824 };
11809 11825
11810 11826
11811 } // NOLINT, false-positive due to second-order macros. 11827 } // NOLINT, false-positive due to second-order macros.
11812 } // NOLINT, false-positive due to second-order macros. 11828 } // NOLINT, false-positive due to second-order macros.
11813 11829
11814 #endif // V8_OBJECTS_H_ 11830 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698