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

Side by Side Diff: src/variables.cc

Issue 147075: Allocate arguments object on-demand instead of at function entry.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 Slot* Variable::slot() const { 134 Slot* Variable::slot() const {
135 return rewrite_ != NULL ? rewrite_->AsSlot() : NULL; 135 return rewrite_ != NULL ? rewrite_->AsSlot() : NULL;
136 } 136 }
137 137
138 138
139 Variable::Variable(Scope* scope, 139 Variable::Variable(Scope* scope,
140 Handle<String> name, 140 Handle<String> name,
141 Mode mode, 141 Mode mode,
142 bool is_valid_LHS, 142 bool is_valid_LHS,
143 bool is_this) 143 Kind kind)
144 : scope_(scope), 144 : scope_(scope),
145 name_(name), 145 name_(name),
146 mode_(mode), 146 mode_(mode),
147 is_valid_LHS_(is_valid_LHS), 147 is_valid_LHS_(is_valid_LHS),
148 is_this_(is_this), 148 kind_(kind),
149 local_if_not_shadowed_(NULL), 149 local_if_not_shadowed_(NULL),
150 is_accessed_from_inner_scope_(false), 150 is_accessed_from_inner_scope_(false),
151 rewrite_(NULL) { 151 rewrite_(NULL) {
152 // names must be canonicalized for fast equality checks 152 // names must be canonicalized for fast equality checks
153 ASSERT(name->IsSymbol()); 153 ASSERT(name->IsSymbol());
154 } 154 }
155 155
156 156
157 bool Variable::is_global() const { 157 bool Variable::is_global() const {
158 // Temporaries are never global, they must always be allocated in the 158 // Temporaries are never global, they must always be allocated in the
159 // activation frame. 159 // activation frame.
160 return mode_ != TEMPORARY && scope_ != NULL && scope_->is_global_scope(); 160 return mode_ != TEMPORARY && scope_ != NULL && scope_->is_global_scope();
161 } 161 }
162 162
163 } } // namespace v8::internal 163 } } // namespace v8::internal
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/variables.h ('k') | test/mjsunit/arguments-apply.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698