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

Side by Side Diff: src/full-codegen/full-codegen.h

Issue 2533283002: [fullcodegen] Remove with-statement support. (Closed)
Patch Set: Created 4 years 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/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.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_FULL_CODEGEN_FULL_CODEGEN_H_ 5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_
6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ 6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 NestedStatement* Exit(int* context_length) override { 176 NestedStatement* Exit(int* context_length) override {
177 auto block_scope = statement()->AsBlock()->scope(); 177 auto block_scope = statement()->AsBlock()->scope();
178 if (block_scope != nullptr) { 178 if (block_scope != nullptr) {
179 if (block_scope->ContextLocalCount() > 0) ++(*context_length); 179 if (block_scope->ContextLocalCount() > 0) ++(*context_length);
180 } 180 }
181 return previous_; 181 return previous_;
182 } 182 }
183 }; 183 };
184 184
185 // The body of a with or catch.
186 class WithOrCatch : public NestedStatement {
187 public:
188 explicit WithOrCatch(FullCodeGenerator* codegen)
189 : NestedStatement(codegen) {
190 }
191
192 NestedStatement* Exit(int* context_length) override {
193 ++(*context_length);
194 return previous_;
195 }
196 };
197
198 // A platform-specific utility to overwrite the accumulator register 185 // A platform-specific utility to overwrite the accumulator register
199 // with a GC-safe value. 186 // with a GC-safe value.
200 void ClearAccumulator(); 187 void ClearAccumulator();
201 188
202 // Determine whether or not to inline the smi case for the given 189 // Determine whether or not to inline the smi case for the given
203 // operation. 190 // operation.
204 bool ShouldInlineSmiCase(Token::Value op); 191 bool ShouldInlineSmiCase(Token::Value op);
205 192
206 // Helper function to convert a pure value into a test context. The value 193 // Helper function to convert a pure value into a test context. The value
207 // is expected on the stack or the accumulator, depending on the platform. 194 // is expected on the stack or the accumulator, depending on the platform.
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 Address start_; 912 Address start_;
926 Address instruction_start_; 913 Address instruction_start_;
927 uint32_t length_; 914 uint32_t length_;
928 }; 915 };
929 916
930 917
931 } // namespace internal 918 } // namespace internal
932 } // namespace v8 919 } // namespace v8
933 920
934 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ 921 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698