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

Side by Side Diff: src/scopes.h

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 29 matching lines...) Expand all
40 public: 40 public:
41 LocalsMap(); 41 LocalsMap();
42 42
43 // Dummy constructor. This constructor doesn't set up the map 43 // Dummy constructor. This constructor doesn't set up the map
44 // properly so don't use it unless you have a good reason. 44 // properly so don't use it unless you have a good reason.
45 explicit LocalsMap(bool gotta_love_static_overloading); 45 explicit LocalsMap(bool gotta_love_static_overloading);
46 46
47 virtual ~LocalsMap(); 47 virtual ~LocalsMap();
48 48
49 Variable* Declare(Scope* scope, Handle<String> name, Variable::Mode mode, 49 Variable* Declare(Scope* scope, Handle<String> name, Variable::Mode mode,
50 bool is_valid_LHS, bool is_this); 50 bool is_valid_LHS, Variable::Kind kind);
51 51
52 Variable* Lookup(Handle<String> name); 52 Variable* Lookup(Handle<String> name);
53 }; 53 };
54 54
55 55
56 // The dynamic scope part holds hash maps for the variables that will 56 // The dynamic scope part holds hash maps for the variables that will
57 // be looked up dynamically from within eval and with scopes. The objects 57 // be looked up dynamically from within eval and with scopes. The objects
58 // are allocated on-demand from Scope::NonLocal to avoid wasting memory 58 // are allocated on-demand from Scope::NonLocal to avoid wasting memory
59 // and setup time for scopes that don't need them. 59 // and setup time for scopes that don't need them.
60 class DynamicScopePart : public ZoneObject { 60 class DynamicScopePart : public ZoneObject {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with) { 374 virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with) {
375 return NULL; 375 return NULL;
376 } 376 }
377 virtual VariableProxy* NewTemporary(Handle<String> name) { return NULL; } 377 virtual VariableProxy* NewTemporary(Handle<String> name) { return NULL; }
378 }; 378 };
379 379
380 380
381 } } // namespace v8::internal 381 } } // namespace v8::internal
382 382
383 #endif // V8_SCOPES_H_ 383 #endif // V8_SCOPES_H_
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « src/runtime.js ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698