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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

Issue 1308693014: [Interpreter] Ensure that implicit return undefined is generated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment Created 5 years, 3 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/interpreter/bytecode-array-builder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 17 matching lines...) Expand all
28 Handle<BytecodeArray> ToBytecodeArray(); 28 Handle<BytecodeArray> ToBytecodeArray();
29 29
30 // Set number of parameters expected by function. 30 // Set number of parameters expected by function.
31 void set_parameter_count(int number_of_params); 31 void set_parameter_count(int number_of_params);
32 int parameter_count() const; 32 int parameter_count() const;
33 33
34 // Set number of locals required for bytecode array. 34 // Set number of locals required for bytecode array.
35 void set_locals_count(int number_of_locals); 35 void set_locals_count(int number_of_locals);
36 int locals_count() const; 36 int locals_count() const;
37 37
38 // Returns true if the bytecode has an explicit return at the end.
39 bool HasExplicitReturn();
40
38 Register Parameter(int parameter_index); 41 Register Parameter(int parameter_index);
39 42
40 // Constant loads to accumulator. 43 // Constant loads to accumulator.
41 BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value); 44 BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
42 BytecodeArrayBuilder& LoadLiteral(Handle<Object> object); 45 BytecodeArrayBuilder& LoadLiteral(Handle<Object> object);
43 BytecodeArrayBuilder& LoadUndefined(); 46 BytecodeArrayBuilder& LoadUndefined();
44 BytecodeArrayBuilder& LoadNull(); 47 BytecodeArrayBuilder& LoadNull();
45 BytecodeArrayBuilder& LoadTheHole(); 48 BytecodeArrayBuilder& LoadTheHole();
46 BytecodeArrayBuilder& LoadTrue(); 49 BytecodeArrayBuilder& LoadTrue();
47 BytecodeArrayBuilder& LoadFalse(); 50 BytecodeArrayBuilder& LoadFalse();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 117
115 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 118 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
116 }; 119 };
117 120
118 121
119 } // namespace interpreter 122 } // namespace interpreter
120 } // namespace internal 123 } // namespace internal
121 } // namespace v8 124 } // namespace v8
122 125
123 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 126 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698