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

Side by Side Diff: src/parser.cc

Issue 1094563002: Wrap map and set implementation in functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/mirror-debugger.js ('k') | src/promise.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/v8.h" 5 #include "src/v8.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/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 5587 matching lines...) Expand 10 before | Expand all | Expand 10 after
5598 Token::ADD, expr, middle, expr->position()), 5598 Token::ADD, expr, middle, expr->position()),
5599 cooked_str, sub->position()); 5599 cooked_str, sub->position());
5600 } 5600 }
5601 return expr; 5601 return expr;
5602 } else { 5602 } else {
5603 uint32_t hash = ComputeTemplateLiteralHash(lit); 5603 uint32_t hash = ComputeTemplateLiteralHash(lit);
5604 5604
5605 int cooked_idx = function_state_->NextMaterializedLiteralIndex(); 5605 int cooked_idx = function_state_->NextMaterializedLiteralIndex();
5606 int raw_idx = function_state_->NextMaterializedLiteralIndex(); 5606 int raw_idx = function_state_->NextMaterializedLiteralIndex();
5607 5607
5608 // GetTemplateCallSite 5608 // $getTemplateCallSite
5609 ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(4, zone()); 5609 ZoneList<Expression*>* args = new (zone()) ZoneList<Expression*>(4, zone());
5610 args->Add(factory()->NewArrayLiteral( 5610 args->Add(factory()->NewArrayLiteral(
5611 const_cast<ZoneList<Expression*>*>(cooked_strings), 5611 const_cast<ZoneList<Expression*>*>(cooked_strings),
5612 cooked_idx, pos), 5612 cooked_idx, pos),
5613 zone()); 5613 zone());
5614 args->Add( 5614 args->Add(
5615 factory()->NewArrayLiteral( 5615 factory()->NewArrayLiteral(
5616 const_cast<ZoneList<Expression*>*>(raw_strings), raw_idx, pos), 5616 const_cast<ZoneList<Expression*>*>(raw_strings), raw_idx, pos),
5617 zone()); 5617 zone());
5618 5618
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
5773 5773
5774 Expression* Parser::SpreadCallNew(Expression* function, 5774 Expression* Parser::SpreadCallNew(Expression* function,
5775 ZoneList<v8::internal::Expression*>* args, 5775 ZoneList<v8::internal::Expression*>* args,
5776 int pos) { 5776 int pos) {
5777 args->InsertAt(0, function, zone()); 5777 args->InsertAt(0, function, zone());
5778 5778
5779 return factory()->NewCallRuntime( 5779 return factory()->NewCallRuntime(
5780 ast_value_factory()->reflect_construct_string(), NULL, args, pos); 5780 ast_value_factory()->reflect_construct_string(), NULL, args, pos);
5781 } 5781 }
5782 } } // namespace v8::internal 5782 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mirror-debugger.js ('k') | src/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698