Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(434)

Unified Diff: JIT/llvm_fbuilder.h

Issue 160063: LOAD_METHOD/CALL_METHOD: Avoid allocating bound methods when possible (Closed)
Patch Set: Merge w/ trunk, fix test_profile Created 13 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « JIT/llvm_compile.cc ('k') | JIT/llvm_inline_functions.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: JIT/llvm_fbuilder.h
===================================================================
--- JIT/llvm_fbuilder.h (revision 1167)
+++ JIT/llvm_fbuilder.h (working copy)
@@ -48,7 +48,8 @@
PyCodeObject *code_object() const { return this->code_object_; }
PyGlobalLlvmData *llvm_data() const { return this->llvm_data_; }
llvm::LLVMContext& context() { return this->context_; }
- bool& uses_delete_fast() { return this->uses_delete_fast_; }
+ bool &uses_delete_fast() { return this->uses_delete_fast_; }
+ std::vector<bool> &loads_optimized() { return this->loads_optimized_; }
llvm::BasicBlock *unreachable_block() const
{
@@ -356,6 +357,13 @@
llvm::SmallPtrSet<PyTypeObject*, 5> types_used_;
+ // A stack that corresponds to LOAD_METHOD/CALL_METHOD pairs. For every
+ // load, we push on a boolean for whether or not the load was optimized.
+ // The call uses this value to decide whether to expect an extra "self"
+ // argument. The stack is necessary if the user wrote code with nested
+ // method calls, like this: f.foo(b.bar()).
+ std::vector<bool> loads_optimized_;
+
// True if something went wrong and we need to stop compilation without
// aborting the process. If this is true, a Python error has already
// been set.
« no previous file with comments | « JIT/llvm_compile.cc ('k') | JIT/llvm_inline_functions.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b