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

Unified Diff: src/parsing/parser.cc

Issue 1479293002: Rename %_IsSpecObject to %_IsJSReceiver. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parser.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index c4f481083ceb6347941355933020480481e21027..968c78e205df01e0dc581008535d60760dbbb781 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2854,7 +2854,7 @@ Statement* Parser::ParseReturnStatement(bool* ok) {
// Is rewritten as:
//
// return (temp = expr) === undefined ? this :
- // %_IsSpecObject(temp) ? temp : throw new TypeError(...);
+ // %_IsJSReceiver(temp) ? temp : throw new TypeError(...);
Variable* temp = scope_->NewTemporary(
ast_value_factory()->empty_string());
Assignment* assign = factory()->NewAssignment(
@@ -2864,14 +2864,14 @@ Statement* Parser::ParseReturnStatement(bool* ok) {
NewThrowTypeError(MessageTemplate::kDerivedConstructorReturn,
ast_value_factory()->empty_string(), pos);
- // %_IsSpecObject(temp)
+ // %_IsJSReceiver(temp)
ZoneList<Expression*>* is_spec_object_args =
new (zone()) ZoneList<Expression*>(1, zone());
is_spec_object_args->Add(factory()->NewVariableProxy(temp), zone());
Expression* is_spec_object_call = factory()->NewCallRuntime(
- Runtime::kInlineIsSpecObject, is_spec_object_args, pos);
+ Runtime::kInlineIsJSReceiver, is_spec_object_args, pos);
- // %_IsSpecObject(temp) ? temp : throw_expression
+ // %_IsJSReceiver(temp) ? temp : throw_expression
Expression* is_object_conditional = factory()->NewConditional(
is_spec_object_call, factory()->NewVariableProxy(temp),
throw_expression, pos);
@@ -3281,7 +3281,7 @@ WhileStatement* Parser::ParseWhileStatement(
}
-// !%_IsSpecObject(result = iterator.next()) &&
+// !%_IsJSReceiver(result = iterator.next()) &&
// %ThrowIteratorResultNotAnObject(result)
Expression* Parser::BuildIteratorNextResult(Expression* iterator,
Variable* result, int pos) {
@@ -3297,12 +3297,12 @@ Expression* Parser::BuildIteratorNextResult(Expression* iterator,
Expression* left =
factory()->NewAssignment(Token::ASSIGN, result_proxy, next_call, pos);
- // %_IsSpecObject(...)
+ // %_IsJSReceiver(...)
ZoneList<Expression*>* is_spec_object_args =
new (zone()) ZoneList<Expression*>(1, zone());
is_spec_object_args->Add(left, zone());
Expression* is_spec_object_call = factory()->NewCallRuntime(
- Runtime::kInlineIsSpecObject, is_spec_object_args, pos);
+ Runtime::kInlineIsJSReceiver, is_spec_object_args, pos);
// %ThrowIteratorResultNotAnObject(result)
Expression* result_proxy_again = factory()->NewVariableProxy(result);
@@ -3341,7 +3341,7 @@ void Parser::InitializeForEachStatement(ForEachStatement* stmt,
Token::ASSIGN, factory()->NewVariableProxy(iterator),
GetIterator(subject, factory()), subject->position());
- // !%_IsSpecObject(result = iterator.next()) &&
+ // !%_IsJSReceiver(result = iterator.next()) &&
// %ThrowIteratorResultNotAnObject(result)
{
// result = iterator.next()
« no previous file with comments | « src/parsing/parser.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698