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

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

Issue 1468003002: [Interpreter] Add support for cast operators to bytecode graph builder and (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch and removed unused definitions of matcher classes in unittests Created 5 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
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/ast.h" 10 #include "src/ast/ast.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 size_t GetConstantPoolEntry(Handle<Object> object); 72 size_t GetConstantPoolEntry(Handle<Object> object);
73 73
74 // Constant loads to accumulator. 74 // Constant loads to accumulator.
75 BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value); 75 BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
76 BytecodeArrayBuilder& LoadLiteral(Handle<Object> object); 76 BytecodeArrayBuilder& LoadLiteral(Handle<Object> object);
77 BytecodeArrayBuilder& LoadUndefined(); 77 BytecodeArrayBuilder& LoadUndefined();
78 BytecodeArrayBuilder& LoadNull(); 78 BytecodeArrayBuilder& LoadNull();
79 BytecodeArrayBuilder& LoadTheHole(); 79 BytecodeArrayBuilder& LoadTheHole();
80 BytecodeArrayBuilder& LoadTrue(); 80 BytecodeArrayBuilder& LoadTrue();
81 BytecodeArrayBuilder& LoadFalse(); 81 BytecodeArrayBuilder& LoadFalse();
82 BytecodeArrayBuilder& LoadBooleanConstant(bool value);
82 83
83 // Global loads to the accumulator and stores from the accumulator. 84 // Global loads to the accumulator and stores from the accumulator.
84 BytecodeArrayBuilder& LoadGlobal(size_t name_index, int feedback_slot, 85 BytecodeArrayBuilder& LoadGlobal(size_t name_index, int feedback_slot,
85 LanguageMode language_mode, 86 LanguageMode language_mode,
86 TypeofMode typeof_mode); 87 TypeofMode typeof_mode);
87 BytecodeArrayBuilder& StoreGlobal(size_t name_index, int feedback_slot, 88 BytecodeArrayBuilder& StoreGlobal(size_t name_index, int feedback_slot,
88 LanguageMode language_mode); 89 LanguageMode language_mode);
89 90
90 // Load the object at |slot_index| in |context| into the accumulator. 91 // Load the object at |slot_index| in |context| into the accumulator.
91 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index); 92 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 IdentityMap<size_t> constants_map_; 280 IdentityMap<size_t> constants_map_;
280 ZoneVector<Handle<Object>> constants_; 281 ZoneVector<Handle<Object>> constants_;
281 282
282 int parameter_count_; 283 int parameter_count_;
283 int local_register_count_; 284 int local_register_count_;
284 int context_register_count_; 285 int context_register_count_;
285 int temporary_register_count_; 286 int temporary_register_count_;
286 287
287 ZoneSet<int> free_temporaries_; 288 ZoneSet<int> free_temporaries_;
288 289
290 class PreviousBytecodeHelper;
289 friend class TemporaryRegisterScope; 291 friend class TemporaryRegisterScope;
290 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 292 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
291 }; 293 };
292 294
293 295
294 // A label representing a branch target in a bytecode array. When a 296 // A label representing a branch target in a bytecode array. When a
295 // label is bound, it represents a known position in the bytecode 297 // label is bound, it represents a known position in the bytecode
296 // array. For labels that are forward references there can be at most 298 // array. For labels that are forward references there can be at most
297 // one reference whilst it is unbound. 299 // one reference whilst it is unbound.
298 class BytecodeLabel final { 300 class BytecodeLabel final {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 359
358 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 360 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
359 }; 361 };
360 362
361 363
362 } // namespace interpreter 364 } // namespace interpreter
363 } // namespace internal 365 } // namespace internal
364 } // namespace v8 366 } // namespace v8
365 367
366 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 368 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698