Add three string constants from parser to the root-set.
R=ulan@chromium.org Review URL: https://codereview.chromium.org/62143002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
1d835561ac
commit
3e9786ef24
@ -5414,7 +5414,7 @@ class Internals {
|
||||
static const int kNullValueRootIndex = 7;
|
||||
static const int kTrueValueRootIndex = 8;
|
||||
static const int kFalseValueRootIndex = 9;
|
||||
static const int kEmptyStringRootIndex = 132;
|
||||
static const int kEmptyStringRootIndex = 134;
|
||||
|
||||
static const int kNodeClassIdOffset = 1 * kApiPointerSize;
|
||||
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
|
||||
|
@ -62,7 +62,7 @@ void FuncNameInferrer::PushLiteralName(Handle<String> name) {
|
||||
|
||||
|
||||
void FuncNameInferrer::PushVariableName(Handle<String> name) {
|
||||
if (IsOpen() && !isolate()->heap()->result_string()->Equals(*name)) {
|
||||
if (IsOpen() && !isolate()->heap()->dot_result_string()->Equals(*name)) {
|
||||
names_stack_.Add(Name(name, kVariableName), zone());
|
||||
}
|
||||
}
|
||||
|
@ -209,8 +209,10 @@ namespace internal {
|
||||
V(Boolean_string, "Boolean") \
|
||||
V(callee_string, "callee") \
|
||||
V(constructor_string, "constructor") \
|
||||
V(result_string, ".result") \
|
||||
V(dot_result_string, ".result") \
|
||||
V(dot_for_string, ".for.") \
|
||||
V(dot_iterator_string, ".iterator") \
|
||||
V(dot_generator_object_string, ".generator_object") \
|
||||
V(eval_string, "eval") \
|
||||
V(empty_string, "") \
|
||||
V(function_string, "function") \
|
||||
|
@ -2623,13 +2623,10 @@ void Parser::InitializeForEachStatement(ForEachStatement* stmt,
|
||||
|
||||
if (for_of != NULL) {
|
||||
Factory* heap_factory = isolate()->factory();
|
||||
Handle<String> iterator_str = heap_factory->InternalizeOneByteString(
|
||||
STATIC_ASCII_VECTOR(".iterator"));
|
||||
Handle<String> result_str = heap_factory->InternalizeOneByteString(
|
||||
STATIC_ASCII_VECTOR(".result"));
|
||||
Variable* iterator =
|
||||
top_scope_->DeclarationScope()->NewTemporary(iterator_str);
|
||||
Variable* result = top_scope_->DeclarationScope()->NewTemporary(result_str);
|
||||
Variable* iterator = top_scope_->DeclarationScope()->NewTemporary(
|
||||
heap_factory->dot_iterator_string());
|
||||
Variable* result = top_scope_->DeclarationScope()->NewTemporary(
|
||||
heap_factory->dot_result_string());
|
||||
|
||||
Expression* assign_iterator;
|
||||
Expression* next_result;
|
||||
@ -4252,9 +4249,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
|
||||
// in a temporary variable, a definition that is used by "yield"
|
||||
// expressions. Presence of a variable for the generator object in the
|
||||
// FunctionState indicates that this function is a generator.
|
||||
Handle<String> tempname = isolate()->factory()->InternalizeOneByteString(
|
||||
STATIC_ASCII_VECTOR(".generator_object"));
|
||||
Variable* temp = top_scope_->DeclarationScope()->NewTemporary(tempname);
|
||||
Variable* temp = top_scope_->DeclarationScope()->NewTemporary(
|
||||
isolate()->factory()->dot_generator_object_string());
|
||||
function_state.set_generator_object_variable(temp);
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
|
||||
ZoneList<Statement*>* body = function->body();
|
||||
if (!body->is_empty()) {
|
||||
Variable* result = scope->NewTemporary(
|
||||
info->isolate()->factory()->result_string());
|
||||
info->isolate()->factory()->dot_result_string());
|
||||
Processor processor(result, info->zone());
|
||||
processor.Process(body);
|
||||
if (processor.HasStackOverflow()) return false;
|
||||
|
@ -1302,7 +1302,7 @@ void Scope::AllocateParameterLocals() {
|
||||
|
||||
void Scope::AllocateNonParameterLocal(Variable* var) {
|
||||
ASSERT(var->scope() == this);
|
||||
ASSERT(!var->IsVariable(isolate_->factory()->result_string()) ||
|
||||
ASSERT(!var->IsVariable(isolate_->factory()->dot_result_string()) ||
|
||||
!var->IsStackLocal());
|
||||
if (var->IsUnallocated() && MustAllocate(var)) {
|
||||
if (MustAllocateInContext(var)) {
|
||||
|
Loading…
Reference in New Issue
Block a user