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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 300103005: Split StringLiteral from Literal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: number literals Created 6 years, 7 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/typing.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 97c9c5cdebc0ef9b35bd9293a7f49ec090491a11..ac823ce72209062d8175cc259a402d01fb9a01e6 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -2253,7 +2253,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
- Literal* key = prop->key()->AsLiteral();
+ Literal* key = prop->key()->AsStringLiteral();
__ Move(rcx, key->value());
CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
}
@@ -2365,7 +2365,7 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) {
VisitForAccumulatorValue(prop->obj());
__ movp(rdx, rax);
__ Pop(rax); // Restore value.
- __ Move(rcx, prop->key()->AsLiteral()->value());
+ __ Move(rcx, prop->key()->AsStringLiteral()->value());
CallStoreIC();
break;
}
@@ -2477,11 +2477,11 @@ void FullCodeGenerator::EmitNamedPropertyAssignment(Assignment* expr) {
// Assignment to a property, using a named store IC.
Property* prop = expr->target()->AsProperty();
ASSERT(prop != NULL);
- ASSERT(prop->key()->AsLiteral() != NULL);
+ ASSERT(prop->key()->AsStringLiteral() != NULL);
// Record source code position before IC call.
SetSourcePosition(expr->position());
- __ Move(rcx, prop->key()->AsLiteral()->value());
+ __ Move(rcx, prop->key()->AsStringLiteral()->value());
__ Pop(rdx);
CallStoreIC(expr->AssignmentFeedbackId());
@@ -3294,8 +3294,8 @@ void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT(args->length() == 2);
- ASSERT_NE(NULL, args->at(1)->AsLiteral());
- Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value()));
+ ASSERT_NE(NULL, args->at(1)->AsNumberLiteral());
+ Smi* index = Smi::cast(*(args->at(1)->AsNumberLiteral()->value()));
VisitForAccumulatorValue(args->at(0)); // Load the object.
@@ -3646,8 +3646,8 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
ZoneList<Expression*>* args = expr->arguments();
ASSERT_EQ(2, args->length());
- ASSERT_NE(NULL, args->at(0)->AsLiteral());
- int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value();
+ ASSERT_NE(NULL, args->at(0)->AsNumberLiteral());
+ int cache_id = Smi::cast(*(args->at(0)->AsNumberLiteral()->value()))->value();
Handle<FixedArray> jsfunction_result_caches(
isolate()->native_context()->jsfunction_result_caches());
@@ -4338,7 +4338,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
}
break;
case NAMED_PROPERTY: {
- __ Move(rcx, prop->key()->AsLiteral()->value());
+ __ Move(rcx, prop->key()->AsStringLiteral()->value());
__ Pop(rdx);
CallStoreIC(expr->CountStoreFeedbackId());
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
« no previous file with comments | « src/typing.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698