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

Side by Side Diff: src/compiler.h

Issue 272513004: Reland r20974: Unify and simplify the FastCloneShallowArrayStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: This time it will work! Created 6 years, 7 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 | Annotate | Revision Log
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_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "ast.h" 9 #include "ast.h"
10 #include "zone.h" 10 #include "zone.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 void MarkAsRequiresFrame() { 138 void MarkAsRequiresFrame() {
139 flags_ |= RequiresFrame::encode(true); 139 flags_ |= RequiresFrame::encode(true);
140 } 140 }
141 141
142 bool requires_frame() const { 142 bool requires_frame() const {
143 return RequiresFrame::decode(flags_); 143 return RequiresFrame::decode(flags_);
144 } 144 }
145 145
146 void MarkMustNotHaveEagerFrame() {
147 flags_ |= MustNotHaveEagerFrame::encode(true);
148 }
149
150 bool GetMustNotHaveEagerFrame() const {
151 return MustNotHaveEagerFrame::decode(flags_);
152 }
153
146 void SetParseRestriction(ParseRestriction restriction) { 154 void SetParseRestriction(ParseRestriction restriction) {
147 flags_ = ParseRestricitonField::update(flags_, restriction); 155 flags_ = ParseRestricitonField::update(flags_, restriction);
148 } 156 }
149 157
150 ParseRestriction parse_restriction() const { 158 ParseRestriction parse_restriction() const {
151 return ParseRestricitonField::decode(flags_); 159 return ParseRestricitonField::decode(flags_);
152 } 160 }
153 161
154 void SetFunction(FunctionLiteral* literal) { 162 void SetFunction(FunctionLiteral* literal) {
155 ASSERT(function_ == NULL); 163 ASSERT(function_ == NULL);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // If the compiled code contains calls that require building a frame 369 // If the compiled code contains calls that require building a frame
362 class IsDeferredCalling: public BitField<bool, 9, 1> {}; 370 class IsDeferredCalling: public BitField<bool, 9, 1> {};
363 // If the compiled code contains calls that require building a frame 371 // If the compiled code contains calls that require building a frame
364 class IsNonDeferredCalling: public BitField<bool, 10, 1> {}; 372 class IsNonDeferredCalling: public BitField<bool, 10, 1> {};
365 // If the compiled code saves double caller registers that it clobbers. 373 // If the compiled code saves double caller registers that it clobbers.
366 class SavesCallerDoubles: public BitField<bool, 11, 1> {}; 374 class SavesCallerDoubles: public BitField<bool, 11, 1> {};
367 // If the set of valid statements is restricted. 375 // If the set of valid statements is restricted.
368 class ParseRestricitonField: public BitField<ParseRestriction, 12, 1> {}; 376 class ParseRestricitonField: public BitField<ParseRestriction, 12, 1> {};
369 // If the function requires a frame (for unspecified reasons) 377 // If the function requires a frame (for unspecified reasons)
370 class RequiresFrame: public BitField<bool, 13, 1> {}; 378 class RequiresFrame: public BitField<bool, 13, 1> {};
379 // If the function cannot build a frame (for unspecified reasons)
380 class MustNotHaveEagerFrame: public BitField<bool, 14, 1> {};
371 381
372 unsigned flags_; 382 unsigned flags_;
373 383
374 // Fields filled in by the compilation pipeline. 384 // Fields filled in by the compilation pipeline.
375 // AST filled in by the parser. 385 // AST filled in by the parser.
376 FunctionLiteral* function_; 386 FunctionLiteral* function_;
377 // The scope of the function literal as a convenience. Set to indicate 387 // The scope of the function literal as a convenience. Set to indicate
378 // that scopes have been analyzed. 388 // that scopes have been analyzed.
379 Scope* scope_; 389 Scope* scope_;
380 // The global scope provided as a convenience. 390 // The global scope provided as a convenience.
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 unsigned info_zone_start_allocation_size_; 686 unsigned info_zone_start_allocation_size_;
677 ElapsedTimer timer_; 687 ElapsedTimer timer_;
678 688
679 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 689 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
680 }; 690 };
681 691
682 692
683 } } // namespace v8::internal 693 } } // namespace v8::internal
684 694
685 #endif // V8_COMPILER_H_ 695 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/counters.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698