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

Unified Diff: src/parser.cc

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/parser.h ('k') | src/preparse-data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 75bfbe25ab84611b2a14a95be4f098cd17073728..ffc68f4f1efb970fc2a88b86af7f4f7f38a9a2fb 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -807,8 +807,9 @@ Literal* ParserTraits::ExpressionFromLiteral(Token::Value token, int pos,
return factory->NewSmiLiteral(value, pos);
}
case Token::NUMBER: {
+ bool is_float = scanner->IsFloat();
double value = scanner->DoubleValue();
- return factory->NewNumberLiteral(value, pos);
+ return factory->NewNumberLiteral(value, pos, is_float);
}
default:
DCHECK(false);
@@ -1161,6 +1162,7 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info,
is_strict(info->language_mode()));
DCHECK(info->language_mode() == shared_info->language_mode());
scope->SetLanguageMode(shared_info->language_mode());
+ scope->SetAsmMode(shared_info->asm_mode());
FunctionLiteral::FunctionType function_type = shared_info->is_expression()
? (shared_info->is_anonymous()
? FunctionLiteral::ANONYMOUS_EXPRESSION
@@ -1326,6 +1328,7 @@ void* Parser::ParseStatementList(ZoneList<Statement*>* body, int end_token,
// incremented after parsing is done.
++use_counts_[v8::Isolate::kUseAsm];
scope_->SetAsmModule();
+ scope_->SetAsmMode(ASM_MODULE);
}
} else {
// End of the directive prologue.
@@ -4151,6 +4154,7 @@ void Parser::SkipLazyFunctionBody(int* materialized_literal_count,
int body_end = scanner()->location().end_pos;
log_->LogFunction(function_block_pos, body_end, *materialized_literal_count,
*expected_property_count, scope_->language_mode(),
+ scope_->asm_mode(),
scope_->uses_super_property(), scope_->calls_eval());
}
}
« no previous file with comments | « src/parser.h ('k') | src/preparse-data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698