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

Side by Side Diff: src/preparser.h

Issue 883073008: Accessor functions should have no prototype property (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use bitshift Created 5 years, 10 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/ppc/full-codegen-ppc.cc ('k') | src/x64/full-codegen-x64.cc » ('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 #ifndef V8_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 2187
2188 if (!*is_computed_name) { 2188 if (!*is_computed_name) {
2189 checker->CheckProperty(name_token, kAccessorProperty, is_static, 2189 checker->CheckProperty(name_token, kAccessorProperty, is_static,
2190 is_generator, 2190 is_generator,
2191 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); 2191 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty));
2192 } 2192 }
2193 2193
2194 typename Traits::Type::FunctionLiteral value = this->ParseFunctionLiteral( 2194 typename Traits::Type::FunctionLiteral value = this->ParseFunctionLiteral(
2195 name, scanner()->location(), 2195 name, scanner()->location(),
2196 false, // reserved words are allowed here 2196 false, // reserved words are allowed here
2197 FunctionKind::kNormalFunction, RelocInfo::kNoPosition, 2197 FunctionKind::kAccessorFunction, RelocInfo::kNoPosition,
2198 FunctionLiteral::ANONYMOUS_EXPRESSION, 2198 FunctionLiteral::ANONYMOUS_EXPRESSION,
2199 is_get ? FunctionLiteral::GETTER_ARITY : FunctionLiteral::SETTER_ARITY, 2199 is_get ? FunctionLiteral::GETTER_ARITY : FunctionLiteral::SETTER_ARITY,
2200 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty)); 2200 CHECK_OK_CUSTOM(EmptyObjectLiteralProperty));
2201 2201
2202 // Make sure the name expression is a string since we need a Name for 2202 // Make sure the name expression is a string since we need a Name for
2203 // Runtime_DefineAccessorPropertyUnchecked and since we can determine this 2203 // Runtime_DefineAccessorPropertyUnchecked and since we can determine this
2204 // statically we can skip the extra runtime check. 2204 // statically we can skip the extra runtime check.
2205 if (!*is_computed_name) { 2205 if (!*is_computed_name) {
2206 name_expression = 2206 name_expression =
2207 factory()->NewStringLiteral(name, name_expression->position()); 2207 factory()->NewStringLiteral(name, name_expression->position());
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 *ok = false; 3097 *ok = false;
3098 return; 3098 return;
3099 } 3099 }
3100 has_seen_constructor_ = true; 3100 has_seen_constructor_ = true;
3101 return; 3101 return;
3102 } 3102 }
3103 } 3103 }
3104 } } // v8::internal 3104 } } // v8::internal
3105 3105
3106 #endif // V8_PREPARSER_H 3106 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698