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

Side by Side Diff: src/parsing/parser.cc

Issue 2158343002: Fix: Don't use Isolate during scope resolution. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: (streamlined the rebase) Created 4 years, 5 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/parsing/parser.h ('k') | no next file » | 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/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 body = new (zone()) ZoneList<Statement*>(call_super ? 2 : 1, zone()); 226 body = new (zone()) ZoneList<Statement*>(call_super ? 2 : 1, zone());
227 if (call_super) { 227 if (call_super) {
228 // $super_constructor = %_GetSuperConstructor(<this-function>) 228 // $super_constructor = %_GetSuperConstructor(<this-function>)
229 // %reflect_construct( 229 // %reflect_construct(
230 // $super_constructor, InternalArray(...args), new.target) 230 // $super_constructor, InternalArray(...args), new.target)
231 auto constructor_args_name = ast_value_factory()->empty_string(); 231 auto constructor_args_name = ast_value_factory()->empty_string();
232 bool is_duplicate; 232 bool is_duplicate;
233 bool is_rest = true; 233 bool is_rest = true;
234 bool is_optional = false; 234 bool is_optional = false;
235 Variable* constructor_args = 235 Variable* constructor_args = function_scope->DeclareParameter(
236 function_scope->DeclareParameter(constructor_args_name, TEMPORARY, 236 constructor_args_name, TEMPORARY, is_optional, is_rest, &is_duplicate,
237 is_optional, is_rest, &is_duplicate); 237 ast_value_factory());
238 238
239 ZoneList<Expression*>* args = 239 ZoneList<Expression*>* args =
240 new (zone()) ZoneList<Expression*>(2, zone()); 240 new (zone()) ZoneList<Expression*>(2, zone());
241 VariableProxy* this_function_proxy = this->scope()->NewUnresolved( 241 VariableProxy* this_function_proxy = this->scope()->NewUnresolved(
242 factory(), ast_value_factory()->this_function_string(), 242 factory(), ast_value_factory()->this_function_string(),
243 Variable::NORMAL, pos); 243 Variable::NORMAL, pos);
244 ZoneList<Expression*>* tmp = 244 ZoneList<Expression*>* tmp =
245 new (zone()) ZoneList<Expression*>(1, zone()); 245 new (zone()) ZoneList<Expression*>(1, zone());
246 tmp->Add(this_function_proxy, zone()); 246 tmp->Add(this_function_proxy, zone());
247 Expression* super_constructor = factory()->NewCallRuntime( 247 Expression* super_constructor = factory()->NewCallRuntime(
(...skipping 6826 matching lines...) Expand 10 before | Expand all | Expand 10 after
7074 node->Print(Isolate::Current()); 7074 node->Print(Isolate::Current());
7075 } 7075 }
7076 #endif // DEBUG 7076 #endif // DEBUG
7077 7077
7078 #undef CHECK_OK 7078 #undef CHECK_OK
7079 #undef CHECK_OK_VOID 7079 #undef CHECK_OK_VOID
7080 #undef CHECK_FAILED 7080 #undef CHECK_FAILED
7081 7081
7082 } // namespace internal 7082 } // namespace internal
7083 } // namespace v8 7083 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698