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

Side by Side Diff: src/parser.cc

Issue 885643004: new classes: assert that constructors are not callable and rewrite 'return;' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bit width 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/parser.h ('k') | src/preparser.h » ('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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 function_scope->SetLanguageMode( 291 function_scope->SetLanguageMode(
292 static_cast<LanguageMode>(scope->language_mode() | STRICT_BIT)); 292 static_cast<LanguageMode>(scope->language_mode() | STRICT_BIT));
293 // Set start and end position to the same value 293 // Set start and end position to the same value
294 function_scope->set_start_position(pos); 294 function_scope->set_start_position(pos);
295 function_scope->set_end_position(pos); 295 function_scope->set_end_position(pos);
296 ZoneList<Statement*>* body = NULL; 296 ZoneList<Statement*>* body = NULL;
297 297
298 { 298 {
299 AstNodeFactory function_factory(ast_value_factory()); 299 AstNodeFactory function_factory(ast_value_factory());
300 FunctionState function_state(&function_state_, &scope_, function_scope, 300 FunctionState function_state(&function_state_, &scope_, function_scope,
301 &function_factory); 301 kDefaultConstructor, &function_factory);
302 302
303 body = new (zone()) ZoneList<Statement*>(1, zone()); 303 body = new (zone()) ZoneList<Statement*>(1, zone());
304 if (call_super) { 304 if (call_super) {
305 ZoneList<Expression*>* args = 305 ZoneList<Expression*>* args =
306 new (zone()) ZoneList<Expression*>(0, zone()); 306 new (zone()) ZoneList<Expression*>(0, zone());
307 CallRuntime* call = factory()->NewCallRuntime( 307 CallRuntime* call = factory()->NewCallRuntime(
308 ast_value_factory()->empty_string(), 308 ast_value_factory()->empty_string(),
309 Runtime::FunctionForId(Runtime::kDefaultConstructorSuperCall), args, 309 Runtime::FunctionForId(Runtime::kDefaultConstructorSuperCall), args,
310 pos); 310 pos);
311 body->Add(factory()->NewExpressionStatement(call, pos), zone()); 311 body->Add(factory()->NewExpressionStatement(call, pos), zone());
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 Mode mode = (FLAG_lazy && allow_lazy()) ? PARSE_LAZILY : PARSE_EAGERLY; 939 Mode mode = (FLAG_lazy && allow_lazy()) ? PARSE_LAZILY : PARSE_EAGERLY;
940 if (allow_natives() || extension_ != NULL || 940 if (allow_natives() || extension_ != NULL ||
941 (*scope)->is_eval_scope()) { 941 (*scope)->is_eval_scope()) {
942 mode = PARSE_EAGERLY; 942 mode = PARSE_EAGERLY;
943 } 943 }
944 ParsingModeScope parsing_mode(this, mode); 944 ParsingModeScope parsing_mode(this, mode);
945 945
946 // Enters 'scope'. 946 // Enters 'scope'.
947 AstNodeFactory function_factory(ast_value_factory()); 947 AstNodeFactory function_factory(ast_value_factory());
948 FunctionState function_state(&function_state_, &scope_, *scope, 948 FunctionState function_state(&function_state_, &scope_, *scope,
949 &function_factory); 949 kNormalFunction, &function_factory);
950 950
951 scope_->SetLanguageMode(info->language_mode()); 951 scope_->SetLanguageMode(info->language_mode());
952 ZoneList<Statement*>* body = new(zone()) ZoneList<Statement*>(16, zone()); 952 ZoneList<Statement*>* body = new(zone()) ZoneList<Statement*>(16, zone());
953 bool ok = true; 953 bool ok = true;
954 int beg_pos = scanner()->location().beg_pos; 954 int beg_pos = scanner()->location().beg_pos;
955 if (info->is_module()) { 955 if (info->is_module()) {
956 DCHECK(allow_harmony_modules()); 956 DCHECK(allow_harmony_modules());
957 Module* module = ParseModule(&ok); 957 Module* module = ParseModule(&ok);
958 if (ok) { 958 if (ok) {
959 // TODO(adamk): Do something with returned Module 959 // TODO(adamk): Do something with returned Module
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 // Parse the function literal. 1059 // Parse the function literal.
1060 Scope* scope = NewScope(scope_, SCRIPT_SCOPE); 1060 Scope* scope = NewScope(scope_, SCRIPT_SCOPE);
1061 info()->SetScriptScope(scope); 1061 info()->SetScriptScope(scope);
1062 if (!info()->closure().is_null()) { 1062 if (!info()->closure().is_null()) {
1063 scope = Scope::DeserializeScopeChain(isolate(), zone(), 1063 scope = Scope::DeserializeScopeChain(isolate(), zone(),
1064 info()->closure()->context(), scope); 1064 info()->closure()->context(), scope);
1065 } 1065 }
1066 original_scope_ = scope; 1066 original_scope_ = scope;
1067 AstNodeFactory function_factory(ast_value_factory()); 1067 AstNodeFactory function_factory(ast_value_factory());
1068 FunctionState function_state(&function_state_, &scope_, scope, 1068 FunctionState function_state(&function_state_, &scope_, scope,
1069 &function_factory); 1069 shared_info->kind(), &function_factory);
1070 DCHECK(is_sloppy(scope->language_mode()) || 1070 DCHECK(is_sloppy(scope->language_mode()) ||
1071 is_strict(info()->language_mode())); 1071 is_strict(info()->language_mode()));
1072 DCHECK(info()->language_mode() == shared_info->language_mode()); 1072 DCHECK(info()->language_mode() == shared_info->language_mode());
1073 scope->SetLanguageMode(shared_info->language_mode()); 1073 scope->SetLanguageMode(shared_info->language_mode());
1074 FunctionLiteral::FunctionType function_type = shared_info->is_expression() 1074 FunctionLiteral::FunctionType function_type = shared_info->is_expression()
1075 ? (shared_info->is_anonymous() 1075 ? (shared_info->is_anonymous()
1076 ? FunctionLiteral::ANONYMOUS_EXPRESSION 1076 ? FunctionLiteral::ANONYMOUS_EXPRESSION
1077 : FunctionLiteral::NAMED_EXPRESSION) 1077 : FunctionLiteral::NAMED_EXPRESSION)
1078 : FunctionLiteral::DECLARATION; 1078 : FunctionLiteral::DECLARATION;
1079 bool ok = true; 1079 bool ok = true;
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2643 Expect(Token::RETURN, CHECK_OK); 2643 Expect(Token::RETURN, CHECK_OK);
2644 Scanner::Location loc = scanner()->location(); 2644 Scanner::Location loc = scanner()->location();
2645 2645
2646 Token::Value tok = peek(); 2646 Token::Value tok = peek();
2647 Statement* result; 2647 Statement* result;
2648 Expression* return_value; 2648 Expression* return_value;
2649 if (scanner()->HasAnyLineTerminatorBeforeNext() || 2649 if (scanner()->HasAnyLineTerminatorBeforeNext() ||
2650 tok == Token::SEMICOLON || 2650 tok == Token::SEMICOLON ||
2651 tok == Token::RBRACE || 2651 tok == Token::RBRACE ||
2652 tok == Token::EOS) { 2652 tok == Token::EOS) {
2653 return_value = GetLiteralUndefined(position()); 2653 if (FLAG_experimental_classes &&
2654 IsSubclassConstructor(function_state_->kind())) {
2655 return_value = ThisExpression(scope_, factory(), loc.beg_pos);
2656 } else {
2657 return_value = GetLiteralUndefined(position());
2658 }
2654 } else { 2659 } else {
2655 return_value = ParseExpression(true, CHECK_OK); 2660 return_value = ParseExpression(true, CHECK_OK);
2656 } 2661 }
2657 ExpectSemicolon(CHECK_OK); 2662 ExpectSemicolon(CHECK_OK);
2663
2658 if (is_generator()) { 2664 if (is_generator()) {
2659 Expression* generator = factory()->NewVariableProxy( 2665 Expression* generator = factory()->NewVariableProxy(
2660 function_state_->generator_object_variable()); 2666 function_state_->generator_object_variable());
2661 Expression* yield = factory()->NewYield( 2667 Expression* yield = factory()->NewYield(
2662 generator, return_value, Yield::kFinal, loc.beg_pos); 2668 generator, return_value, Yield::kFinal, loc.beg_pos);
2663 result = factory()->NewExpressionStatement(yield, loc.beg_pos); 2669 result = factory()->NewExpressionStatement(yield, loc.beg_pos);
2664 } else { 2670 } else {
2665 result = factory()->NewReturnStatement(return_value, loc.beg_pos); 2671 result = factory()->NewReturnStatement(return_value, loc.beg_pos);
2666 } 2672 }
2667 2673
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
3664 int expected_property_count = -1; 3670 int expected_property_count = -1;
3665 int handler_count = 0; 3671 int handler_count = 0;
3666 FunctionLiteral::ParameterFlag duplicate_parameters = 3672 FunctionLiteral::ParameterFlag duplicate_parameters =
3667 FunctionLiteral::kNoDuplicateParameters; 3673 FunctionLiteral::kNoDuplicateParameters;
3668 FunctionLiteral::IsParenthesizedFlag parenthesized = parenthesized_function_ 3674 FunctionLiteral::IsParenthesizedFlag parenthesized = parenthesized_function_
3669 ? FunctionLiteral::kIsParenthesized 3675 ? FunctionLiteral::kIsParenthesized
3670 : FunctionLiteral::kNotParenthesized; 3676 : FunctionLiteral::kNotParenthesized;
3671 // Parse function body. 3677 // Parse function body.
3672 { 3678 {
3673 AstNodeFactory function_factory(ast_value_factory()); 3679 AstNodeFactory function_factory(ast_value_factory());
3674 FunctionState function_state(&function_state_, &scope_, scope, 3680 FunctionState function_state(&function_state_, &scope_, scope, kind,
3675 &function_factory); 3681 &function_factory);
3676 scope_->SetScopeName(function_name); 3682 scope_->SetScopeName(function_name);
3677 3683
3678 if (is_generator) { 3684 if (is_generator) {
3679 // For generators, allocating variables in contexts is currently a win 3685 // For generators, allocating variables in contexts is currently a win
3680 // because it minimizes the work needed to suspend and resume an 3686 // because it minimizes the work needed to suspend and resume an
3681 // activation. 3687 // activation.
3682 scope_->ForceContextAllocation(); 3688 scope_->ForceContextAllocation();
3683 3689
3684 // Calling a generator returns a generator object. That object is stored 3690 // Calling a generator returns a generator object. That object is stored
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
3818 bool is_lazily_parsed = (mode() == PARSE_LAZILY && 3824 bool is_lazily_parsed = (mode() == PARSE_LAZILY &&
3819 scope_->AllowsLazyCompilation() && 3825 scope_->AllowsLazyCompilation() &&
3820 !parenthesized_function_); 3826 !parenthesized_function_);
3821 parenthesized_function_ = false; // The bit was set for this function only. 3827 parenthesized_function_ = false; // The bit was set for this function only.
3822 3828
3823 if (is_lazily_parsed) { 3829 if (is_lazily_parsed) {
3824 SkipLazyFunctionBody(function_name, &materialized_literal_count, 3830 SkipLazyFunctionBody(function_name, &materialized_literal_count,
3825 &expected_property_count, CHECK_OK); 3831 &expected_property_count, CHECK_OK);
3826 } else { 3832 } else {
3827 body = ParseEagerFunctionBody(function_name, pos, fvar, fvar_init_op, 3833 body = ParseEagerFunctionBody(function_name, pos, fvar, fvar_init_op,
3828 is_generator, CHECK_OK); 3834 kind, CHECK_OK);
3829 materialized_literal_count = function_state.materialized_literal_count(); 3835 materialized_literal_count = function_state.materialized_literal_count();
3830 expected_property_count = function_state.expected_property_count(); 3836 expected_property_count = function_state.expected_property_count();
3831 handler_count = function_state.handler_count(); 3837 handler_count = function_state.handler_count();
3832 } 3838 }
3833 3839
3834 // Validate strict mode. 3840 // Validate strict mode.
3835 // Concise methods use StrictFormalParameters. 3841 // Concise methods use StrictFormalParameters.
3836 // Functions for which IsSimpleParameterList() returns false use 3842 // Functions for which IsSimpleParameterList() returns false use
3837 // StrictFormalParameters. 3843 // StrictFormalParameters.
3838 if (is_strict(language_mode()) || IsConciseMethod(kind) || is_rest) { 3844 if (is_strict(language_mode()) || IsConciseMethod(kind) || is_rest) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
3928 // Position right after terminal '}'. 3934 // Position right after terminal '}'.
3929 int body_end = scanner()->location().end_pos; 3935 int body_end = scanner()->location().end_pos;
3930 log_->LogFunction(function_block_pos, body_end, *materialized_literal_count, 3936 log_->LogFunction(function_block_pos, body_end, *materialized_literal_count,
3931 *expected_property_count, scope_->language_mode()); 3937 *expected_property_count, scope_->language_mode());
3932 } 3938 }
3933 } 3939 }
3934 3940
3935 3941
3936 ZoneList<Statement*>* Parser::ParseEagerFunctionBody( 3942 ZoneList<Statement*>* Parser::ParseEagerFunctionBody(
3937 const AstRawString* function_name, int pos, Variable* fvar, 3943 const AstRawString* function_name, int pos, Variable* fvar,
3938 Token::Value fvar_init_op, bool is_generator, bool* ok) { 3944 Token::Value fvar_init_op, FunctionKind kind, bool* ok) {
3939 // Everything inside an eagerly parsed function will be parsed eagerly 3945 // Everything inside an eagerly parsed function will be parsed eagerly
3940 // (see comment above). 3946 // (see comment above).
3941 ParsingModeScope parsing_mode(this, PARSE_EAGERLY); 3947 ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
3942 ZoneList<Statement*>* body = new(zone()) ZoneList<Statement*>(8, zone()); 3948 ZoneList<Statement*>* body = new(zone()) ZoneList<Statement*>(8, zone());
3943 if (fvar != NULL) { 3949 if (fvar != NULL) {
3944 VariableProxy* fproxy = scope_->NewUnresolved( 3950 VariableProxy* fproxy = scope_->NewUnresolved(
3945 factory(), function_name, Interface::NewConst()); 3951 factory(), function_name, Interface::NewConst());
3946 fproxy->BindTo(fvar); 3952 fproxy->BindTo(fvar);
3947 body->Add(factory()->NewExpressionStatement( 3953 body->Add(factory()->NewExpressionStatement(
3948 factory()->NewAssignment(fvar_init_op, 3954 factory()->NewAssignment(fvar_init_op,
3949 fproxy, 3955 fproxy,
3950 factory()->NewThisFunction(pos), 3956 factory()->NewThisFunction(pos),
3951 RelocInfo::kNoPosition), 3957 RelocInfo::kNoPosition),
3952 RelocInfo::kNoPosition), zone()); 3958 RelocInfo::kNoPosition), zone());
3953 } 3959 }
3954 3960
3961
3962 // For concise constructors, check that they are constructed,
3963 // not called.
3964 if (FLAG_experimental_classes && i::IsConstructor(kind)) {
3965 ZoneList<Expression*>* arguments =
3966 new (zone()) ZoneList<Expression*>(0, zone());
3967 CallRuntime* construct_check = factory()->NewCallRuntime(
3968 ast_value_factory()->is_construct_call_string(),
3969 Runtime::FunctionForId(Runtime::kInlineIsConstructCall), arguments,
3970 pos);
3971 CallRuntime* non_callable_error = factory()->NewCallRuntime(
3972 ast_value_factory()->empty_string(),
3973 Runtime::FunctionForId(Runtime::kThrowConstructorNonCallableError),
3974 arguments, pos);
3975 IfStatement* if_statement = factory()->NewIfStatement(
3976 factory()->NewUnaryOperation(Token::NOT, construct_check, pos),
3977 factory()->NewReturnStatement(non_callable_error, pos),
3978 factory()->NewEmptyStatement(pos), pos);
3979 body->Add(if_statement, zone());
3980 }
3981
3955 // For generators, allocate and yield an iterator on function entry. 3982 // For generators, allocate and yield an iterator on function entry.
3956 if (is_generator) { 3983 if (IsGeneratorFunction(kind)) {
3957 ZoneList<Expression*>* arguments = 3984 ZoneList<Expression*>* arguments =
3958 new(zone()) ZoneList<Expression*>(0, zone()); 3985 new(zone()) ZoneList<Expression*>(0, zone());
3959 CallRuntime* allocation = factory()->NewCallRuntime( 3986 CallRuntime* allocation = factory()->NewCallRuntime(
3960 ast_value_factory()->empty_string(), 3987 ast_value_factory()->empty_string(),
3961 Runtime::FunctionForId(Runtime::kCreateJSGeneratorObject), arguments, 3988 Runtime::FunctionForId(Runtime::kCreateJSGeneratorObject), arguments,
3962 pos); 3989 pos);
3963 VariableProxy* init_proxy = factory()->NewVariableProxy( 3990 VariableProxy* init_proxy = factory()->NewVariableProxy(
3964 function_state_->generator_object_variable()); 3991 function_state_->generator_object_variable());
3965 Assignment* assignment = factory()->NewAssignment( 3992 Assignment* assignment = factory()->NewAssignment(
3966 Token::INIT_VAR, init_proxy, allocation, RelocInfo::kNoPosition); 3993 Token::INIT_VAR, init_proxy, allocation, RelocInfo::kNoPosition);
3967 VariableProxy* get_proxy = factory()->NewVariableProxy( 3994 VariableProxy* get_proxy = factory()->NewVariableProxy(
3968 function_state_->generator_object_variable()); 3995 function_state_->generator_object_variable());
3969 Yield* yield = factory()->NewYield( 3996 Yield* yield = factory()->NewYield(
3970 get_proxy, assignment, Yield::kInitial, RelocInfo::kNoPosition); 3997 get_proxy, assignment, Yield::kInitial, RelocInfo::kNoPosition);
3971 body->Add(factory()->NewExpressionStatement( 3998 body->Add(factory()->NewExpressionStatement(
3972 yield, RelocInfo::kNoPosition), zone()); 3999 yield, RelocInfo::kNoPosition), zone());
3973 } 4000 }
3974 4001
3975 ParseStatementList(body, Token::RBRACE, false, NULL, CHECK_OK); 4002 ParseStatementList(body, Token::RBRACE, false, NULL, CHECK_OK);
3976 4003
3977 if (is_generator) { 4004 if (IsGeneratorFunction(kind)) {
3978 VariableProxy* get_proxy = factory()->NewVariableProxy( 4005 VariableProxy* get_proxy = factory()->NewVariableProxy(
3979 function_state_->generator_object_variable()); 4006 function_state_->generator_object_variable());
3980 Expression* undefined = 4007 Expression* undefined =
3981 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition); 4008 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition);
3982 Yield* yield = factory()->NewYield(get_proxy, undefined, Yield::kFinal, 4009 Yield* yield = factory()->NewYield(get_proxy, undefined, Yield::kFinal,
3983 RelocInfo::kNoPosition); 4010 RelocInfo::kNoPosition);
3984 body->Add(factory()->NewExpressionStatement( 4011 body->Add(factory()->NewExpressionStatement(
3985 yield, RelocInfo::kNoPosition), zone()); 4012 yield, RelocInfo::kNoPosition), zone());
3986 } 4013 }
3987 4014
4015 if (FLAG_experimental_classes && IsSubclassConstructor(kind)) {
4016 body->Add(
4017 factory()->NewReturnStatement(
4018 this->ThisExpression(scope_, factory(), RelocInfo::kNoPosition),
4019 RelocInfo::kNoPosition),
4020 zone());
4021 }
4022
3988 Expect(Token::RBRACE, CHECK_OK); 4023 Expect(Token::RBRACE, CHECK_OK);
3989 scope_->set_end_position(scanner()->location().end_pos); 4024 scope_->set_end_position(scanner()->location().end_pos);
3990 4025
3991 return body; 4026 return body;
3992 } 4027 }
3993 4028
3994 4029
3995 PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( 4030 PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
3996 SingletonLogger* logger) { 4031 SingletonLogger* logger) {
3997 // This function may be called on a background thread too; record only the 4032 // This function may be called on a background thread too; record only the
(...skipping 20 matching lines...) Expand all
4018 reusable_preparser_->set_allow_harmony_templates(allow_harmony_templates()); 4053 reusable_preparser_->set_allow_harmony_templates(allow_harmony_templates());
4019 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy()); 4054 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy());
4020 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode()); 4055 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode());
4021 reusable_preparser_->set_allow_harmony_computed_property_names( 4056 reusable_preparser_->set_allow_harmony_computed_property_names(
4022 allow_harmony_computed_property_names()); 4057 allow_harmony_computed_property_names());
4023 reusable_preparser_->set_allow_harmony_rest_params( 4058 reusable_preparser_->set_allow_harmony_rest_params(
4024 allow_harmony_rest_params()); 4059 allow_harmony_rest_params());
4025 reusable_preparser_->set_allow_strong_mode(allow_strong_mode()); 4060 reusable_preparser_->set_allow_strong_mode(allow_strong_mode());
4026 } 4061 }
4027 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4062 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4028 language_mode(), is_generator(), logger); 4063 language_mode(), function_state_->kind(), logger);
4029 if (pre_parse_timer_ != NULL) { 4064 if (pre_parse_timer_ != NULL) {
4030 pre_parse_timer_->Stop(); 4065 pre_parse_timer_->Stop();
4031 } 4066 }
4032 return result; 4067 return result;
4033 } 4068 }
4034 4069
4035 4070
4036 ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name, 4071 ClassLiteral* Parser::ParseClassLiteral(const AstRawString* name,
4037 Scanner::Location class_name_location, 4072 Scanner::Location class_name_location,
4038 bool name_is_strict_reserved, int pos, 4073 bool name_is_strict_reserved, int pos,
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
5429 } else { 5464 } else {
5430 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data()); 5465 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data());
5431 running_hash = StringHasher::ComputeRunningHash(running_hash, data, 5466 running_hash = StringHasher::ComputeRunningHash(running_hash, data,
5432 raw_string->length()); 5467 raw_string->length());
5433 } 5468 }
5434 } 5469 }
5435 5470
5436 return running_hash; 5471 return running_hash;
5437 } 5472 }
5438 } } // namespace v8::internal 5473 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698