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

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

Issue 1309843007: [Interpreter] Add support for property load operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove templated FitsInOperand since std::is_integral is not supported on Mac 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 | « src/frames.h ('k') | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 BytecodeArrayBuilder& LoadUndefined(); 44 BytecodeArrayBuilder& LoadUndefined();
45 BytecodeArrayBuilder& LoadNull(); 45 BytecodeArrayBuilder& LoadNull();
46 BytecodeArrayBuilder& LoadTheHole(); 46 BytecodeArrayBuilder& LoadTheHole();
47 BytecodeArrayBuilder& LoadTrue(); 47 BytecodeArrayBuilder& LoadTrue();
48 BytecodeArrayBuilder& LoadFalse(); 48 BytecodeArrayBuilder& LoadFalse();
49 49
50 // Register-accumulator transfers. 50 // Register-accumulator transfers.
51 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg); 51 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg);
52 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg); 52 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg);
53 53
54 // Load properties. The property name should be in the accumulator.
55 BytecodeArrayBuilder& LoadNamedProperty(Register object, int feedback_slot,
56 LanguageMode language_mode);
57 BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot,
58 LanguageMode language_mode);
59
54 // Operators. 60 // Operators.
55 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); 61 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg);
56 62
57 // Flow Control. 63 // Flow Control.
58 BytecodeArrayBuilder& Return(); 64 BytecodeArrayBuilder& Return();
59 65
60 private: 66 private:
61 static const int kLastParamRegisterIndex = 67 static const int kLastParamRegisterIndex =
62 -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize; 68 -InterpreterFrameConstants::kLastParamFromRegisterPointer / kPointerSize;
63 69
64 static Bytecode BytecodeForBinaryOperation(Token::Value op); 70 static Bytecode BytecodeForBinaryOperation(Token::Value op);
71 static bool FitsInByteOperand(int value);
72 static bool FitsInByteOperand(size_t value);
65 73
66 void Output(Bytecode bytecode, uint8_t r0, uint8_t r1, uint8_t r2); 74 void Output(Bytecode bytecode, uint8_t r0, uint8_t r1, uint8_t r2);
67 void Output(Bytecode bytecode, uint8_t r0, uint8_t r1); 75 void Output(Bytecode bytecode, uint8_t r0, uint8_t r1);
68 void Output(Bytecode bytecode, uint8_t r0); 76 void Output(Bytecode bytecode, uint8_t r0);
69 void Output(Bytecode bytecode); 77 void Output(Bytecode bytecode);
70 78
71 bool OperandIsValid(Bytecode bytecode, int operand_index, 79 bool OperandIsValid(Bytecode bytecode, int operand_index,
72 uint8_t operand_value) const; 80 uint8_t operand_value) const;
73 81
74 size_t GetConstantPoolEntry(Handle<Object> object); 82 size_t GetConstantPoolEntry(Handle<Object> object);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 144
137 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 145 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
138 }; 146 };
139 147
140 148
141 } // namespace interpreter 149 } // namespace interpreter
142 } // namespace internal 150 } // namespace internal
143 } // namespace v8 151 } // namespace v8
144 152
145 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 153 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698