Reviewers: olehougaard, Description: Remove unused code. This code used to be used to "decide" if a call to eval is aliased. Now that we correctly track eval aliasing, we do not need this code.
Please review this at http://codereview.chromium.org/20078 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/scopeinfo.h M src/scopeinfo.cc M src/scopes.h M src/scopes.cc Index: src/scopeinfo.h =================================================================== --- src/scopeinfo.h (revision 1226) +++ src/scopeinfo.h (working copy) @@ -104,8 +104,6 @@ // encoding of it's information in a Code object, which is why these // functions are in this class. - static bool SupportsEval(Code* code); - // Return the number of stack slots for code. static int NumberOfStackSlots(Code* code); Index: src/scopes.h =================================================================== --- src/scopes.h (revision 1226) +++ src/scopes.h (working copy) @@ -222,10 +222,6 @@ int num_stack_slots() const { return num_stack_slots_; } int num_heap_slots() const { return num_heap_slots_; } - // True if this scope supports calling eval (has a properly - // initialized context). - bool SupportsEval() const; - // Make sure this scope and all outer scopes are eagerly compiled. void ForceEagerCompilation() { force_eager_compilation_ = true; } Index: src/scopeinfo.cc =================================================================== --- src/scopeinfo.cc (revision 1226) +++ src/scopeinfo.cc (working copy) @@ -50,7 +50,6 @@ template<class Allocator> ScopeInfo<Allocator>::ScopeInfo(Scope* scope) : function_name_(Factory::empty_symbol()), - supports_eval_(scope->SupportsEval()), parameters_(scope->num_parameters()), stack_slots_(scope->num_stack_slots()), context_slots_(scope->num_heap_slots()), @@ -367,21 +366,6 @@ template<class Allocator> -bool ScopeInfo<Allocator>::SupportsEval(Code* code) { - bool result = false; - if (code->sinfo_size() > 0) { - ReadBool(&Memory::Object_at(code->sinfo_start()) + 1, &result); - } -#ifdef DEBUG - { ScopeInfo info(code); - ASSERT(result == info.supports_eval_); - } -#endif - return result; -} - - -template<class Allocator> int ScopeInfo<Allocator>::NumberOfStackSlots(Code* code) { if (code->sinfo_size() > 0) { Object** p = StackSlotEntriesAddr(code); Index: src/scopes.cc =================================================================== --- src/scopes.cc (revision 1226) +++ src/scopes.cc (working copy) @@ -324,11 +324,6 @@ } -bool Scope::SupportsEval() const { - return scope_calls_eval_ || inner_scope_calls_eval_; -} - - bool Scope::AllowsLazyCompilation() const { return !force_eager_compilation_ && HasTrivialOuterContext(); } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
