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

Side by Side Diff: src/ast-value-factory.cc

Issue 722723002: Move public symbols to the root set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « src/api.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 176
177 void AstValue::Internalize(Isolate* isolate) { 177 void AstValue::Internalize(Isolate* isolate) {
178 switch (type_) { 178 switch (type_) {
179 case STRING: 179 case STRING:
180 DCHECK(string_ != NULL); 180 DCHECK(string_ != NULL);
181 // Strings are already internalized. 181 // Strings are already internalized.
182 DCHECK(!string_->string().is_null()); 182 DCHECK(!string_->string().is_null());
183 break; 183 break;
184 case SYMBOL: 184 case SYMBOL:
185 value_ = Object::GetProperty( 185 DCHECK_EQ(0, strcmp(symbol_name_, "iterator_symbol"));
186 isolate, handle(isolate->native_context()->builtins()), 186 value_ = isolate->factory()->iterator_symbol();
187 symbol_name_).ToHandleChecked();
188 break; 187 break;
189 case NUMBER: 188 case NUMBER:
190 value_ = isolate->factory()->NewNumber(number_, TENURED); 189 value_ = isolate->factory()->NewNumber(number_, TENURED);
191 break; 190 break;
192 case SMI: 191 case SMI:
193 value_ = handle(Smi::FromInt(smi_), isolate); 192 value_ = handle(Smi::FromInt(smi_), isolate);
194 break; 193 break;
195 case BOOLEAN: 194 case BOOLEAN:
196 if (bool_) { 195 if (bool_) {
197 value_ = isolate->factory()->true_value(); 196 value_ = isolate->factory()->true_value();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (isolate_) { 378 if (isolate_) {
380 new_string->Internalize(isolate_); 379 new_string->Internalize(isolate_);
381 } 380 }
382 entry->value = reinterpret_cast<void*>(1); 381 entry->value = reinterpret_cast<void*>(1);
383 } 382 }
384 return reinterpret_cast<AstRawString*>(entry->key); 383 return reinterpret_cast<AstRawString*>(entry->key);
385 } 384 }
386 385
387 386
388 } } // namespace v8::internal 387 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698