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

Side by Side Diff: src/compiler.h

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 // 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual ~CompilationInfo(); 59 virtual ~CompilationInfo();
60 60
61 Isolate* isolate() const { 61 Isolate* isolate() const {
62 return isolate_; 62 return isolate_;
63 } 63 }
64 Zone* zone() { return zone_; } 64 Zone* zone() { return zone_; }
65 bool is_osr() const { return !osr_ast_id_.IsNone(); } 65 bool is_osr() const { return !osr_ast_id_.IsNone(); }
66 bool is_lazy() const { return IsLazy::decode(flags_); } 66 bool is_lazy() const { return IsLazy::decode(flags_); }
67 bool is_eval() const { return IsEval::decode(flags_); } 67 bool is_eval() const { return IsEval::decode(flags_); }
68 bool is_global() const { return IsGlobal::decode(flags_); } 68 bool is_global() const { return IsGlobal::decode(flags_); }
69 bool is_classic_mode() const { return language_mode() == CLASSIC_MODE; } 69 bool is_sloppy_mode() const { return language_mode() == SLOPPY_MODE; }
70 bool is_extended_mode() const { return language_mode() == EXTENDED_MODE; } 70 bool is_extended_mode() const { return language_mode() == EXTENDED_MODE; }
71 LanguageMode language_mode() const { 71 LanguageMode language_mode() const {
72 return LanguageModeField::decode(flags_); 72 return LanguageModeField::decode(flags_);
73 } 73 }
74 bool is_in_loop() const { return IsInLoop::decode(flags_); } 74 bool is_in_loop() const { return IsInLoop::decode(flags_); }
75 FunctionLiteral* function() const { return function_; } 75 FunctionLiteral* function() const { return function_; }
76 Scope* scope() const { return scope_; } 76 Scope* scope() const { return scope_; }
77 Scope* global_scope() const { return global_scope_; } 77 Scope* global_scope() const { return global_scope_; }
78 Handle<Code> code() const { return code_; } 78 Handle<Code> code() const { return code_; }
79 Handle<JSFunction> closure() const { return closure_; } 79 Handle<JSFunction> closure() const { return closure_; }
(...skipping 23 matching lines...) Expand all
103 parameter_count_ = parameter_count; 103 parameter_count_ = parameter_count;
104 } 104 }
105 105
106 void set_this_has_uses(bool has_no_uses) { 106 void set_this_has_uses(bool has_no_uses) {
107 this_has_uses_ = has_no_uses; 107 this_has_uses_ = has_no_uses;
108 } 108 }
109 bool this_has_uses() { 109 bool this_has_uses() {
110 return this_has_uses_; 110 return this_has_uses_;
111 } 111 }
112 void SetLanguageMode(LanguageMode language_mode) { 112 void SetLanguageMode(LanguageMode language_mode) {
113 ASSERT(this->language_mode() == CLASSIC_MODE || 113 ASSERT(this->language_mode() == SLOPPY_MODE ||
114 this->language_mode() == language_mode || 114 this->language_mode() == language_mode ||
115 language_mode == EXTENDED_MODE); 115 language_mode == EXTENDED_MODE);
116 flags_ = LanguageModeField::update(flags_, language_mode); 116 flags_ = LanguageModeField::update(flags_, language_mode);
117 } 117 }
118 void MarkAsInLoop() { 118 void MarkAsInLoop() {
119 ASSERT(is_lazy()); 119 ASSERT(is_lazy());
120 flags_ |= IsInLoop::encode(true); 120 flags_ |= IsInLoop::encode(true);
121 } 121 }
122 void MarkAsNative() { 122 void MarkAsNative() {
123 flags_ |= IsNative::encode(true); 123 flags_ |= IsNative::encode(true);
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 unsigned info_zone_start_allocation_size_; 679 unsigned info_zone_start_allocation_size_;
680 ElapsedTimer timer_; 680 ElapsedTimer timer_;
681 681
682 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 682 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
683 }; 683 };
684 684
685 685
686 } } // namespace v8::internal 686 } } // namespace v8::internal
687 687
688 #endif // V8_COMPILER_H_ 688 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/compilation-cache.h ('k') | src/compiler.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698