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

Unified Diff: runtime/vm/scopes.cc

Issue 10915022: Implement argument definition test in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/scopes.cc
===================================================================
--- runtime/vm/scopes.cc (revision 11663)
+++ runtime/vm/scopes.cc (working copy)
@@ -12,11 +12,6 @@
namespace dart {
-const char* SourceLabel::kDefaultLabelName = ":L";
-
-const char* LocalVariable::kSavedContextVarName = ":saved_entry_context_var";
-
-
int SourceLabel::FunctionLevel() const {
ASSERT(owner() != NULL);
return owner()->function_level();
@@ -233,7 +228,7 @@
(!parent()->HasContextLevel()) ||
(parent()->context_level() != context_level()))) {
// This is the outermost scope with a context level or this scope's
- // context level differes from its parent's level.
+ // context level differs from its parent's level.
VarDesc desc;
desc.name = &String::Handle(); // No name.
desc.info.kind = RawLocalVarDescriptors::kContextLevel;
@@ -263,7 +258,8 @@
desc.info.end_pos = var->owner()->end_token_pos();
desc.info.index = var->index();
vars->Add(desc);
- } else if (var->name().Equals(LocalVariable::kSavedContextVarName)) {
+ } else if (var->name().Equals(
+ Symbols::Name(Symbols::kSavedEntryContextVar))) {
hausner 2012/08/31 00:34:55 Isn't it enough to just allocate a string handle f
regis 2012/08/31 01:36:18 Yes, but it seems like a waste to allocate all the
hausner 2012/08/31 05:56:26 Ok, that's a valid reason that I buy. I hope Equal
// This is the local variable in which the function saves the
// caller's chain of closure contexts (caller's CTX register).
VarDesc desc;
@@ -275,6 +271,7 @@
desc.info.index = var->index();
vars->Add(desc);
}
+ // The saved arguments descriptor variable is not currently collected.
}
}
LocalScope* child = this->child();

Powered by Google App Engine
This is Rietveld 408576698