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

Side by Side Diff: src/parser.cc

Issue 1319893004: Remove builtin/runtime name clash presubmit check. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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
« no previous file with comments | « PRESUBMIT.py ('k') | src/runtime.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 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after
4732 4732
4733 if (extension_ != NULL) { 4733 if (extension_ != NULL) {
4734 // The extension structures are only accessible while parsing the 4734 // The extension structures are only accessible while parsing the
4735 // very first time not when reparsing because of lazy compilation. 4735 // very first time not when reparsing because of lazy compilation.
4736 scope_->DeclarationScope()->ForceEagerCompilation(); 4736 scope_->DeclarationScope()->ForceEagerCompilation();
4737 } 4737 }
4738 4738
4739 const Runtime::Function* function = Runtime::FunctionForName(name->string()); 4739 const Runtime::Function* function = Runtime::FunctionForName(name->string());
4740 4740
4741 if (function != NULL) { 4741 if (function != NULL) {
4742 // Check for possible name clash.
4743 DCHECK_EQ(Context::kNotFound,
4744 Context::IntrinsicIndexForName(name->string()));
4742 // Check for built-in IS_VAR macro. 4745 // Check for built-in IS_VAR macro.
4743 if (function->function_id == Runtime::kIS_VAR) { 4746 if (function->function_id == Runtime::kIS_VAR) {
4744 DCHECK_EQ(Runtime::RUNTIME, function->intrinsic_type); 4747 DCHECK_EQ(Runtime::RUNTIME, function->intrinsic_type);
4745 // %IS_VAR(x) evaluates to x if x is a variable, 4748 // %IS_VAR(x) evaluates to x if x is a variable,
4746 // leads to a parse error otherwise. Could be implemented as an 4749 // leads to a parse error otherwise. Could be implemented as an
4747 // inline function %_IS_VAR(x) to eliminate this special case. 4750 // inline function %_IS_VAR(x) to eliminate this special case.
4748 if (args->length() == 1 && args->at(0)->AsVariableProxy() != NULL) { 4751 if (args->length() == 1 && args->at(0)->AsVariableProxy() != NULL) {
4749 return args->at(0); 4752 return args->at(0);
4750 } else { 4753 } else {
4751 ReportMessage(MessageTemplate::kNotIsvar); 4754 ReportMessage(MessageTemplate::kNotIsvar);
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
6103 6106
6104 Expression* Parser::SpreadCallNew(Expression* function, 6107 Expression* Parser::SpreadCallNew(Expression* function,
6105 ZoneList<v8::internal::Expression*>* args, 6108 ZoneList<v8::internal::Expression*>* args,
6106 int pos) { 6109 int pos) {
6107 args->InsertAt(0, function, zone()); 6110 args->InsertAt(0, function, zone());
6108 6111
6109 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6112 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6110 } 6113 }
6111 } // namespace internal 6114 } // namespace internal
6112 } // namespace v8 6115 } // namespace v8
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698