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

Side by Side Diff: src/parser.cc

Issue 1323543002: [runtime] Replace %to_string_fun with %_ToString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ToStringStub
Patch Set: REBASE. Fixes Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/messages.js ('k') | src/proxy.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/parser.h" 5 #include "src/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/ast-literal-reindexer.h" 9 #include "src/ast-literal-reindexer.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 6084 matching lines...) Expand 10 before | Expand all | Expand 10 after
6095 Expression* expr = cooked_strings->at(0); 6095 Expression* expr = cooked_strings->at(0);
6096 int i = 0; 6096 int i = 0;
6097 while (i < expressions->length()) { 6097 while (i < expressions->length()) {
6098 Expression* sub = expressions->at(i++); 6098 Expression* sub = expressions->at(i++);
6099 Expression* cooked_str = cooked_strings->at(i); 6099 Expression* cooked_str = cooked_strings->at(i);
6100 6100
6101 // Let middle be ToString(sub). 6101 // Let middle be ToString(sub).
6102 ZoneList<Expression*>* args = 6102 ZoneList<Expression*>* args =
6103 new (zone()) ZoneList<Expression*>(1, zone()); 6103 new (zone()) ZoneList<Expression*>(1, zone());
6104 args->Add(sub, zone()); 6104 args->Add(sub, zone());
6105 Expression* middle = factory()->NewCallRuntime( 6105 Expression* middle = factory()->NewCallRuntime(Runtime::kInlineToString,
6106 Context::TO_STRING_FUN_INDEX, args, sub->position()); 6106 args, sub->position());
6107 6107
6108 expr = factory()->NewBinaryOperation( 6108 expr = factory()->NewBinaryOperation(
6109 Token::ADD, factory()->NewBinaryOperation( 6109 Token::ADD, factory()->NewBinaryOperation(
6110 Token::ADD, expr, middle, expr->position()), 6110 Token::ADD, expr, middle, expr->position()),
6111 cooked_str, sub->position()); 6111 cooked_str, sub->position());
6112 } 6112 }
6113 return expr; 6113 return expr;
6114 } else { 6114 } else {
6115 uint32_t hash = ComputeTemplateLiteralHash(lit); 6115 uint32_t hash = ComputeTemplateLiteralHash(lit);
6116 6116
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
6290 6290
6291 Expression* Parser::SpreadCallNew(Expression* function, 6291 Expression* Parser::SpreadCallNew(Expression* function,
6292 ZoneList<v8::internal::Expression*>* args, 6292 ZoneList<v8::internal::Expression*>* args,
6293 int pos) { 6293 int pos) {
6294 args->InsertAt(0, function, zone()); 6294 args->InsertAt(0, function, zone());
6295 6295
6296 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6296 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6297 } 6297 }
6298 } // namespace internal 6298 } // namespace internal
6299 } // namespace v8 6299 } // namespace v8
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698