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

Side by Side Diff: src/parser.h

Issue 176403004: parser: fix build on solaris (Closed) Base URL: gh:v8/v8@master
Patch Set: Created 6 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 | « no previous file | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 420
421 // Return types for traversing functions. 421 // Return types for traversing functions.
422 typedef Handle<String> Identifier; 422 typedef Handle<String> Identifier;
423 typedef v8::internal::Expression* Expression; 423 typedef v8::internal::Expression* Expression;
424 typedef ZoneList<v8::internal::Expression*>* ExpressionList; 424 typedef ZoneList<v8::internal::Expression*>* ExpressionList;
425 }; 425 };
426 426
427 explicit ParserTraits(Parser* parser) : parser_(parser) {} 427 explicit ParserTraits(Parser* parser) : parser_(parser) {}
428 428
429 // Custom operations executed when FunctionStates are created and destructed. 429 // Custom operations executed when FunctionStates are created and destructed.
430 template<typename FS> 430 template<typename FunctionState>
431 static void SetUpFunctionState(FS* function_state, Zone* zone) { 431 static void SetUpFunctionState(FunctionState* function_state, Zone* zone) {
432 Isolate* isolate = zone->isolate(); 432 Isolate* isolate = zone->isolate();
433 function_state->isolate_ = isolate; 433 function_state->isolate_ = isolate;
434 function_state->saved_ast_node_id_ = isolate->ast_node_id(); 434 function_state->saved_ast_node_id_ = isolate->ast_node_id();
435 isolate->set_ast_node_id(BailoutId::FirstUsable().ToInt()); 435 isolate->set_ast_node_id(BailoutId::FirstUsable().ToInt());
436 } 436 }
437 437
438 template<typename FS> 438 template<typename FunctionState>
439 static void TearDownFunctionState(FS* function_state) { 439 static void TearDownFunctionState(FunctionState* function_state) {
440 if (function_state->outer_function_state_ != NULL) { 440 if (function_state->outer_function_state_ != NULL) {
441 function_state->isolate_->set_ast_node_id( 441 function_state->isolate_->set_ast_node_id(
442 function_state->saved_ast_node_id_); 442 function_state->saved_ast_node_id_);
443 } 443 }
444 } 444 }
445 445
446 // Helper functions for recursive descent. 446 // Helper functions for recursive descent.
447 bool IsEvalOrArguments(Handle<String> identifier) const; 447 bool IsEvalOrArguments(Handle<String> identifier) const;
448 448
449 // Reporting errors. 449 // Reporting errors.
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 private: 786 private:
787 static const int kLiteralTypeSlot = 0; 787 static const int kLiteralTypeSlot = 0;
788 static const int kElementsSlot = 1; 788 static const int kElementsSlot = 1;
789 789
790 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 790 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
791 }; 791 };
792 792
793 } } // namespace v8::internal 793 } } // namespace v8::internal
794 794
795 #endif // V8_PARSER_H_ 795 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698