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

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: 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
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 5900 matching lines...) Expand 10 before | Expand all | Expand 10 after
5911 Expression* expr = cooked_strings->at(0); 5911 Expression* expr = cooked_strings->at(0);
5912 int i = 0; 5912 int i = 0;
5913 while (i < expressions->length()) { 5913 while (i < expressions->length()) {
5914 Expression* sub = expressions->at(i++); 5914 Expression* sub = expressions->at(i++);
5915 Expression* cooked_str = cooked_strings->at(i); 5915 Expression* cooked_str = cooked_strings->at(i);
5916 5916
5917 // Let middle be ToString(sub). 5917 // Let middle be ToString(sub).
5918 ZoneList<Expression*>* args = 5918 ZoneList<Expression*>* args =
5919 new (zone()) ZoneList<Expression*>(1, zone()); 5919 new (zone()) ZoneList<Expression*>(1, zone());
5920 args->Add(sub, zone()); 5920 args->Add(sub, zone());
5921 Expression* middle = factory()->NewCallRuntime( 5921 Expression* middle = factory()->NewCallRuntime(Runtime::kInlineToString,
5922 Context::TO_STRING_FUN_INDEX, args, sub->position()); 5922 args, sub->position());
5923 5923
5924 expr = factory()->NewBinaryOperation( 5924 expr = factory()->NewBinaryOperation(
5925 Token::ADD, factory()->NewBinaryOperation( 5925 Token::ADD, factory()->NewBinaryOperation(
5926 Token::ADD, expr, middle, expr->position()), 5926 Token::ADD, expr, middle, expr->position()),
5927 cooked_str, sub->position()); 5927 cooked_str, sub->position());
5928 } 5928 }
5929 return expr; 5929 return expr;
5930 } else { 5930 } else {
5931 uint32_t hash = ComputeTemplateLiteralHash(lit); 5931 uint32_t hash = ComputeTemplateLiteralHash(lit);
5932 5932
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
6106 6106
6107 Expression* Parser::SpreadCallNew(Expression* function, 6107 Expression* Parser::SpreadCallNew(Expression* function,
6108 ZoneList<v8::internal::Expression*>* args, 6108 ZoneList<v8::internal::Expression*>* args,
6109 int pos) { 6109 int pos) {
6110 args->InsertAt(0, function, zone()); 6110 args->InsertAt(0, function, zone());
6111 6111
6112 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6112 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6113 } 6113 }
6114 } // namespace internal 6114 } // namespace internal
6115 } // namespace v8 6115 } // namespace v8
OLDNEW
« no previous file with comments | « src/macros.py ('k') | src/runtime.js » ('j') | test/mjsunit/compiler/jsnatives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698