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

Unified Diff: src/ast-value-factory.cc

Issue 685393002: Do not embed array objects in unoptimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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
« no previous file with comments | « src/ast-value-factory.h ('k') | src/messages.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-value-factory.cc
diff --git a/src/ast-value-factory.cc b/src/ast-value-factory.cc
index 0a1949a69cc2b05756aa1939e1d947ebffae2b12..895ce39f652845fa83674d61ec98b0c9b8f1b5e1 100644
--- a/src/ast-value-factory.cc
+++ b/src/ast-value-factory.cc
@@ -159,9 +159,6 @@ bool AstValue::BooleanValue() const {
return DoubleToBoolean(number_);
case SMI:
return smi_ != 0;
- case STRING_ARRAY:
- UNREACHABLE();
- break;
case BOOLEAN:
return bool_;
case NULL_TYPE:
@@ -202,22 +199,6 @@ void AstValue::Internalize(Isolate* isolate) {
value_ = isolate->factory()->false_value();
}
break;
- case STRING_ARRAY: {
- DCHECK(strings_ != NULL);
- Factory* factory = isolate->factory();
- int len = strings_->length();
- Handle<FixedArray> elements = factory->NewFixedArray(len, TENURED);
- for (int i = 0; i < len; i++) {
- const AstRawString* string = (*strings_)[i];
- Handle<Object> element = string->string();
- // Strings are already internalized.
- DCHECK(!element.is_null());
- elements->set(i, *element);
- }
- value_ =
- factory->NewJSArrayWithElements(elements, FAST_ELEMENTS, TENURED);
- break;
- }
case NULL_TYPE:
value_ = isolate->factory()->null_value();
break;
@@ -350,17 +331,6 @@ const AstValue* AstValueFactory::NewBoolean(bool b) {
}
-const AstValue* AstValueFactory::NewStringList(
- ZoneList<const AstRawString*>* strings) {
- AstValue* value = new (zone_) AstValue(strings);
- if (isolate_) {
- value->Internalize(isolate_);
- }
- values_.Add(value);
- return value;
-}
-
-
const AstValue* AstValueFactory::NewNull() {
GENERATE_VALUE_GETTER(null_value_, AstValue::NULL_TYPE);
}
« no previous file with comments | « src/ast-value-factory.h ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698